TikTok for SFCC: Order Management
Order Creation
- 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'.
- 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.

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.

Integration of OMS with TikTok Shop (Sending Order Updates to TikTok Shop via API):
- Retrieving Order Details: The Get Order Detail API is used to fetch the package_id essential for order processing.
- Identifying the Shipping Provider: The Get Shipping Provider API helps in obtaining the shipping_provider_id, crucial for specifying the logistics partner.
- 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.

Order Cancellation
Buyer-initiated Cancellation (within 1-hour pending period)
- TikTok allows buyers to cancel an order within an hour of its placement.
- 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.
- Throughout this pending period, the inventory corresponding to the order is decremented and reserved within the shop.

Buyer-initiated Cancellation (After 1-Hour Pending Period)
- 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.

TikTok-initiated Cancellation
- 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.

Seller-initiated Cancellation via Webhook or Order Feed
- 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.
- Options for updating order status in SFCC include:
- OMS sending event updates.
- SFCC pulling status from OMS.
- OMS exporting order status in batches.

Seller-initiated Cancellation via API
- 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.

内容整理自 TikTok Shop 官方学习中心,转载请注明出处。规则可能更新,以官方最新公告为准。
