> For the complete documentation index, see [llms.txt](https://docs.antsomi.com/cdp-365-user-guide-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antsomi.com/cdp-365-user-guide-en/use-cases/marketing-hub/how-to-send-message-using-fb-messenger-in-cdp.md).

# How to send message using "FB Messenger" in CDP

## I. Create a new Data source to get the list of users who have sent messages to your page

### 1. Hover your mouse over Data on the left hand side menu and choose Sources

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FGumDmXkYD0eGbD9sgSOl%2Fimage.png?alt=media&amp;token=77f95a00-cdcb-4886-a6a2-26bc37a766d7" alt=""><figcaption></figcaption></figure>

### 2. Click + button to create a new Data source

For Facebook Messenger, choose **Realtime**.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fs3KWlxt45ACtWfRXeNgy%2Fimage.png?alt=media&amp;token=522527d1-8e00-4d0f-84ff-28e5e9f4c864" alt=""><figcaption></figcaption></figure>

### 3. Select Facebook Messenger connector

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FYKypqqiqSCSYdNf10k68%2Fimage.png?alt=media&amp;token=d6480cf2-eab4-4366-9dd8-06a6bdc91053" alt=""><figcaption></figcaption></figure>

### 4. Login your Facebook account

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FGVWzGEfUsiRHRCduZbVp%2Fimage.png?alt=media&amp;token=ae8ecf48-08ce-4936-80b0-3b89c3c11330" alt=""><figcaption></figcaption></figure>

### 5. Select the page that you want

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Ff3kaCH8v6mOTrPGKrzxp%2Fimage.png?alt=media&amp;token=1b433f27-9edd-4d72-b1b7-537887aebee5" alt=""><figcaption></figcaption></figure>

### 6. Choose the fields and click Next

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FsObrKl5frOfkGMNU5BTu%2Fimage.png?alt=media&amp;token=e93cca73-1984-4018-ad23-8bc3fa322a05" alt=""><figcaption></figcaption></figure>

### 7. Choose Data Freshness and who to share. Then click Save to finish.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FoNsO1L280izfOjbYQDwf%2Fimage.png?alt=media&amp;token=1b45d26d-a8e5-4541-8be3-e1044a590ee1" alt=""><figcaption></figcaption></figure>

## II. Set up Dataflow to push Facebook User ID data to Visitor Object in the CDP 365 system

### 1. Hover your mouse over Data on the left hand side menu and choose Realtime Stream

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F4jIX2w31Ctawx0NCf8ZJ%2Fimage.png?alt=media&amp;token=7befdabf-744d-4c36-9c7a-f293a4e422d1" alt=""><figcaption></figcaption></figure>

### 2. Click + button to create a Dataflow. Choose Facebook Messenger template.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FUl2QUxoWdfnbnFGUvfYe%2Fimage.png?alt=media&amp;token=bef24c1d-497c-48f3-95fe-5940b2d41eef" alt=""><figcaption></figcaption></figure>

### 3. Select the Facebook Messenger data source that you created, then click the Save button

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FehdLQwVC2QxeKz89wciw%2Fimage.png?alt=media&amp;token=a9fe1815-46d8-44f2-9c13-da72124234e4" alt=""><figcaption></figcaption></figure>

### 4. Select the field you want to get the data

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FHsUHGqYLxwUen6Nbcz6T%2Fimage.png?alt=media&amp;token=e66ec748-eda9-4233-b87d-b94d817edbe3" alt=""><figcaption></figcaption></figure>

Note:

* **User ID** is the ID of the Facebook account who have sent message to your page
* Facebook only returns a list of User id that have sent message to your page within 24 hours

### 5.  Add Destination channel node

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FRGv8WAYk22kjQl0nxCvn%2Fimage.png?alt=media&amp;token=934a7a28-3683-4c5a-a70f-8d3cccf91380" alt=""><figcaption></figcaption></figure>

You can see how to create a destination channel for a Business Object

Select Visitor Business Object, then map Facebook's User id with Visitor's User ID on CDP 365 system

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FilaDSGmDjydDi7xWKDzD%2Fimage.png?alt=media&amp;token=dccc420d-95a8-4a27-8023-a5ccfccd356f" alt=""><figcaption></figcaption></figure>

You need to create a **Custom attribute** in the **Visitor** Business Object to know it's the Facebook user ID pushed from the dataflow

You can see how to create a **Custom attribute**

For example: Create a Custom attribute of "Is Facebook user\_id" with data type of Number

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FEWbS6jymYiIYxslFqtxX%2Fimage.png?alt=media&amp;token=3369716d-d5de-4527-9286-aec719132603" alt=""><figcaption></figcaption></figure>

* If the value of this attribute is 1, it is the User ID of Facebook

Set value pushed from dataflow to 1 for this Customer attribute

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FN9fHK78kv17zsA8FWmMz%2Fimage.png?alt=media&amp;token=ffba22f7-c31d-437a-ab1d-7b8650fd7bf2" alt=""><figcaption></figcaption></figure>

Pre-selected write mode is **Insert all**.

### 6. Save Dataflow

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F9JC2Ik64ZxRoivUhK9j4%2Fimage.png?alt=media&amp;token=530015fa-7ee6-4c4b-90bf-4825009dc100" alt=""><figcaption></figcaption></figure>

### 7. P**REVIEW**

Used to view setup information in dataflows.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fi1ihvZcjgEIYMbBnawd8%2Fimage.png?alt=media&amp;token=ad73c644-d2fa-4db5-abb9-8bf0f6b03ab8" alt=""><figcaption></figcaption></figure>

**Force Run:** Used to run immediately without timeout in dataflows

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F5rAyI5gNSar0JBprAWML%2Fimage.png?alt=media&amp;token=a0c56079-1d4c-46ec-80d3-e5bb1248ba63" alt=""><figcaption></figcaption></figure>

After the dataflow has finished running, you can go to the Visitor menu in Personas App to check the creation of Facebook User ID in **CDP 365**:

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fz3f6YAZmdlMX4y2OLYwf%2Fimage.png?alt=media&amp;token=5d82aaa7-03a2-4e66-9481-7a50a09f14e0" alt=""><figcaption></figcaption></figure>

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FbJrF1hsovvXaR0ILQbuk%2Fimage.png?alt=media&amp;token=4df8c015-90a0-412d-88a5-fb5eaac166ba" alt=""><figcaption></figcaption></figure>

## III. Create a new Visitor Segment to get a list of Facebook User IDs

The conditions you set in the segment are as follows:

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FwfQ8hHHfjVL2nb5zH6ph%2Fimage.png?alt=media&amp;token=c54d0bd6-2155-4f46-b114-7f4ea0fae256" alt=""><figcaption></figcaption></figure>

Note: You can see how to create a new segment

## IV. Create a FB Messenger destination&#x20;

### 1. Hover your mouse over Settings and go to Channel Integration

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FzHO3ccJW6RJvDvEHZ8ng%2Fimage.png?alt=media&amp;token=eaeb6568-3820-452c-8a63-fad12659bf81" alt=""><figcaption></figcaption></figure>

### 2. Click + button and choose the channel FB Messenger

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FwfBCiiDiuwYWWAIH17M0%2Fimage.png?alt=media&amp;token=5ee1ea06-8a9b-4fc1-ae0d-71b86056391c" alt=""><figcaption></figcaption></figure>

### 3. Select Destination catalog: Antsomi Facebook

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FK48xaAlCbMpn6sydIte9%2Fimage.png?alt=media&amp;token=526d2e70-1d2d-4e5d-9a53-6b6a5178f70b" alt=""><figcaption></figcaption></figure>

### 4. Fill in the necessary information for the destination

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FopCRRddRpAooKAMEt0Er%2Fimage.png?alt=media&amp;token=8737182a-8d1b-4ca9-be9e-328a830d37df" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="228">Field</th><th>Description</th></tr></thead><tbody><tr><td>Page scoped user id</td><td><p>User ID Facebook of the recipient of the message</p><p>You can click <img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F4DvqLlwaRhhxki61RFel%2Fimage.png?alt=media&amp;token=9ad9c1c5-49e1-4ea7-a829-80b57fd4bf75" alt=""> icon to add Personalization<br><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F5xKolh0DPwUFW2IRVmvB%2Fimage.png?alt=media&amp;token=6e20183d-1f51-40f9-b6a3-a3c817b3c6fa" alt=""></p></td></tr><tr><td>Access token</td><td>Access token of your page on Facebook.</td></tr></tbody></table>

**Note: Currently, please share your page with us with the following permission: "Send and respond to message as the Page"**&#x20;

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FIe60zepUwXsbgf8hXPQD%2Fimage.png?alt=media&amp;token=9159bbd8-1ebb-45a0-b16f-7a7035527a9e" alt="" width="375"><figcaption></figcaption></figure>

**-> We will help you set up the necessary information in destination**

### V. Sending FB Messenger via Customer Journey

Log into **CDP 365** system, hover your mouse over **MARKETING** to see all the available channels.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FE2LcEU2APIMp7dzYWyx0%2Fimage.png?alt=media&amp;token=cd4bac6d-29b6-490d-9e86-e2bc466d06c0" alt=""><figcaption></figcaption></figure>

We have 2 channels that supporting to send:

* FB Messenger
* Journey Orchestration

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FlGWBjkKrDamERykUCAmM%2Fimage.png?alt=media&amp;token=d261aab6-957e-49fa-9f39-0756f6409302" alt=""><figcaption></figcaption></figure>

For this example, let's choose Orchestration

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fup1TN7OfSWykm6PXNqdX%2Fimage.png?alt=media&amp;token=036aaea1-51c4-4858-9ff4-6d6e2d0132fe" alt=""><figcaption></figcaption></figure>

At the Schedule trigger node, select the segment containing the Facebook user id that you created

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F6D7Tw756unaggzOAsEN5%2Fimage.png?alt=media&amp;token=da35947d-3679-40cb-a3ae-32f3d98ee22e" alt=""><figcaption></figcaption></figure>

Click **+** button to add Destination node and select **Antsomi Facebook** destination

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FZpNeNlOfvO4S3z5V0CFa%2Fimage.png?alt=media&amp;token=c4afd197-123b-499f-ab1a-12bd4a00cbb2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FOYe5TmJX0ijmrfxYOspa%2Fimage.png?alt=media&amp;token=6ee60041-3b47-42d7-843d-2937cfc1eda7" alt=""><figcaption></figcaption></figure>

Choose the destination that you created

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FoaKggf0bLUX2Q1w1uyar%2Fimage.png?alt=media&amp;token=498acda0-fef7-48e5-8633-64fc8f64e84e" alt=""><figcaption></figcaption></figure>

Fill out necessary information

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fejfs1WKbia6vdYU9qeWz%2Fimage.png?alt=media&amp;token=d82bfb8d-4dcf-4d7b-952c-b2f05fb9d78c" alt=""><figcaption></figcaption></figure>

Click **Save** button to finish setting journey

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FDMR5rImSDUw50nBfwZ20%2Fimage.png?alt=media&amp;token=d9f47e47-16b9-4e23-84d6-d393eca97cdc" alt=""><figcaption></figcaption></figure>

After finishing the setting of the Journey, we can **activate** and send message to customer


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.antsomi.com/cdp-365-user-guide-en/use-cases/marketing-hub/how-to-send-message-using-fb-messenger-in-cdp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
