# Magento 2 TikTok Integration

### <span style="color: rgb(59, 130, 246);">Installation and User Guide for Magento 2 Tiktok Integration Extension</span>

****Table of Contents****

1. [**Installation**](#bkmrk-installation)
    - **Installation via app/code**
    - **Installation via Composer**
2. [**Configuration Settings for Tiktok Integration**](#bkmrk-configuration-settin)
    - **General Settings**
    - **Integration**
    - **Product**
3. [**How to Test Products in Tiktok**](#bkmrk-installation)
4. [**How to place Order from Tiktok to Magento**](#bkmrk-installation)

### <span style="color: rgb(59, 130, 246);">Installation</span>

- ****Installation via app/code:****<span style="white-space: pre-wrap;"> Upload the content of the module to your root folder. This will not overwrite the existing Magento folder or files, only the new contents will be added. After the successful upload of the package, run below commands on Magento 2 root directory.</span>```php
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    
    ```
- ****Installation via Composer:****<span style="white-space: pre-wrap;"> Please follow the guide provided in the below link to complete the installation via composer.</span>

<p class="callout success">[https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer](https://docs.scommerce-mage.com/magento-2-extensions/installation-via-composer/installation-via-composer)</p>

### <span style="color: rgb(59, 130, 246);">Configuration Settings for Tiktok Integration</span>

<span style="white-space: pre-wrap;">Go to </span>****Admin &gt; Stores &gt; Configuration &gt; Scommerce Configuration &gt; Tiktok Integration****

#### <span style="color: rgb(249, 115, 22);">General Settings</span>

- ****Enabled –****<span style="white-space: pre-wrap;"> Select "Yes" or "No" to enable or disable the module.</span>
- ****License Key –****<span style="white-space: pre-wrap;"> Please add the license for the extension which is provided in the order confirmation email. Please note license keys are site URL specific. If you require license keys for dev/staging sites then please email us at </span><support@scommerce-mage.com>.

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/scaled-1680-/ZXZimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/ZXZimage.png)

#### <span style="color: rgb(249, 115, 22);">Integration</span>

- ****Environment –****<span style="white-space: pre-wrap;"> Please select either 'Developer' or 'Production' as the environment from the configuration settings.</span>
- ****App key -****<span style="white-space: pre-wrap;"> Please add the App key.</span>
- ****App Secret****<span style="white-space: pre-wrap;"> </span>****-****<span style="white-space: pre-wrap;"> Please add the App Secret.</span>
- ****Shop ID -****<span style="white-space: pre-wrap;"> Please add the Shop ID.</span>
- ****Warehouse ID -****<span style="white-space: pre-wrap;"> Please add the Warehouse ID.</span>
- ****Purge Log -****<span style="white-space: pre-wrap;"> Select either 'Yes' or 'No'. Choosing 'Yes' will enable the purging of log data from the database.</span>
- ****Retention Days -****<span style="white-space: pre-wrap;"> Please specify the number of days for which you would like to retain log data in the database.</span>
- ****Cron Job -****<span style="white-space: pre-wrap;"> This allows you to define a schedule for how often the logs should be purged.</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/scaled-1680-/KYVimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/KYVimage.png)

#### <span style="color: rgb(249, 115, 22);">Product</span>

- ****Width -****<span style="white-space: pre-wrap;"> Please select the attribute that will be used to define the width.</span>
- ****Length -****<span style="white-space: pre-wrap;"> Please select the attribute that will be used to define the length.</span>
- ****Height -****<span style="white-space: pre-wrap;"> Please select the attribute that will be used to define the height.</span>
- ****Unit System -****<span style="white-space: pre-wrap;"> Please select the unit system to be used for dimensions and weight. 'Imperial' refers to POUND and INCH, while 'Metric' refers to KILOGRAM (or GRAM) and CENTIMETER.</span>
- ****Weight in Gram****<span style="white-space: pre-wrap;"> - Select either 'Yes' or 'No'. If you choose 'Yes', the weight should be entered in grams. If you choose 'No', the weight should be entered in kilograms.</span>
- ****Source Code -****<span style="white-space: pre-wrap;"> Please enter the source code to synchronize stock with TikTok Shop, if Multi-Source Inventory (MSI) is enabled for your store.</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/scaled-1680-/XVcimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-10/XVcimage.png)

#### <span style="color: rgb(230, 126, 35);">****How to Create Products in Tiktok****</span>

To create products in TikTok, go to **App and Services &gt; Development Kits &gt; Development Shops &gt; Manage Accounts**

<span style="white-space: pre-wrap;"> </span>![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-ars49emi.png)

Click on Authorise app

<span style="white-space: pre-wrap;"> </span>![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-snw3mgwq.png)

Check the Catalogue &gt; click on Authorise

![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-93uj851b.png)

Click ok Confirm to install

![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-rfolncuc.png)

Check the terms and conditions block &gt; Click on Authorise

![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-tgt7cuye.png)

Navigate to **Admin &gt; Catalog &gt; Product &gt; Strive Shoulder Pack.** Select any product, click Edit, then go to the TikTok section and set the attribute 'Is TikTok product?' to 'Yes'

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/UL0image.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/UL0image.png)

Then, run the following command to import the product(s) on Tiktok:

```
php bin/magento scommerce:tiktok:createproducts
```

Once the product setup is complete, go to **TikTok &gt; Manage Accounts**, click Start Testing, and then select Manage Products as shown in the image below.

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/H7gimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/H7gimage.png)

