> For the complete documentation index, see [llms.txt](https://docs.antsomi.com/cdp-365-user-guide/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/quick-start-guide/set-up-dataflows-to-push-data-to-google-and-facebook-audiences.md).

# Set up "Dataflows" to push data to "Google" and "Facebook" Audiences

1. Log into the **CDP** system, after logging in, click the menu in the left corner of the screen
2. Select the menu as follows: "**DATAFLOWS" -> "Data Destination"**&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FODxa6f3k8oT8ksFY9WVv%2Fimage.png?alt=media\&token=eb2b3989-7a9f-480b-b2ea-f484b3d5d1f6)

3\. On the "**Destination Channel"**, select the icon<img src="https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2Fg6KwofluWLrBmpLKpsWt%2F12.png?alt=media&amp;token=6e19c0e3-146f-41bb-8673-b5ad6c98501c" alt="" data-size="line">

![ ](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FxMRF4OwylgcWTUStE6Na%2Fimage.png?alt=media\&token=6254c447-3124-466c-b9a6-1e5b5dccac93)

4\. Select "**Facebook Audiences" or "Google Audiences"**

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FjNawcFVk7XvrkorL96iJ%2Fimage.png?alt=media\&token=32550687-a4f6-4f1b-a7bf-bc942aac0f4f)

5\. After clicking select, Authentication for account Google or Facebook

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FPSv2Ta0am0FGbfWQvhXw%2Fimage.png?alt=media\&token=078d0867-e6e9-4632-8b30-e547d9cabb55)

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FBuXzIoWeyxvsZccVbnvR%2Fimage.png?alt=media\&token=c4da1a4d-cc14-4a04-b5bf-fbe11cf30315)

6\. Input Name for **Destination**,  select an account&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2F5fcw7dKgClNKFckTmRjM%2Fimage.png?alt=media\&token=d0db4092-d130-41af-adbf-88ec5e03ff17)

7\. Click on "**Connect"**&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FX3ojLnDNGKalGwpkAkJj%2Fimage.png?alt=media\&token=737a0723-d04f-4411-9b4a-a52a9e7fb2b4)

8\. Switch to the **"DATAFLOWS"** Menu, click on "**Blank Dataflow"**&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2F6YVxCWUTxDp8UNXfjRMJ%2Fimage.png?alt=media\&token=a9c57730-03a1-4a86-a930-05c3af68ea9a)

9\. Select "**Data source".**&#x20;

Select the "Segment" Data Source that you created earlier

**NOTE: You can see how to create a Segment** **Datasource** [here](/cdp-365-user-guide/quick-start-guide/how-to-create-a-segment-data-source.md)

<figure><img src="https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FQ7MSheugWwb28NQ1HxPm%2Fimage.png?alt=media&amp;token=c8996234-0d03-4e97-b65e-0193c060ff0f" alt=""><figcaption></figcaption></figure>

After clicking "Create dataflow" button, you will be redirected to the create dataflow interface

Select the field that you want to push to "Google"/"Facebook audiences".&#x20;

Select Segment contains the customer data set that you want to push to "Google"/"Facebook audiences"

**NOTE: You can see how to create a new segment** [here](/cdp-365-user-guide/quick-start-guide/how-to-create-a-new-segment.md)

<figure><img src="https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2Fb6gV8pjERt4vsAiH4W9U%2Fimage.png?alt=media&amp;token=fe51a495-fdc8-4d84-89c4-f1652e48dddf" alt=""><figcaption></figcaption></figure>

10\. At the back of the data node, click "**add column"** node

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FVK3aWQjzhmsuDBSZallC%2Fimage.png?alt=media\&token=43341551-9c27-4593-94d8-17cf008607ae)

11\. For "**Email"** and "**Phone"** fields, encryption is required

* Sử dụng function "AUDIENCE\_ENCODE\_SHA256"
  * Example:&#x20;
    * AUDIENCE\_ENCODE\_SHA256(**Phone**)
    * AUDIENCE\_ENCODE\_SHA256(**Email**)

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FWL4GpY2eOo3Wr3jiVv5E%2Fimage.png?alt=media\&token=6af9d83a-c51c-44dd-a363-05891ef51e6e)

**NOTE:** The format of the phone number depends on the type of audience

* For GG Audience: "+" + Country Code + Phone Number

Example: +84932123212

* For FB Audience: Country Code + Phone Number

Example: 84932123212

* Note: Phone number must not have the first "0"
* If the case in your data phone number starts with "0", you can use the following function to remove the first "0"

<figure><img src="https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FJgADQFd8bTciFEagtoXh%2Fimage.png?alt=media&amp;token=14930c90-2410-4fdf-b3c8-f175fca65497" alt=""><figcaption></figcaption></figure>

12\. At the back of the node column; Select **"Destination channel" ->** Select "Facebook" or "Google audiences" connected in step 7&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2Fi4YcqRRoH1T0Qzc0tzRT%2Fimage.png?alt=media\&token=32d8d100-21b4-4cea-a193-426956eb0d72)

13\. Mapping the encrypted "**Email Hash"** and "**Phone Hash"** above with  destination column

<figure><img src="https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FqZ6RqsgfCELR4jUyUEqO%2Fimage.png?alt=media&amp;token=9ef1d580-51c8-47f7-8e1d-5026b8417882" alt=""><figcaption></figcaption></figure>

**Select Table**

* Create new audience: create new audience and push data into it
* Existing audience: push data into an existing audience

**Write Mode**

* Insert Only: Used to push new data to the audience
* Remove: Used to delete data that matches the uploaded data

14 Click on **Save** Button&#x20;

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FLhW785QXKOhbSiUSXBwD%2Fimage.png?alt=media\&token=6bba135e-f1d5-4953-adec-3ae65ffff996)

**REVIEW & TURN ON**

Used to view setup information in dataflows and setup execution time

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FPuqxVHZvrAoRlUhDKsJx%2Fimage.png?alt=media\&token=411e6e5f-43fa-4155-942f-48a89334f426)

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FfTc6Kk91HVwN45US0Ki7%2Fimage.png?alt=media\&token=f290c6ae-ed10-4d44-ac88-2157e6b4953d)

After clicking "**Turn on"**, the data changes status from "**Paused**" to "**Active**"

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FeahK42vIrIiNwlBsAmkq%2Fimage.png?alt=media\&token=4b33a923-7d6a-4e37-86f7-29f63de6fef8)

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

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2FBz4tj7BQ0yAsd0ebzjrf%2Fimage.png?alt=media\&token=2c4925f3-ea03-4c6b-accd-4bc28186aae8)

![](https://3576497809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmECwNqMNUmu6OXHSYgDv%2Fuploads%2F33hzupiLkkXPjHZoiL4F%2Fimage.png?alt=media\&token=c5888344-d91c-4d1e-914e-0ed83f059d82)
