Last active
May 4, 2017 04:31
-
-
Save georgeportillo/3dc3138a25559a315547ebe2c63fab22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// | |
// Get started | |
// This is a webhook postback with event (an event determines which API.ai intent | |
// will fire when a button with an event payload is clicked). | |
// See example: http://i.imgur.com/jPFHuZ2.png (see events, in this case, the | |
// getstarted intent will fire because in the payload, the event is getStarted. | |
// It's like a unique identifier. | |
//// | |
{ | |
"entry": [{ | |
"id": "39067632506", | |
"time": 1489304167705, | |
"messaging": [{ | |
"sender": { | |
"id": "1713278708698563" | |
}, | |
"recipient": { | |
"id": "39067632506" | |
}, | |
"timestamp":1458692752478, | |
"postback":{ | |
"payload": "{\"event\":\"getStarted\"}", | |
"referral": { | |
"ref": "USER_DEFINED_REFERRAL_PARAM", | |
"source": "SHORTLINK", | |
"type": "OPEN_THREAD" | |
} | |
} | |
}] | |
}] | |
} | |
//// | |
// Engagement Conversation Builder JSON | |
// This is what you will use to test the conversation builder. | |
//// | |
{ | |
"entry": [{ | |
"id": "39067632506", | |
"time": 1489304167705, | |
"messaging": [{ | |
"sender": { | |
"id": "1713278708698563" | |
}, | |
"recipient": { | |
"id": "39067632506" | |
}, | |
"timestamp":1458692752478, | |
"postback":{ | |
// Engagement ID to query for engagement ID | |
// Number where the conversation should pick up from | |
// Correct answer boolean if this is a trivia block | |
"payload": "{\"engagementId\":\"<engagementId>\", \"continue\": \"<resumeNumbeForConversationbuilderr>\", \"correct\": \"false\"}", | |
"referral": { | |
"ref": "USER_DEFINED_REFERRAL_PARAM", | |
"source": "SHORTLINK", | |
"type": "OPEN_THREAD" | |
} | |
} | |
}] | |
}] | |
} | |
//// | |
// Text message | |
//// | |
{ | |
"entry": [{ | |
"id": "39067632506", | |
"time": 1489304167705, | |
"messaging": [{ | |
"sender": { | |
"id": "1713278708698563" | |
}, | |
"recipient": { | |
"id": "39067632506" | |
}, | |
"timestamp": 1458692752478, | |
"message": { | |
"text": "Yes" | |
} | |
}] | |
}] | |
} | |
//// | |
// Message with attachments (for uploading files to Prime's submission handler [content tab]) | |
//// | |
{ | |
"entry": [{ | |
"id": "39067632506", | |
"time": 1489304167705, | |
"messaging": [{ | |
"sender": { | |
"id": "1713278708698563" | |
}, | |
"recipient": { | |
"id": "39067632506" | |
}, | |
"timestamp": 1458692752478, | |
"message": { | |
"mid": "mid.1489304167635:f96399da78", | |
"seq": 766749, | |
"attachments": [{ | |
"type":"image", | |
"payload":{ | |
"url":"http://i.imgur.com/G7N9CSC.jpg" | |
} | |
}, { | |
"type":"video", | |
"payload":{ | |
"url":"http://i.imgur.com/MahMkQ4.mp4" | |
} | |
}] | |
} | |
}] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment