TikTok for SFCC: Order Management

Summary

  • One-line takeaway: TikTok Shop orders have a 1-hour hold, defined fulfillment updates, and multiple cancellation paths.
  • Core Value/Change: ① Orders auto-create in SFCC via CreateExternalOrder API ② initial status is New ③ payment uses SOCIAL_PAY
  • Actionable Steps: ① For fulfillment, get package_id ② fetch shipping_provider_id ③ call Ship Package API with tracking
  • Red Lines & Compliance: ① Buyers can cancel within 1 hour ② TikTok may cancel for fraud or 15-day no shipment ③ shipped orders may be tagged cancel after shipped
  • Immediate next action: Configure test safeguards in staging/development

Order Creation

  1. When you place an order in TikTok Shop, the system automatically activates the CreateExternalOrder API. This results in the creation of the order in SFCC, tagged with the status c_externalOrderStatus as 'New'.
  2. Initially, orders placed in TikTok Shop are put on hold. They undergo a mandatory 1-hour pending period before the orders proceed to creation in SFCC.
Important Configuration for Testing:
  • Ensure storefront protection is activated in both development and staging environments for a secure and accurate testing setup.
  • Turn off the Payment Capture function to avoid real payment transactions during testing.
  • Disable Order Confirmation Emails to prevent sending out automated emails during the testing phase.
TikTok Shop (TTS) handles the authorization and capture of payments in a manner akin to Afterpay, Quadpay, or financing integrations. A unique Payment Method ID, "SOCIAL_PAY," is designated in the Business Manager for this operation.
image

Order Fulfillment

Integration of OMS with SFCC (Sending Order Updates to TikTok Shop via Webhook or Order Feed):

  • Order Feed Generation in SFCC: Salesforce Commerce Cloud (SFCC) generates an order feed upon the placement of an order. This feed serves as a notification mechanism to alert TikTok Shop that a new order file is ready for collection.
  • File Retrieval and Upload: Upon receiving the alert, the designated file is picked up from the provided location and uploaded into TikTok Shop. This action ensures that order shipment and delivery statuses are accurately reflected within the TikTok app, including the dispatch of relevant emails to customers regarding their order's shipment and delivery.
Options for Updating Order Status in SFCC:
  • Event Updates from OMS: Recommended for its immediacy, the Order Management System (OMS) directly sends event updates to SFCC.
  • Status Pull from OMS by SFCC: SFCC can periodically query OMS to retrieve the latest order status updates.
  • Batch Export from OMS: OMS can also export order status information in batches, which SFCC then processes to update order statuses accordingly.
    image

Integration of OMS with TikTok Shop (Sending Order Updates to TikTok Shop via API):

  1. Retrieving Order Details: The Get Order Detail API is used to fetch the package_id essential for order processing.
  2. Identifying the Shipping Provider: The Get Shipping Provider API helps in obtaining the shipping_provider_id, crucial for specifying the logistics partner.
  3. Shipping Package: Finally, the Ship Package API is called with the package_id, tracking_number, and shipping_provider_id to officially mark the package as shipped, completing the order fulfillment process.
    image

Order Cancellation

Buyer-initiated Cancellation (within 1-hour pending period)

  1. TikTok allows buyers to cancel an order within an hour of its placement.
  2. During this hour, all orders are held in TikTok Shop. If there is no cancellation from the buyer (or seller) within this timeframe, the order is then forwarded to SFCC.
  3. Throughout this pending period, the inventory corresponding to the order is decremented and reserved within the shop.
    image

Buyer-initiated Cancellation (After 1-Hour Pending Period)

  1. If an order is canceled after the remorse period, TikTok Shop will utilize the GetOrder API to verify the current status of the order.
    • If the order has not been shipped and the seller accepts the cancellation request, TikTok Shop will use the Patch/Order API to change the c_externalOrderStatus to 'CANCELLED'.
    • If the order has already been shipped or if the cancellation request is rejected by the seller, the order cancellation will not proceed in TikTok Shop.
      image

TikTok-initiated Cancellation

  1. TikTok Shop initiates an order cancellation if the order is flagged for fraud or has not shipped within 15 days by using the GetOrder API to check the order's status.
    • If the order has not shipped, the Patch/Order API is called to set c_externalOrderStatus to 'CANCELLED'.
    • If the order has already been shipped, the Patch/Order API is still called to set c_externalOrderStatus to 'CANCELLED', but with an additional 'cancel after shipped' tag.
      image

Seller-initiated Cancellation via Webhook or Order Feed

  1. When the seller cancels an order, the OMS notifies SFCC, setting c_external_order_status to 'CANCELLED'. The order status in TikTok Shop is then updated accordingly through the order feed.
  2. Options for updating order status in SFCC include:
    • OMS sending event updates.
    • SFCC pulling status from OMS.
    • OMS exporting order status in batches.
      image

Seller-initiated Cancellation via API

  1. For cancellations initiated by the seller, the OMS communicates directly with TikTok Shop to update the order status via the fulfillment APIs.
    • The process involves calling the Cancel Order API.
      image