First read our social messaging quick start guide to get familiar with how Facebook messenger integrates with xtremepush. To integrate your chatfuel chatbot with xtremepush you will need to first make sure the FB Messenger plugin you use to opt-in users is sending an xtremepush id back to your chatbot:
Next you will need to associate a FB messenger ID with your users on xtremepush to do this on chatfuel you need to insert two blocks that the user will not see at the start of your chatbot.
- A Setup User Attribute block
- A JSON API block
You will use the xtremepush API for syncing attributes to associate an fb messenger id with your users (https://support.xtremepush.com/hc/en-us/articles/210324225-Tag-Attribute-syncing-methods).
In the Setup User Attribute block you set up the four params you will need to pass to the API:
- apptoken: found in your account settings and used to authenticate with the API
- device_id: passed into chatfuel from the plugin as discussed above on chatfuel this will be stored in the {{ref}} attribute
- tag: set to "fb_messenger_id" to let the xtremepush API know what the attribute we are sending is
- value: set to be the actual value of the fb messenger id on chatfuel this will be stored in the {{messenger user id}} attribute
See how this block looks on chatfuel below:
Once you have this block setup you follow it with a JSON API block that sends these four attributes to the API endpoint https://external-api.xtremepush.com/api/external/hit/tag as shown below:
Comments
0 comments
Article is closed for comments.