> 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/dataflows/collect-data-from-tiktok-form-to-cdp-365.md).

# Collect data from TikTok Form to CDP 365

## I - Introduction

During your marketing journey, there will be time you want to enrich your customer data to better understand you audience and propose appropriate caring services. In order to do so, collecting leads through survey and form and then push to CDP 365 is significant.&#x20;

In this article, we will instruct step by step on how to connect with TikTok Form and collect data from it.

Before doing as instructions, there are some prerequisites you need to prepare:

* The TikTok Form that you created on TikTok ads. For example:

  <figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fz2c0O42hWuSaYxJolgTh%2Fimage.png?alt=media&amp;token=36bec507-07ec-4062-9bf2-d0dc738b10ce" alt=""><figcaption></figcaption></figure>
* The information of Event & Event Attributes or Business Objects & Attributes you want to sync the data to **CDP 365** with. For example:&#x20;
  * Submit Lead event with event attributes: Id, Name, Email, Lead Source & sync to BO Lead
  * BO Customers with attributes: Customer ID, Name, Email, Sex Gender, is Tiktok

{% hint style="info" %}
You can create a new attribute for the data to be sent to if the current ones don’t meet your requirements.&#x20;

See the article on how to create:

* Event attributes
* Attributes
  {% endhint %}

## II - DETAILS INSTRUCTION

In general, you will have to move through these steps:

