Import
Read the shop's orders and products into this deployment's database, and keep the run's own numbers.
Webhooks
TikTok tells us the moment an order moves; the import stays as the fallback
Point TikTok's order-status webhook at https://demo.lomtur.com/tiktok/webhooks/tiktok. A signing secret is set, so every delivery is checked before it changes anything.
| Topic | Order | Outcome | What happened |
|---|---|---|---|
| ORDER_STATUS_CHANGE | 5779932001182990333 | applied | Order 5779932001182990333 now reads DELIVERED with USPS 9400111899223197428490. |
| return.resolved | 5779932001183004567 | applied | RTN-88190 (LS-SOCK-3PK) closed as refunded in full |
| PRODUCT_UPDATE | — | ignored | No order event in this delivery (PRODUCT_UPDATE). |
| ORDER_STATUS_CHANGE | 9999999999999999999 | unknown-order | Order 9999999999999999999 is not imported here, so nothing was changed. Run an import to bring it in. |
| ORDER_STATUS_CHANGE | 5779932001182994810 | unchanged | The row already says exactly this. |
| ORDER_STATUS_CHANGE | 5779932001182994810 | applied | Order 5779932001182994810 now reads IN_TRANSIT with Royal Mail RM998877665GB. |
| refused | — | refused:401 | That signature does not match the body. |
| refused | — | refused:400 | That delivery is 1791100322 seconds old, past the window. |
Run an import
One press, one run, one row in the runs table below
The sample source is small and fixed: 12 orders and 14 products, read in full every time. A second run reports the rows as unchanged rather than writing them again.
What the source holds
Stated before the run, not after
Source: the labelled sample shop for preview.myshopify.com, authorized as preview-sample. Rows are the fixed sample this deployment ships, written into its own database exactly as a real import would be.
Import runs
Read back from the database, newest first
Rows written per run, oldest to newest. A grey bar is a run that wrote nothing.
26 rows across the last 7 runs
| Started | Kind | Source | Written | Updated | Skipped | Failed | Note |
|---|---|---|---|---|---|---|---|
| 27 Oct, 13:54 | Orders and products | Sample shop | 0 | 0 | 26 | 0 | — |
| 27 Oct, 13:54 | Orders and products | Sample shop | 0 | 5 | 21 | 0 | — |
| 25 Oct, 01:36 | Orders and products | Sample shop | 0 | 0 | 26 | 0 | — |
| 25 Oct, 01:14 | Orders and products | Sample shop | 0 | 2 | 24 | 0 | — |
| 24 Oct, 22:30 | Orders and products | Sample shop | 0 | 0 | 26 | 0 | — |
| 23 Oct, 09:21 | Orders and products | Sample shop | 0 | 0 | 26 | 0 | — |
| 23 Oct, 09:21 | Orders and products | Sample shop | 26 | 0 | 0 | 0 | — |