TikTok / TikTok User Guide

TikTok User Guide

TikTok Shop as a marketplace operates as a standard selling platform with all its flows for product content creation and update, stock & price management and order management (including download, shipment, refund). TikTok Shop API is not currently connected and managing anything regarding the standard TikTok video content we are used to (meaning no programatic referring of products to videos for example).

TikTok Shop is a “listing” oriented platform - this means they are not catalogue and if there is the same product sold by multiple people it will appear as multiple listings

1.Account Set-up

TikTok uses standard OAuth authentication and we have a new table called Account TikTok. Similar like the Shopify Connector, we need to authorise our app on the TikTok account and for that we will need master access to the account.

  • Client email : This is the email where the link for authorizing the Hemi app in TikTok will be sent to.
  • Shop ID : This is the ID of the shop. This should be provided by the implementation manager
  • Integration : We pick TikTok as these are our app credentials.
  • Cancel Action Default : Per account we can set by default to Accept or Reject refund; Cancel Action Default works as a default action if we would like to automatically accept or reject all claims for the specific account. If is “Accept“ , by default we accept the refund, if is “Reject“ , by default we reject the refund. This is for pre-shipment cancellation
  • Return Action Default: Same as the cancel action default, we can set by default to Accept or Reject the refund, however this is for post-shipment cancellation.

NB! There is no need to set any default action, we can leave it blank and this means we will have the decision ot reject or accept the refunds per order.

  • OAuth Began : Will be raised to yes once the authorisation has started.
  • Refresh Token expiration date : This is filled automatically once we have completed the authorisation.
  • Use Sandbox: We can choose if it is lve enviroment or sandbox enviroment.

2.Products

TikTok shop allows us to create products, perform updates as full update, update price & update quantity, to deactivate product, to delete product, to recover product and reactivate the product.

2.1 Images Upload

When we are creating a product, we first need to upload it’s images as otherwise we cannot create the product. This is the first step. In order to upload the images, we need to have List/Update the Whole Item = Pending and Product Status = Awaiting Creation or Removed. We have a specific cron for that : cron_tiktok_102_images_upload.php

NB!: We will not pick product for creation, if images are not uploaded.

2.2 Product creation

After we have uploaded the images, the statuses should change to List/Update the Whole Item = Pending and Product Status was = Images Uploaded. The next step is for the cron_tiktok_100_listing_create.php cron to pick up the products for creation and send them to TikTok.

Once we successfully create a product, the statuses will change to:

Listing status= Inactive; Product Status = Product Created ; List/Update the Whole Item = Sent

If we receive an error, we will have List/Update the whole item = error and the error will be stored into Revise item error field and the statuses will be:

Listing status= Inactive; Product Status = Images Uploaded

Since we do not receive product status into the response for “Create Product“ call, we have introduced a get product status call (cron cron_tiktok_108_listing_status_download.php). The cron will run and update the statuses accordingly.

2.3 Product full update

After successfully listing the products, we can do full updates on them as well. There are a few cases : Case 1:

Product Status = Product Published ; Listing Status= Active; List / Update the whole item= Pending;

If update was successful, we will have following statuses:

Product Status =Product Published ; Listing Status= Active; List/ Update the whole item= Sent;

If we receive an error message, we will have following statuses:

Product Status = Product Published; Listing Status=Active; List / Update the whole item= Error;

Respective error will be stored in Update Item Error field;

Case 2:

Product Status = Product Created ; Listing Status=Inactive ; List / Update the whole item= Pending;

If update was successful, we will have following statuses:

Product Status = Product Created ; Listing Status=Inactive ; List / Update the whole item= Sent; (In order get product details cron to verify the statuses)

If we receive an error message, we will have following statuses:

Product Status = Product Created; Listing Status=Inactive; List / Update the whole item= Error;

Respective error will be stored in Update Item Error field;

Case 3: (For deletion variant)

Product Status = Product Published ; Listing Status= Active; Delete Variant= Yes;

If update was successful, we will have following statuses:

Product Status = Product Removed ; Listing Status= Inactive; + deletion of Channel Item ID, SKU_ID & GTIN value!

If we receive an error message, we will have following statuses and we need to store the error in Delete Variant Error field:

Product Status = Product Published ; Listing Status= Active ;

Case 4: (For adding variant!)

Product Status = Images Uploaded; Listing Status = Inactive; List / Update the whole item= Pending; + Channel Item ID to not be empty!

If update was successful, we will have following statuses: - Only to the new added variant!

Product Status = Product Created ; Listing Status=Inactive ; List / Update the whole item= Sent; (In order get product details cron to verify the statuses)

