Integrate with TikTok via Webhook

📘

New!

You can now integrate with TikTok directly from Simon! Check it out here.

Overview

Simon is built on a data warehouse that stores historical and real-time data for you to activate in more personalized downstream orchestration. We layer this data into paid media audiences in TikTok for improved return on ad spend (ROAS), increased audience size, better conversion and more engagement.

Define and build audience segments in Simon and push them to TikTok for achieve more powerful:

Audience Targeting & Retargeting

  • Target, reach, and re-connect with the right audiences for your business while they are spending time on the farthest-reaching video ad channel, TikTok.
  • Measure these interactions and iterate on your campaign strategy to drive results and business growth on the backs of your brand’s most engaged consumers.
  • Define audiences by demographic and device and reach them based on interests and behaviors.

Audience Suppression

  • Effectively allocate ad spend by deprioritizing stale and disengaged segments and prioritizing strategic and/or high value cohorts.

Lookalike Modeling

  • Efficiently grow beyond your existing customers with automated targeting and expansion of similar cohorts.

Why add video to your conversations with customers? Use TikTok to:

  • Engage with the right customers that will help grow your business
  • Start conversations with new customers and customers like the ones you already have
  • Inform future iterations of your current campaigns or plan for entirely new campaigns

Other common uses:

  • Push real-time, actionable data to TikTok to increase conversion and engagement rates
  • Use Simon to combine data from all sources and gain a single view of the customer then send that data to TikTok without any custom development required
  • With Simon, you can understand your customer better. Activate that understanding and better reach that customer via TikTok
  • Better activate audience segments in paid media without leaving Simon

📘

Ready to get started?

The process to integrate happens in four steps:

  1. Register as a developer and create a developer account with TikTok.
  2. Get authorization from advertisers.
  3. Get a long term access code for authentication.
  4. Configure a webhook call using the Webhook Channel Action.

🚧

New To Webhooks?

New to webhooks entirely, at Simon, or just need a refresher on concepts and terms? Start in the Outbound Webhooks Guide before returning to these instructions. You must be familiar with how to set up a webhook in Simon before you use this guide.

Before You Begin

Relevant Guides

Review our guides: Outbound Webhooks and Make a Webhook Call for details on how to call webhooks from Simon. This guide will outline steps to integrate with TikTok via webhooks, but you first need to understand how to call a webhook from Simon.

Review TikTok Documentation:

Pre-requisites

  • You need some knowledge of how to read an API reference, create a TikTok developer account and call a webhook from Simon. If you need help at any point, feel free to contact your account manager for support.
  • A TikTok Business Account
  • You or your account manager allowed the TikTok domain, business-api.tiktok.com . See Outbound Webhooks for details.

Complete the Integration

1. Register as a developer and create a developer account with TikTok.

  1. Within your business account, you need to register as a Developer. This process can take a few days to complete because there is a review. You need this so the data you send can be identified by TikTok once you send it via webhook.
  2. Create a developer app, following the directions in the TikTok documentation. Follow application content required. Use these parameters:
ParameterValue
Application name[Your Company]-Simon App
App DescriptionLeverage the Segment API to programmatically manage and optimize customer audiences from Simon Data CDP.
Advertiser redirect urlYour website URL
Scope of permission
  • Audience Management (required)
  • Ad Account Management (suggested)

2. Get authorization

Get authorization from advertisers to manage their accounts on their behalf. You'll need to specify the permissions that you need for your application. TikTok process documentation is here.


3. Get a long-term access code for Authentication

Follow the TikTok guide here to get a long-term access code for authentication.

🚧

Long-term access code required

Though it's not required by TikTok, getting a long-term authorization code is required to call TikTok from Simon because without a long-term auth code, programmatic audience refreshes from Simon are not possible.

If you need support, contact your account manager and we will help.

  1. Use the tool of your choice (Postman, Pipedream, etc) to call TikTok’s auth endpoint to get a long-term auth code. You may need to get an engineer to help you with this. (Need a more detailed overview of Webhooks: terms and tools? Read our Outbound Webhook Guide.)
    1. Refer to the TikTok API reference for the URL you need.
    2. Make a POST call using the app_id, auth_code, and secret found in your TikTok developer app (created in step 1).
  2. Your access_token will be located in the response. Save this token in a safe location to be used in the Simon Webhook action.

Sample Response Including the Access Token:

 {  "code": 0,  "message": "OK",  "request_id": "202209081748570102450621912470BF5C", "data":
 {  "advertiser_ids": [],         "access_token": "xxxxxxxxxxxx",
 "scope": [             1, 3 ] } }

🚧

Audience name

When you're ready to create the audience to sync contacts to, contact your account manager with your desired audience name.


4. Create the Webhook Action

Follow the directions in the Outbound Webhook guides to learn how to create webhook calls from a flow or journey.

Use these parameters:

ParameterValue
URL<https://business-api.tiktok.com/open_api/v1.2/segment/mapping>

Note, confirm this URL in the TikTok API Reference.
Request MethodPOST
Payload EncodingJSON
HeadersKey: Access-Token
Value: long-term access token from step 3 above
Request TypeSingle
AuthenticationNo Authentication

Payload:

  • advertiser_ids: [Your advertiser ID]
    • Find this in your TikTok Business account, top right corner.
    • From the drop-down, choose type list
  • data
    • From the drop-down, chose type dictionary
    • Paste this value (hover over the code box below then click the notepad icon in the top right corner to quickly copy):
[
    {
      "id": "{%- if contact.email_address -%}{{ hash(contact.email_address, 'SHA256') }}{%- endif -%}",
      "id_type": "EMAIL_SHA256",
      "audiences": [insert_audience_id_here]
    }
  ]

Find your audience ID in the custom audience dashboard in TikTok. Copy and paste the data payload above into the webhook call using the content editor option:

Email Specifications for TikTok

Assuming an email address is generalized to this format: [email protected] (example)

  • Remove + and any characters following the '+' symbol until '@'. After normalization, the above example will be: [email protected]
  • Remove all possible . within the username before @. After normalization, the above example will be: [email protected].
  • Email addresses need to be lowercased before hashing.