> ## Documentation Index
> Fetch the complete documentation index at: https://oneviewhub.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok for Business

> Understand how TikTok for Business works on OneView

export const RevokeAccessFAQ = ({platformName, oauthDashboardUrl, autoRevoke}) => {
  if (autoRevoke) {
    return <Accordion title={`Q: How do I revoke access to my ${platformName} data?`}>
        <Danger>
          Revoking access <strong>will stop OneView from sending conversions to your {platformName} account</strong>.
        </Danger>
        <p>
          You need to revoke access to your {platformName} data on both ends:
        </p>
  
        <ol>
          <li>
            <strong>From OneView</strong>: Navigate to <a href="https://oneviewhub.com/workspace/settings/ad-accounts">Ad Accounts settings</a> and disconnect your {platformName} account.
          </li>
          <li>
            <strong>From {platformName}</strong>: Use your dashboard at (<a href={oauthDashboardUrl}>{oauthDashboardUrl}</a>) and remove <strong>OneView Platform</strong> from your account.
          </li>
        </ol>
        <p>
      When you disconnect your {platformName} account from your OneView workspace, <strong>all credentials are deleted</strong> (on OneView) and <strong>access revocation is requested</strong> (to {platformName}) automatically on your behalf.
    </p>
      </Accordion>;
  }
  return <Accordion title={`Q: How do I revoke access to my ${platformName} data?`}>
      <Danger>
        Revoking access <strong>will stop OneView from sending conversions to your {platformName} account</strong>.
      </Danger>
      
      <p>
          You need to revoke access to your {platformName} data on both ends:
        </p>

      <ol>
        <li>
          <strong>From OneView</strong>: Navigate to <a href="https://oneviewhub.com/workspace/settings/ad-accounts">Ad Accounts settings</a> and disconnect your {platformName} account.
        </li>
        <li>
          <strong>From {platformName}</strong>: Use your dashboard at (<a href={oauthDashboardUrl}>{oauthDashboardUrl}</a>) and remove <strong>OneView Platform</strong> from your account.
        </li>
      </ol>
    </Accordion>;
};

export const IntegrationDataFields = ({platformName, clickIdentifiers, includeCommonFields = false}) => {
  return <>
      {clickIdentifiers && clickIdentifiers.length > 0 && <>
          <p>
            Click identifiers are automatically captured from URL parameters when users click on your {platformName} ads. When click identifiers are missing or expired, OneView uses <a href="/docs/platform/features/delivery/enhanced-conversions">Enhanced Conversions</a> with identifiers from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a> to maintain attribution accuracy.
          </p>
          {clickIdentifiers.map((identifier, index) => <ParamField key={index} path={identifier.name} type="string">
              <strong>{identifier.displayName || identifier.name}</strong> - {identifier.description}
            </ParamField>)}
        </>}

      {includeCommonFields && <>
          <ParamField path="conversion_date_time" type="string" required>
            <strong>Conversion Timestamp</strong> - The date and time when the conversion occurred.

            <p>
              OneView automatically converts timestamps to the timezone of your {platformName} account for accurate cross-dashboard reporting comparisons.
            </p>
          </ParamField>

          <ParamField path="transaction_id" type="string">
            <strong>Transaction ID</strong> - Unique identifier for idempotency and deduplication.

            <p>
              OneView automatically uses the <code>Idempotency-Key</code> of your event as the Event ID, or, if absent, generates a <Tooltip tip="The same payload will always generate the same Event ID.">deterministic</Tooltip> one based on the event payload.
            </p>
          </ParamField>

          <ParamField path="consent" type="object">
            <strong>Consent Information</strong> - Consent information for the conversion, using the <strong>Google Consent Mode</strong> framework.

            <p>
              OneView automatically sets consent information using the <strong>Google Consent Mode</strong> framework, with <code>ad_user_data</code> and <code>ad_personalization</code> values to enforce <a href="/docs/platform/compliance/consent">consent compliance</a>.
            </p>
          </ParamField>
        </>}
    </>;
};

export const IntegrationOverview = ({platformName}) => {
  return <>
      <p>
        {platformName} is configured as a <strong>Conversion API integration</strong> in OneView. OneView automatically sends <a href="/docs/platform/concepts/conversions">conversion data</a> to {platformName}'s API for campaign optimization.
      </p>

      <p>
        OneView automatically handles data mapping, <a href="/docs/platform/features/processing/merit-based-routing">routing rules</a>, and API communication with {platformName}. You simply need to select your <strong>Conversion Events</strong> on OneView, and OneView will take care of the rest.
      </p>
    </>;
};

export const IntegrationHero = ({logoSrc, alt = "Integration logo", maxHeight = 160}) => {
  const containerStyle = {
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center',
    width: '100%',
    height: '220px'
  };
  const imgStyle = {
    maxHeight: `${maxHeight}px`,
    maxWidth: '100%'
  };
  return <Frame>
      <div style={containerStyle}>
        <img noZoom src={logoSrc} alt={alt} style={imgStyle} />
      </div>
    </Frame>;
};

<IntegrationHero logoSrc="/assets/logos/integrations/TikTok.svg" alt="TikTok" />

<Tip>
  **Credentials** OneView lets you connect your TikTok account with OAuth, and will **automatically** handle all token updates for you in the background. You **are not** required to create a TikTok Ads app.

  To access this integration, you'll need a **TikTok for Business** account with appropriate access permissions.
</Tip>

<IntegrationOverview platformName="TikTok for Business" />

## What gets sent to TikTok for Business

<IntegrationDataFields
  platformName="TikTok for Business"
  clickIdentifiers={[
{
  name: 'ttclid',
  displayName: 'TikTok Click ID',
  description: 'Captured from URL parameters when users click on your TikTok ads and navigate to your website.'
}
]}
  includeCommonFields={true}
