Skip to main content

(27) Inventory status change

1. Trigger scenario

This webhook will be triggered in either of the following situations:

  • The current_inventory_status has dropped to LOW_STOCK / OUT_OF_STOCK.
  • TikTok Shop predicts the available_quantity will drop to 0 in X days.

Note: The value of X can be system-configured or manually set by the seller.

2. Data business parameters

Parameter nameData typeSampleDescription
typeint27The ID of this webhook topic, which is 27.
tts_notification_idstring"7327112393057371910"The ID of this webhook notification.
shop_idstring"7494049642642441621"The shop ID.
timestampint1644412885The time when this webhook is triggered. Unix timestamp.
dataobject
└ product_idstring"732357708734418520388"The ID of the product.
└ sku_idstring"73235770873441823254"The ID of the SKU.
└ trigger_reasonobject
└└ alert_typestring"PREDICTION"PREDICTION: TikTok Shop predicts the inventory will go out of stock in X days REALTIME: The inventory has reached LOW_STOCK or OUT_OF_STOCK
└└ lead_daysint21When alert_type == PREDICTION, the value is the time slot between update_time and the predicted out-of-stock date. When alert_type == REALTIME, the parameter is not returned.
└└ low_stock_thresholdint0When alert_type == REALTIME, the value is the low stock threshold met. When alert_type == PREDICTION, the parameter is not returned.
└ current_inventory_statusstring"LOW_STOCK"SUFFICIENT_STOCK: defined as having enough stocks. LOW_STOCK: defined as available stock ≤ stock alert value OUT_OF_STOCK: defined as having 0 available stock.
└ inventory_distributionobject
└└ total_quantityint100The total quantity of the stock physically in the warehouses. total_quantity=available_quantity + creator_reserved_quantity + campaign_reserved_quantity + committed_quantity.
└└ available_quantityint50The total number of SKUs available for ordering in the warehouses.
└└ creator_reserved_quantityint20The total number of SKUs reserved for creators in the warehouses.
└└ campaign_reserved_quantityint20The total number of SKUs reserved for campaigns in the warehouses.
└└ committed_quantityint10The total number of SKUs reserved by existing customer orders in the warehouses.
└ update_timeint1627587600The time when the status changed, represented as a Unix timestamp (seconds).

Event example

JSONWord Wrap

{
"type": 27,
"tts_notification_id": "7327112393057371910",
"shop_id": "7494049642642441621",
"timestamp": 1644412885,
"data": {
"product_id": "732357708734418520388"
"sku_id": "73235770873441823254"
"trigger_reason": {
"alert_type": "PREDICTION",
"lead_days": 21
},
"current_inventory_status": "LOW_STOCK",
"inventory_distribution": {
"total_quantity": 100,
"available_quantity": 50,
"creator_reserved_quantity": 20,
"campaign_reserved_quantity": 20,
"committed_quantity": 10
},
"update_time": 1627587600
}
}