If we receive an error when adding variant, we will this error for every variants from the variation group BUT we do not change listing & product statuses to variants!

List / Update the whole item= Error; We will store the error in the respectively error field, which is Update Item Error field.

2.4 Price update

We are able to update the price when we have the following internal statuses:

Product status = Product Published; Listing Status = Active; Update price - Pending

If update was successful, we will have following statuses:

Product status -Product Published ; Listing Status -Active ; Update Price - Not Needed

If we receive an error, we will have:

Product status -Product Published ; Listing Status -Active ; Update Price - Error

2.5 Stock update

We can perform stock update, If we have following internal statuses:

Product status -Product Published; Listing Status - Active (if the product was ended, this status will be Inactive); **Update Quantity - Pending**

If update was successful, we will have following statuses:

Product status -Product Published ; Listing Status -Active ; Update Quantity - Not Needed

If we receive an error, we will have:

Product status -Product Published; ; Listing Status - Active Update Quantity - Error

We can use End listing to remove the whole listing & listing variants.

In order to delete a product, we should have following statuses:

Product Status - Product Published OR Product Created and End Listing = Yes.

After successful deleted item we set the statuses:

Product Status - Product Removed

3.Orders

Orders are being downloaded from TikTok via API.

Important : Each order will be downloaded on status Pending and it will stay on Pending for the first 1 hour. The reason for that is there is a grace period in which the buyer can cancel the order within 1 hour of creation. The idea of keeping the order on Pending is so that we dont export it and then it gets cancelled.

There is no modified orders cron.

  • Refunds
  • We support full,partial, returns,refunds from Hemi to TikTok. There are no specific reasons required for that.
  • Shipment

Order shipment is via the new shimpent model. We are using the table order_shipment where we create a row with shipping information. More info about the new shipment model can be found here .

  • Claims

(coming from TikTok to Hemi)

Per account we can set by default to Accept or Reject refund; In Account TikTok table can choose additional options which are Cancel Action Default & Return Action Default which will work as a default action if we would like to automatically accept or reject all claims for the specific account. If is “Accept“ , by default we accept the refund, if is “Reject“ , by default we reject the refund.

Claim type = Cancel

Claim type = Return

We are able to reject or to confirm refund via the claims table if there is no default action set in the TikTok Account.

4.Taxonomy

There is a taxonomy which needs to be downloaded and we have a cron for that. Taxonomy can be exported via the new taxonomy export model in table 200.

5.Additional details

Crons that are working at the moment :

Cron name Active Minutes Hours Days Months Days of the Week Crontab Line Path
Listing Create yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_100_listing_create.php
Images Upload yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_102_images_upload.php
Price Update yes */10 * * * * php74 /var/www/tiktok/bin/cron_tiktok_103_price_update.php
Stock Update yes */5 * * * * php74 /var/www/tiktok/bin/cron_tiktok_104_stock_update.php
Listing Activate yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_105_listing_activate.php
Listing Deactivate yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_106_listing_deactivate.php
Listing Delete yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_107_listing_delete.php
Listing Status Download yes */10 * * * * php74 /var/www/tiktok/bin/cron_tiktok_108_listing_status_download.php
Orders Ship yes */10 * * * * php74 /var/www/tiktok/bin/cron_tiktok_201_orders_ship.php
Couriers Download no * * * * * php74 /var/www/tiktok/bin/cron_tiktok_202_couriers_download.php
Download Taxonomy no 59 23 * * 6 php74 /var/www/tiktok/bin/cron_tiktok_300_download_taxonomy.php
Export Taxonomy no * * * * * php74 /var/www/tiktok/bin/cron_tiktok_301_export_taxonomy.php
Orders Download yes 1,11,21,31,41,51 * * * * php74 /var/www/tiktok/bin/cron_tiktok_200_orders_download.php
Orders Cancel yes /*5 * * * * php74 /var/www/tiktok/bin/cron_tiktok_203_orders_cancel.php
Claims Download yes */15 * * * * php74 /var/www/tiktok/bin/cron_tiktok_400_claims_download.php
Claims First Confirmation yes */5 * * * * php74 /var/www/tiktok/bin/cron_tiktok_401_claims_first_confirmation.php
Claims Reject yes */5 * * * * php74 /var/www/tiktok/bin/cron_tiktok_403_claims_reject.php
Claims Second Confirmation yes */5 * * * * php74 /var/www/tiktok/bin/cron_tiktok_402_claims_second_confirmation.php
Listing Update yes 2,12,22,32,42,52 * * * * php74 /var/www/tiktok/bin/cron_tiktok_101_listing_update.php
Is this article helpful?
0 0 0