/>

### Conversion Details

<p>
  OneView automatically processes conversions through <a href="/docs/platform/features/processing/deduplication">deduplication</a> and <a href="/docs/platform/features/processing/merit-based-routing">attribution</a> before sending them to TikTok for Business.
</p>

<ParamField path="event" type="string" required>
  <strong>Event Type</strong> - The type of conversion event being sent to TikTok for Business.

  <Check>
    OneView automatically maps your conversion events to TikTok's event types based on your webhook configuration.
  </Check>
</ParamField>

<ParamField path="event_id" type="string" required>
  <strong>Event ID</strong> - Unique identifier for idempotency and deduplication.

  <Check>
    OneView automatically uses the <code>Idempotency-Key</code> of your event as the Event ID, or, if absent, generates a <Tooltip tip="The same payload will always generate the same Event ID.">deterministic</Tooltip> one based on the event payload.
  </Check>
</ParamField>

<ParamField path="event_time" type="integer" required>
  <strong>Event Timestamp</strong> - The Unix timestamp (in seconds) when the conversion occurred.

  <Check>
    OneView automatically converts timestamps to Unix timestamp format (seconds) for TikTok for Business API compatibility.
  </Check>
</ParamField>

<ParamField path="limited_data_use" type="boolean">
  <strong>Limited Data Use</strong> - Indicates whether the event should be processed with limited data use restrictions.

  <Check>
    OneView automatically sets this field based on your consent configuration. When <code>ad\_user\_data</code> consent is <code>GRANTED</code>, <code>limited\_data\_use</code> is set to <code>false</code>. Otherwise, it's set to <code>true</code> to comply with privacy regulations.
  </Check>
</ParamField>

<ParamField path="page.url" type="string" required>
  <strong>Page URL</strong> - The URL of the page where the conversion occurred.

  <Info>
    OneView automatically includes the page location from your event's session data.
  </Info>
</ParamField>

<ParamField path="user" type="object">
  <strong>User Information</strong> - User identifiers and browser information for enhanced matching and attribution.

  <Expandable title="User properties">
    <ParamField path="user.email" type="array">
      <strong>Email Address</strong> - Hashed email addresses for enhanced matching.

      <Check>
        OneView automatically includes hashed email addresses from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a> when:

        <ul>
          <li>PII handling mode is set to <code>hashed</code></li>
          <li>User consent for <code>ad\_user\_data</code> is <code>GRANTED</code></li>
        </ul>
      </Check>
    </ParamField>

    <ParamField path="user.external_id" type="array">
      <strong>External ID</strong> - Hashed customer IDs for enhanced matching.

      <Check>
        OneView automatically includes hashed customer IDs (SHA-256) from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a> when:

        <ul>
          <li>PII handling mode is set to <code>hashed</code></li>
          <li>User consent for <code>ad\_user\_data</code> is <code>GRANTED</code></li>
        </ul>
      </Check>
    </ParamField>

    <ParamField path="user.phone" type="array">
      <strong>Phone Number</strong> - Hashed phone numbers (E.164 format) for enhanced matching.

      <Check>
        OneView automatically includes hashed phone numbers (E.164 format) from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a> when:

        <ul>
          <li>PII handling mode is set to <code>hashed</code></li>
          <li>User consent for <code>ad\_user\_data</code> is <code>GRANTED</code></li>
        </ul>
      </Check>
    </ParamField>

    <ParamField path="user.ttclid" type="string">
      <strong>TikTok Click ID</strong> - The TikTok Click ID captured from URL parameters when users click on your TikTok ads.

      <Info>
        This identifier is automatically captured from the <code>ttclid</code> URL parameter and is used for attribution matching.
      </Info>
    </ParamField>

    <ParamField path="user.user_agent" type="string">
      <strong>User Agent</strong> - The browser user agent string from the conversion event.

      <Info>
        OneView automatically includes the user agent from your event's session data to help TikTok for Business with device and browser matching.
      </Info>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField path="event_source" type="string" required>
  <strong>Event Source</strong> - The source type of the event (e.g., <code>WEB</code>, <code>APP</code>).

  <Info>
    OneView automatically sets this based on your webhook configuration's event source type.
  </Info>
</ParamField>

<ParamField path="event_source_id" type="string" required>
  <strong>Event Source ID</strong> - Your TikTok Pixel ID.

  <Info>
    OneView automatically uses the pixel ID from your webhook configuration.
  </Info>
</ParamField>

<IntegrationProcessing platformName="TikTok for Business" />

## TikTok for Business-Specific Details

### Enhanced Conversions

<Info>
  TikTok for Business supports enhanced conversions using hashed PII (email, phone, external ID) for better matching and attribution. OneView automatically includes these identifiers when:

  <ul>
    <li>PII handling mode is set to <code>hashed</code></li>
    <li>User consent for <code>ad\_user\_data</code> is <code>GRANTED</code></li>
    <li>Identifiers are available from your <a href="/docs/platform/features/processing/identity-resolution">Identity Graph</a></li>
  </ul>
</Info>

### Consent and Privacy

<Warning>
  Make sure you align your **Privacy Policy** to ensure regulatory compliance concerning the re-identification of users when using enhanced conversions.
</Warning>

<Info>
  OneView automatically enforces consent compliance by setting <code>limited\_data\_use</code> based on your consent configuration. When consent is not granted, TikTok for Business will process the event with limited data use restrictions.
</Info>

## Troubleshooting

<AccordionGroup>
  <RevokeAccessFAQ platformName="TikTok for Business" oauthDashboardUrl="https://ads.tiktok.com/ac/page/authorizations" />
</AccordionGroup>
