When the user interacts with rich messages via the AiX (e.g., by clicking a button), the rich message response is sent to Dialogflow in the following format: ID|response, or ID if the rich message type is registration, email, follow up, in this case, the rich message values are sent as an array in the queryParams[‘payload’] key. ID is the rich message ID, which can be set by adding the attribute id=”YOUR-ID” to the shortcode.
If no ID has been set, a random ID will be used instead. Response is the input or selection of the user. To block Dialogflow from replying to a rich message, add a new intent with ID as the only user expression and no response.
Suppose the user interacts with the chatbot via a messaging app (e.g., WhatsApp). In that case, the response of the rich message does not contain the rich message ID, and Dialogflow contexts must be used to allow Dialogflow to understand which Intent to activate for a specific rich message response.
Get rich message response for registration, email, follow up
- From the Left menu > Fulfillment enable Webhooks; you only need to enter the URL of the file that will receive the Dialogflow webhook data.
- Create an Intent with the ID of the rich message; for the registration form, enter registration; for the follow-up form, enter sb-follow-up-form; for email, forms, enter email.
- Enable the Fulfillment of the Intent
- You’re done! The file of the webhook URL will receive the AIX rich message user details.
PREVIOUS < Rich Messages