[Step 1 - Create a Data Source](#step-1-create-a-data-source)

[Step 2 - Create a Data Destination (Optional)](#step-2-create-a-data-destination)

[Step 3 - Create a Data Flow](#step-3-create-a-dataflow)

***

### STEP 1 - Create a Data Source

A data source is where you get the data from. In this case, it’s the form distributed on Tiktok.

* Hover your mouse over **Data** >> Choose **Source**, then click on <img src="https://lh7-us.googleusercontent.com/Xq1LLeEiAeaUqN2qsHAcozvF3UslLWa0QilDN0RPmGij4wPP4_BWc-4stsmEl1Mjpyc25WLnbVPVYZLKBGpvaDTChG8Op0g84LXF6IvyEWUtyMqrLivmn-gZKZH0F6CExC_2_W7OzugX1dNaG67m95o" alt="" data-size="line"> and select the Realtime option.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fob3p7roR3JjBE5k3hWK0%2Fimage.png?alt=media&amp;token=50164e6e-cd6a-4187-a7e5-cd5c2421b729" alt=""><figcaption></figcaption></figure>

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F8qOZbQN4vL9GRvpLsJcL%2Fimage.png?alt=media&amp;token=d9e6a525-73b2-40e7-b50b-fba987571a3e" alt=""><figcaption></figcaption></figure>

* Select an account to be the owner of the Data Source (This only applies to accounts having Super Admin role).

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F8mCHxcRttzYwcCdVY78h%2Fimage.png?alt=media&amp;token=35ee7b60-5d39-4c0e-bf07-ca5f09871ba5" alt=""><figcaption></figcaption></figure>

* Select **TikTok Lead** as the connector. You can also name the data source.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FZbtTeh8TtvJAD43Zb1Qa%2Fimage.png?alt=media&amp;token=da82e21c-3ca2-4c08-9652-ef87f8424586" alt=""><figcaption></figcaption></figure>

* **Authenticate** your TikTok account for lead generation forms by signing in and clicking on **Confirm**.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FxXRW39d1rLke3eYiqkL2%2Fimage.png?alt=media&amp;token=e14c94e1-1c29-4280-a888-4a2404e59e50" alt=""><figcaption></figcaption></figure>

* Select the **owner account of the TikTok Form** in Ad Accounts -> click **Get Forms**.&#x20;

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FMpRL6vDmzy1VmqEZTWkg%2Fimage.png?alt=media&amp;token=cb90f790-f46c-4199-8f58-6e4169dd7d40" alt=""><figcaption></figcaption></figure>

Then select the TikTok form -> click on **Next**

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FvoJ1QxBSPxinycVhNpCq%2Fimage.png?alt=media&amp;token=cf874c4d-6887-45be-930b-7a7caa84dd27" alt=""><figcaption></figcaption></figure>

* &#x20;Go over to confirm the fields in the form that you want to sync data to CDP 365 -> click on **Next** to finish creating a data source.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FfUbEckojSoYjAJT32PfA%2Fimage.png?alt=media&amp;token=a9cc8b88-ec02-42bc-9601-2508ced73358" alt=""><figcaption></figcaption></figure>

Decide who you want to share this Data Source with, then click **Save**.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FoprLrLbpb7kVIpw32JQT%2Fimage.png?alt=media&amp;token=da4873c5-d451-4a45-a186-3cc35cd4d556" alt=""><figcaption></figcaption></figure>

### STEP 2 - Create a Data Destination

This step is optional because you could also create a Data Destination in a Dataflow. For Realtime Streaming flow, there are 2 types of Data Destinations will be used:

* Events Destination
* Business Objects Destination

### STEP 3 - Create a Dataflow

Every time an audience submit the form, the data will be captured and sent to CDP 365 in the real time, so the flow belongs to **Realtime Streaming** category

* Hover your mouse over Data >> Choose **Realtime Stream**

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FOi99WXsgcGEDPmJqT1vH%2Fimage.png?alt=media&amp;token=8da594e5-c82d-4c18-82a5-576232471d4d" alt=""><figcaption></figcaption></figure>

Click **+** button, choose **TikTok Lead** template, and click **Continue**

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FgIJ0YE8mXsKLnAdyFbAb%2Fimage.png?alt=media&amp;token=6b9e2630-9180-4bbf-ae47-b860593c1472" alt=""><figcaption></figcaption></figure>

* The interface of a Realtime Streaming dataflow is different from the Batch one, but at the end, it still provides the same functions, typically:

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F94r9mJ9PbyMeLEF57j5D%2Fimage.png?alt=media&amp;token=b09709cc-48f0-491e-8625-026121a0d623" alt=""><figcaption></figcaption></figure>

#### **1. Select the Data Source**

* Select a TikTok Lead Source that was created before to be the data input

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FcGaEdxiVVko5LhiwtwDh%2Fimage.png?alt=media&amp;token=45749f0f-5522-4027-9f6c-f42c7b598584" alt=""><figcaption></figcaption></figure>

#### 2. Select and adjust the Data Destination

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FLEAddC0NyeuQFyW8wjsX%2Fimage.png?alt=media&amp;token=ba04baf4-af21-4ff4-abc2-b2493a271d79" alt=""><figcaption></figcaption></figure>

#### **2.1 - Streaming Destination**

* Choose where your data would be pushed to. By default, there is one destination of Submit Lead event  with chosen Event Attributes, you could customize it according to your demand or create a new destination which can be another Event or Business Object by clicking on **Add Destination.**
* Depending on the option you choose, the pop-up will display the list of Data Destination accordingly. If you have not created the desired Data Destination before (In step 2), you could click the button + Create new Event Destination / + Create new Business Object Destination to make a new one. The steps you need to get through would be the same in Step 2 (<img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F9fsipiDSCfOsLC7YrJXj%2Fimage.png?alt=media&amp;token=e02d7b38-a030-4f42-b3c2-be32e3f6a7b1" alt="" data-size="line">)

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F5HIazbmMGCBhT4EKmfbb%2Fimage.png?alt=media&amp;token=57b4347a-c524-4a16-bc08-dc56a6a1ab5f" alt=""><figcaption></figcaption></figure>

#### 2.2 - Configure the chosen Data Destination

Depending on the type of Data Destination, the configuration fields will display accordingly, typically:

* <mark style="color:blue;">**Event Destinations**</mark>

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FkV3I8avvuByESyGUEQys%2Ftiktok%20form%20-%202.gif?alt=media&amp;token=2f8dbc2c-e205-4d3c-a7c8-3f95985aecf2" alt=""><figcaption></figcaption></figure>

* **Event Source:** Choose the Source where an event happened. To read more details about Event Source, click here
* **Event Name:** Choose the event you want to sync the data to. To read more details about Event, click here

-> After choosing the Event, it will appear a list of Event attributes & Business Objects that have been assigned to this event, so you could choose the objects you want and  map its attributes in [2.3 ](#2.3-mapping-the-attributes-on-cdp-365-with-the-column-on-tiktok)area

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fv6Yolf2Ry4MGMJOalLCt%2Fimage.png?alt=media&amp;token=973504f9-8ea1-46b4-abdb-3800bc96a7b4" alt=""><figcaption></figcaption></figure>

* <mark style="color:blue;">**Business Objects Destination**</mark>

  * **Business Objects:** Choose the Business Objects you want & map its attribute in [2.3](#2.3-mapping-the-attributes-on-cdp-365-with-the-column-on-tiktok) area

  <figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FcwblsAUVyF9zlhDKcNg1%2Ftiktok%20form%20-%201.gif?alt=media&amp;token=47e3aa1c-0dbc-4556-b82f-ce3ea890a5aa" alt=""><figcaption></figcaption></figure>

#### 2.3 - Map the attributes on CDP 365 with the column on TikTok

* Source column: The column from the data in the TikTok Form such as Form name, Ad id, etc and the information fields from the Form.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fyfzrk7QtBlboqqZuCGhW%2Fimage.png?alt=media&amp;token=b61b91f8-cdd9-4edd-b2ab-4bd50327c2c4" alt=""><figcaption></figcaption></figure>

* Hash: To choose whether the data be hashed to provided algorithms or not

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FfIQbV3Xy5HrGVLIscR41%2Fimage.png?alt=media&amp;token=b8c8f71f-0b2f-44db-8d4a-0263a99f34db" alt=""><figcaption></figcaption></figure>

* Destination column: The column which will receive the data&#x20;

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FeeWdh5VNe2STKVWhojhj%2Fimage.png?alt=media&amp;token=81ebf9a1-c151-464f-b928-b7ccd54f6e1c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Each Business Object has its own required fields, so make sure you add it and map Source Column with Destination Column. If not, the data could not be pushed to the Business Object.

For example: **Name** and **ID** are required fields for BO Lead, Visitor, Customer, please also add and map Source Column with Destination Column for ID.&#x20;
{% endhint %}

After mapping the column, it should look like this

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FEfp7gvAVrrVSXZ65NWf3%2Fimage.png?alt=media&amp;token=b92bd52d-9433-4f37-a4ff-f715b070645e" alt=""><figcaption></figcaption></figure>

#### 3. Functional buttons

<mark style="color:blue;">**Save & Turn on**</mark>

* Click **Save** to save the changes made in the dataflow
* Click **Activate** to actually run the dataflow and start to record the data

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fzv9Pa9WehOW1xRUsAXsP%2Fimage.png?alt=media&amp;token=75d7db10-0557-4e06-9a6b-c709c8839bdc" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Version History**</mark>

<mark style="color:blue;">**Bulk Process**</mark>

## III - INSPECTION

After having created the dataflow, you could test it by doing these following steps:

### Step 1 - Submit the TikTok Form

You could either submit the real form or make a demo by doing as below:

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FfdiyXb1QO4oi1eoyA1aD%2F2023-12-03_15-53-29.gif?alt=media&amp;token=aeaf1159-317d-4f3c-91ba-c768aa62dff7" alt=""><figcaption></figcaption></figure>

### Step 2 - Check on CDP 365 data

After submitting the form, the data will be immediately pushed to CDP 365, you could check on these 3 objects:

#### 1. Streaming Log

The running process of the dataflow you just created. If it were success, the data has been pushed to the desired destinations.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2F5OjGXI7sTHJE3CZZNIDu%2Fimage.png?alt=media&amp;token=7b8249b3-4823-468a-86b7-44bac750c403" alt=""><figcaption></figcaption></figure>

#### 2. Event

In the dataflow, if there were an **Event Destination**, you could go to **Event log** of that Event to check up.

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2FAxJ5T8yxV3nBrlRRLHo4%2Fimage.png?alt=media&amp;token=b6252c5e-cdd3-4093-8852-ad0d441d13de" alt=""><figcaption></figcaption></figure>

#### 3. Business Object

In the dataflow, if there were a **Business Object** Destination, you could go to **Data Table** tab of the specific Data Object

<figure><img src="https://826840553-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbtU4vFUxT5JkWYHePuoX%2Fuploads%2Fj4UvWNNIvasc7T4QMBv4%2Fimage.png?alt=media&amp;token=daa001fd-33c2-4a9a-a793-1ce72332c0dc" alt=""><figcaption></figcaption></figure>


---

# 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/dataflows/collect-data-from-tiktok-form-to-cdp-365.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.
