Connecting SFCC (Salesforce Commerce Cloud) to TikTok

Through Pipe17, TikTok Shop has the capacity to connect to a variety of systems. If you. would like to connect SFCC for Fulfillment with TikTok Shop, please read further.

 

In This Article

What we support

While we support a variety of flows for SFCC. When working in conjunction with TikTok Shop. The SFCC operates in what we call fulfillment mode. The flows we will be enabling are as follows:

  • Push Order to SFCC
  • Pull Products from SFCC
  • Pull Shipping Request from SFCC
  • Pull Fulfillment from SFCC
  • Pull Inventory from SFCC

We support canceling SFCC orders when canceled on TikTok.

 

Customer Matching

With ERP Connectors, we support the following matching

  • Use a generic customer for all orders
  • Match the customer by email, create it if it doesn't exist
  • Match the customer by email, use a generic customer if it doesn't exist
  • Match the customer by company name, create it if it doesn't exist
  • Match the customer by company name, use a generic if it doesn't exist
  • Match the customer by company name, then by email, use a generic as a fallback if nothing shows

Recommendation

For TikTok Shop, we recommend using one generic customer for all orders since buyer information isn't provided by TikTok Shop.

Connecting to SFCC

You will be required to add the SFCC Integration from the integrations list, as you would have done previously with TikTok Shop. Pipe17 does not use an SFCC Cartridge. We do this to ensure we can flexible schemas we support.

Here is the required information for the SFCC connection.

  • Short Code
    • Open up Administration
    • Click on Salesforce Commerce API Settings
    • Request Short Code
  • Organization ID
    • The organization ID is a short string that identifies a B2C Commerce instance. Each instance gets its own unique organization ID, such as f_ecom_zzte_053
  • Site ID
    • The site ID is the name of the site (sometimes called a “channel”) for which you want to access data. For example: RefArch or SiteGenesis.
  • B2C API Client ID
    • This is the client ID displayed under Account Manager -> API Client. See Reference 3.1
    • Please ensure this client has the Salesforce Commerce API role
    • Under OpenID Connect
      • Default Scopes:
        mail
        roles
        tenantFilter
        profile
        openId
      • Allowed Scopes:
        sfcc.orders.rw
        sfcc.catalogs.rw
        sfcc.inventory.impex-inventory.rw
        sfcc.inventory.availability.rw
        sfcc.inventory.reservations.rw
        sfcc.customerlists.rw
        sfcc.products.rw
      • Redirect URIs:
        any
      • Token Endpoint Auth Method:
        client_secret_post
      • Access Token Format:
        JWT
  • B2C API Client Password
    • Password assigned to the API Client
  • OCAPI Client ID
    • This is the client ID displayed under Account Manager -> API Client. See Reference 3.1
    • Please ensure this client has the Salesforce Commerce API role
    • Under OpenID Connect
      • Default Scopes:
        mail
        roles
        tenantFilter
        profile
        openId
      • Allowed Scopes:
        sfcc.orders.rw
        sfcc.catalogs.rw
        sfcc.inventory.impex-inventory.rw
        sfcc.inventory.availability.rw
        sfcc.inventory.reservations.rw
        sfcc.customerlists.rw
        sfcc.products.rw
      • Redirect URIs:
        any
      • Token Endpoint Auth Method:
        client_secret_post
      • Access Token Format:
        JWT
  • OCAPI Client Password
    • Password assigned to the API Client
  • Business Manager User Name
    • Your username
    • Roles required
      Order Management User
      Business Manager User
      API Administrator
  • Business Manager User Password
    • Your password

Configure for Open Commerce API Settings

  1. Go to Administration
  2. Click on Open Commerce API Settings
  3. This needs to apply to both Shop & Data
  4. Select the Context for the Site
  5. Input this:

  {"_v":"23.2","clients":[{"client_id":"{OCAPI ID}","resources":[{"methods":["get","post","put","patch","delete"],"read_attributes":"(**)","write_attributes":"(**)","resource_id":"/**"}]}]}
  

User Role Requirement

These are the roles required to be associated with the user for us to connect

  • Business Manager Administrator
  • Business Manager User
  • OCAPI Explorer Debug User
  • Order Management Administrator
  • Order Management User

 

Setup

Default Customer

With TikTok Shop, we don't get the actual buyer information. All SFCC order has to be associated with a customer object. A default customer should be created and configured within the settings to map TikTok Shop orders to this default customer via the Generic Customer Number.

Shipment Method

Shipment Method needs to be mapped across Pipe17 and SFCC. It should be configured on Orders to SFCC mapping to use a real value for shipments[0].shipping_method.id

Payment Method

When we record orders into SFCC, we need to associate it with a payment method. It is recommended to create a generic payment method within SFCC to associate all TikTok Shop orders to SFCC.

((sourcedoc) => {
return [{
"payment_method_id": 'TTS',
"amount": sourcedoc.payments[0].amount
}]
})(sourcedoc)

 

Reference

3.1

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Have more questions?
Submit a request
Share it, if you like it.