<span data-teams="true">You can see the Joust Duffle Bag product is now created in Tiktok.</span><span data-teams="true">you can run the product command to show orders in Magento</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/Cyfimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/Cyfimage.png)


#### <span style="color: rgb(230, 126, 35);">**How to Update product in Tiktok**</span>

<span style="color: rgb(0, 0, 0);">Updated the quantity of the Joust Duffle Bag to 100 in the Admin panel.</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/fpeimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/fpeimage.png)

Then run the Tiktok Update product command on the server.

```
php bin/magento scommerce:tiktok:updateproducts
```

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/8Jmimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/8Jmimage.png)

Once the command is executed, the product quantity in TikTok is updated to 100.

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/ds2image.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/ds2image.png)

#### <span style="color: rgb(230, 126, 35);">****Create Orders in Tiktok and Import into Magento****</span>

To place an order from TikTok, go to **App and Services &gt; Development Kits &gt; Development Shops &gt; Manage Accounts**

![](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/embedded-image-ars49emi.png)

Click on Start Testing

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/13aimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/13aimage.png)Then Click on Test Order

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/opjimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/opjimage.png)

Select the product and shipping option, then click Submit. A new order will be created on TikTok.

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/COpimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/COpimage.png)

<span data-teams="true">Next, execute the order creation command to import orders into Magento.</span>

```
php bin/magento scommerce:tiktok:createorders
```

<span data-teams="true">TikTok orders are now imported in Magento, see the screenshot below.</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/mD3image.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/mD3image.png)


#### <span style="color: rgb(230, 126, 35);">**Tiktok API Logs**</span>

You can check the **Scommerce TikTok Logs** by navigating to **Admin &gt; System &gt; Scommerce TikTok API Logs &gt; Logs Table**

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/pJvimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/pJvimage.png)

[![image - 2025-11-28T190519.502.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/scaled-1680-/image-2025-11-28t190519-502.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-11/image-2025-11-28t190519-502.png)

#### **<span style="color: rgb(249, 115, 22);">Create Shipment in TikTok and Process Refund/Return</span>**

**Steps to Create a Shipment and Process Refunds**

1. Go to the TikTok Admin portal and create a shipment.
2. On the right side, open the Create Label dropdown and select Continue without combining. The shipment will be created.
3. If you request a refund after the shipment has been created, you must approve the refund from the Admin section and then submit the refund.
4. Finally, run the order update command. The order status will then be updated in Magento 2.

```
php bin/magento scommerce:tiktok:updateorders
```

<span style="white-space: pre-wrap;">[![image - 2025-12-17T155601.107.jpg](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-17t155601-107.jpg)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-17t155601-107.jpg)</span>

<span style="white-space: pre-wrap;">[![image - 2025-12-17T155629.864.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-17t155629-864.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-17t155629-864.png)</span>

<span style="white-space: pre-wrap;">[![image - 2025-12-17T155653.649.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-17t155653-649.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-17t155653-649.png)</span><span style="white-space: pre-wrap;">[![image - 2025-12-17T155714.897.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-17t155714-897.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-17t155714-897.png)</span>

[![image - 2025-12-01T133459.497.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-01t133459-497.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-01t133459-497.png)

<span style="white-space: pre-wrap;">[![image - 2025-12-01T133513.439.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-01t133513-439.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-01t133513-439.png)</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/ebIimage.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/ebIimage.png)

<span style="white-space: pre-wrap;">[![image - 2025-12-01T133829.561.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-01t133829-561.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-01t133829-561.png)</span>

<span style="white-space: pre-wrap;">[![image - 2025-12-01T133530.222.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image-2025-12-01t133530-222.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image-2025-12-01t133530-222.png)</span>

[![image.png](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/scaled-1680-/image.png)](https://docs.scommerce-mage.com/uploads/images/gallery/2025-12/image.png)

<span style="white-space: pre-wrap;">If you have a question related to this extension please check out our </span>[****FAQ Section****](https://www.scommerce-mage.com/magento-2-how-did-you-hear-about-us.html#customfaq)<span style="white-space: pre-wrap;"> first. If you can't find the answer you are looking for then please contact </span>[****support@scommerce-mage.com****](mailto:core@scommerce-mage.com)****.****