> For the complete documentation index, see [llms.txt](https://docs.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xenioo.com/basic-concepts/publishing/channels/facebook/facebook-ads-integration.md).

# Facebook Ads Integration

Your Xenioo chatbot can be easily activated by a Facebook Ads integration by simply customizing the payload JSON. By connecting directly to a specific behavior, you can have your Facebook Advertising start a very specific section of your chatbot when interacted.\
\
To use this feature, simply copy and paste the following JSON inside the Facebook Ads custom JSON. Just replace "title", "image-url", "subtitle" and "payload" with your correct values and you're ready to go.

```
{
    "message": {
        "attachment": {
            "type": "template",
            "payload": {
                "template_type": "generic",
                "elements": [
                    {
                        "title": "ANY TITLE",
                        "image_url": "ANY IMAGE URL>",
                        "subtitle": "ANY SUBTITLE",
                        "buttons": [
                            {
                                "type": "postback",
                                "title": "CALL TO ACTION",
                                "payload": "<PUT HERE THE BEHAVIOUR API TOKEN>::"
                            }
                        ]
                    }
                ]
            }
        }
    },
    "user_edit": true
}
```

**Remember: the payload token must always end with 2 (two) colon.** The behavior API token can be easily copy/pasted directly from the [behavior details panel](/basic-concepts/the-chatbot-designer/behaviours_concepts.md).

![](https://2532694803-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdPD9c4fJbXSAZcPHt9%2F-LdhUPrboIlVWYrSHfzT%2F-LdhYjUBxyaf5mqf3ITd%2Fimage.png?alt=media\&token=6e96db96-1b05-4112-8dd7-9b9e1e16d908)
