Chatfuel chatbot integration with Xtremepush

We recommend reading our Chatbots & 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 Facebook 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:

  1. A setup user Attribute block
  2. A JSON API block 

You will use the xtremepush API for syncing attributes to associate a Facebook messenger ID with your users.

User attribute block

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 Facebook messenger ID on chatfuel. This will be stored in the {{messenger user id}} attribute

See how this block looks on chatfuel below:


JSON API block

Once you have this block configured, you follow it with a JSON API block that sends these four attributes to the API endpoint as shown below: