When customers browse your webshop, the stock quantity they see must reflect what you can actually ship. If it does not, you risk overselling and leaving orders unfulfilled. Tinx Connector solves this by publishing stock quantities from Business Central to your webshop. Depending on the setup, this can happen each time a relevant change occurs, such as a new purchase receipt or a new sales order.
By default, Tinx Connector synchronizes the on-hand quantity from Business Central. You can configure the calculation to account for committed quantities, safety stock thresholds, and multiple warehouse locations. The connector supports both simple quantity field mapping and custom formulas that calculate saleable quantity based on multiple Business Central fields.
Stock synchronization works similarly to price synchronization. You publish the stock information from Business Central to the webshop, but you don’t import the stock information from the webshop to Business Central. The webshop can affect the available stock quantities only through the imported orders. When a webshop order is converted into a sales order in Business Central, the stock is updated based on the sales order quantity.
Stock synchronization methods
This article describes three methods for synchronizing the stock quantity sent to your webshop. Each method suits different business requirements. Before you continue with the setup instructions, review the following descriptions and choose the method that best fits your needs. Then check the mapping of the appropriate message definitions and adjust it if necessary.
- Total quantity. Retrieve the value from the Quantity on Hand field on the Item Card page and publish it to the webshop. No calculation is applied. Use this method if your Business Central stock figures need no adjustment before being published to the webshop.
- Stock formula in mapping. Apply a formula directly in the message definition to calculate the quantity sent to the webshop. The formula runs each time the message is triggered. Use this method for straightforward adjustments, such as excluding quantities already committed to sales orders.
- Item Stock Calculation. Define a stock formula at the sales channel level. Real-time triggers or a job queue initialize the stock calculation. The calculation results appear on the Item Stock page. The message definition use the data on the page and updates stock quantities in your webshop. Use this method when you need to filter by location, set conditions, or handle scenarios that the message-level formula cannot support.
Both the total quantity and the stock formula in mapping require setup only on the message definition level. In both cases, events that lead to a change in stock lead to almost immediate synchronization of the new stock quantity to the webshop, as long as you set up appropriate triggers in the message definition.
On the other hand, Item Stock Calculation details are set up on the sales channel level. Due to the complexity of the calculations, the updated stock quantities are stored in a separate table. Whenever the table is updated, the appropriate message definition is triggered. It reads the updated stock quantities from that table and sends them to the webshop.
To enable inventory synchronization
The procedures in this article require that the appropriate synchronization dashboard and message definitions are running. Activate them depending on what you are going to achieve. For more information, see Running synchronization dashboards and activating message definitions.
The following tables show the synchronization dashboard and message definition for some of the webshops. The codes for other supported webshops follow the same pattern.
| Direction | Webshop | Synchronization dashboard | Message definition |
|---|---|---|---|
| Publish | WooCommerce | WOO-OUT-PRODUCTS | WOO-020 or WOO-021 |
| Magento | M2R_OUT_PRODUCTS or M2R_OUT_INVENTORY | M2R-020 or M2R-113 | |
| Shopify | GQL_OUT_STOCK | GQL-080 |
If you installed Tinx Connector from AppSource, note the default mapping. In Magento, the default mapping uses the total quantity method. In WooCommerce, the default mapping is based on the stock formula in the mapping method. In Shopify, it is based on the Item Stock Calculation method. You need to customize the mapping to calculate the stock in a way that is not supported by the default mapping. For more information, see Default mapping. While customizing the mapping, consider that Magento and Shopify have separate stock endpoints, whereas WooCommerce does not.
WOO-020 and M2R-020 are the message definitions used to create products in the webshop. The product update is a large message definition. You might want to use a separate synchronization dashboard with separate message definitions to avoid overloading the webshop with stock updates in that message. Therefore, in the default Magento mapping, you can use the M2R_OUT_INVENTORY synchronization dashboard and the corresponding message definitions, such as M2R-113, to synchronize stock quantities. You can apply a similar approach to the other webshops.
Total quantity
The total quantity method publishes the actual quantity available in Business Central, based on the Quantity on Hand field on the Item Card page. It uses only the mapping between that field and the appropriate webshop field. Examples of the webshop field include qty for Magento or stock_quantity for WooCommerce.
To review the total quantity mapping
The following procedure describes how to find the mapping related to the total quantity published to Magento.
Select Search (Alt+Q) in the upper-right corner, enter Synchronisation Dashboard List, and then choose the related link.
On the Synchronisation Dashboard List page, select M2R_OUT_PRODUCTS, and then choose the View action.
On the M2R_OUT_PRODUCTS synchronization dashboard, select M2R-020, and then choose the Message Definition action.
-
On the M2R-020 ∙ Create item in Magento page, on the Lines FastTab, select the line with the Table Name set to Item, and the Element Name field set to stock_item, and then choose the Fields action.
-
On the Message Line Field page, the mapping between the Inventory field in Business Central and the qty field in Magento is set up. The Inventory field is the Quantity on Hand field (field 68) on the Item Card page (table 27). If you are using the default mapping in Magento, no formula is applied to this field.
Stock formula in mapping
The stock formula in the mapping method, like the total quantity method, is also configured at the message definition level. However, it uses the formula each time the outbound message runs. The most common example of the formula is Inventory minus Quantity on Sales Order. The message definition is triggered whenever you create a document that directly impacts one of those two fields. Examples include posting a purchase receipt for an item that increases inventory, or creating a sales order that increases the Quantity on Sales Order. Tinx Connector uses the stock formula to calculate stock available for the webshop and publishes the appropriate quantity. The following screenshot shows the Inventory minus Quantity on Sales Order formula.
With this formula, Tinx Connector calculates the stock quantity sent to the webshop. It deducts the quantity already on sales orders from the quantity on hand. For example, if you create a sales order for 20 units of an item with 150 units in stock, the webshop shows an available quantity of 130. The update happens automatically whenever the message definition is triggered.
To review a stock formula applied to the mapping
The stock formula is part of the default mapping for some webshops, such as WooCommerce. The following procedure describes how to find the formula that is used by Tinx Connector to publish stock quantities to WooCommerce.
Select Search (Alt+Q) in the upper-right corner, enter Synchronisation Dashboard List, and then choose the related link.
On the Synchronisation Dashboard List page, select WOO-OUT-PRODUCTS, and then choose the View action.
-
On the WOO-OUT-PRODUCTS synchronization dashboard, select WOO-020, and then choose the Message Definition action.
In WooCommerce, the WOO-020 message definition applies if you use a single sales channel. If you have multiple sales channels, WOO-021 is applicable. However, in the default mapping, WOO-021 does not contain the stock formula.
-
On the WOO-020 ∙ Create item in WooCommerce page, on the Lines FastTab, select the line with the Table Name field set to Item and Element Name field set to products, and then choose the Fields action.
-
On the Message Line Field page, select the line with the stock_quantity value in the Webshop Field V2 field, and then on the action bar, in the Field group, choose the Formula action.
stock_quantity is the value applicable to WooCommerce mapping. For other webshops, look for values such as quantity or qty.
On the Formula Field Calculation page, find the formula used by Tinx Connector to calculate stock that is available for WooCommerce. If you are using the default mapping, this is the Inventory minus Qty. on Sales Order formula described earlier in this section. You can adjust the stock formula by adding more parameters or conditions.
-
Return to the WOO-OUT-PRODUCTS synchronization dashboard, select the line with the Document No. set to WOO-020 and the Description set to Update item in WooCommerce, and then select the Event / Triggers action.
-
On the Events / Triggers page, review the events that trigger the product update message. Sales Line and Item Ledger Entry are directly related to the stock quantities. In this example, each posting to Item Ledger Entry triggers the WOO-020 message definition. This leads to the update of stock quantities in the webshop.
You can apply the same events and triggers to the total quantity method.
To configure out-of-stock settings for a webshop item
In Tinx Connector, you can set a safety margin for each item that is published to the webshop. You can also decide whether to allow backorders for out-of-stock items.
Select Search (Alt+Q) in the upper-right corner, enter Webshop Item List, and then choose the related link.
On the Webshop Item List page, select the relevant item, and then on the action bar, in the Webshop group, choose the Web Extension action.
-
On the Web Item Extension page, on the General FastTab, in the Backorders field, select one of the following options. These options control what happens when the item is out of stock.
Option Description No Backorders Customers cannot place orders for out-of-stock items. Allow Qty Below 0 Customers can place an order even when stock is zero or negative, creating a backorder. Allow Qty Below 0 and Notify Customer Similar to Allow Qty Below 0, however, the webshop also notifies the customer that the item is on backorder. -
In the Out Of Stock Level field, enter a safety margin quantity.
When the calculated available stock falls to or below this value, the item is treated as out of stock in the webshop. For example, if you set this field to 10 and your calculated stock is 20, the quantity available for the webshop remains 20. However, when the calculated stock falls to 5, the quantity available for the webshop is 0.
You must add the Out Of Stock Level to the mapping for the stock formula method or Item Stock Calculation method to take effect. For more information on how to add it to the Item Stock Calculation, see To add the out-of-stock level to the stock formula.
Item Stock Calculation
Use the Item Stock Calculation method when you need to expand beyond the standard formula capabilities. You need Item Stock Calculation when you want to:
- Run multiple stock calculations at the same time.
- Filter based on specific locations, including multiple locations.
- Set conditions that must be met before stock is sent, including conditions based on other tables, such as the attributes table.
- Filter based on variants or unit of measure.
- Check whether the item is an assembly item.
In the total quantity and stock formulas in mapping methods, stock quantities are not stored separately in Tinx Connector. The connector retrieves the necessary data from Business Central and calculates the stock quantities on the fly each time the message is triggered. Due to the complexity of the calculations in the Item Stock Calculation method, the calculated stock is stored in a separate table in Tinx Connector. Then the message definition retrieves the stock quantities from that table and sends them to the webshop.
Follow these steps to set up Item Stock Calculation.
- Enable the Item Stock Calculation feature.
- Create a stock formula in a sales channel.
- Update the mapping.
- Launch stock calculation.
Item Stock Calculation is available in two versions in Tinx Connector.
- The new logic, which is based on the TINX Item Stock table 11205970, and TINX Item Stock Calculation codeunit 11205970.
- The legacy logic, which is based on the TINX Item Location Stock V2 table 11205354 and the TINX Item Stock report 11205302. This legacy logic is still used by some companies.
The following steps describe the new logic, which is more advanced and recommended for new implementations.
To enable the Item Stock Calculation feature
-
Select Search (Alt+Q) in the upper-right corner, enter Tinx Feature Management, and then choose the related link.
If you don’t find Tinx Feature Management in Search, sign in to Business Central with the TINX E-Com Admin role. Then on the Role Center page, select Setup, and then choose Tinx Feature Management.
-
On the Features page, select the Feature: Use new functionality for Item Stock Calculation line, and then choose the Enable action.
-
To set up the triggers for the stock calculation, select the Setup action.
The following screenshot shows the Item Stock Calculation Setup page with the available triggers. In each case, Tinx Connector runs a codeunit for one item. This may occur after each posting to Item Ledger Entry or after adding a new quantity to the sales order.
To create a stock formula in a sales channel
Select Search (Alt+Q) in the upper-right corner, enter Sales Channels, and then choose the related link.
Select the relevant sales channel, and then choose Edit.
-
On the Sales Channel Card page, on the action bar, in the Sales Channel group, choose the Stock Formula action.
Both the Stock formula in mapping and Item Stock Calculation methods use the stock formula to calculate stock. The difference is that in the first case, you add the stock formula to the mapping. In the Item Stock Calculation method, the stock formula is applied on the Sales Channel page.
On the Stock Formula page, choose New.
Enter a Formula code and a Description.
-
In the Qty. Field column, select the quantity field that will contain the stock calculation result.
In most cases, select Qty. 1. You need additional fields, such as Qty. 2 and Qty. 3 if you want to calculate stock quantities for different locations. In such cases, set up a separate formula for each location, and then select the appropriate quantity field for each formula. You might need to have different quantity fields if you have the locations in your webshop, which is possible in Shopify, for example. With this setup, the webshop order includes the shipping location.
Set the Rounding Method field.
To open the formula field configuration, select the formula row, and then on the action bar, in the Setup group, choose the Formula action.
-
On the Formula Field Calculation page, set up the fields used in the stock quantity calculation. In the Action field, define the mathematical operation used to calculate stock.
The following screenshot shows the default formula using two rows from the Item page (table 27). According to this formula, the stock available for the webshop is calculated as Quantity on Hand (field 68) minus Qty. on Sales Order (field 85).
On the Formula Field Calculation page, select the first row of the newly created formula, and then choose the Links action.
-
On the Formula Field Links page, configure the link between the table used on the Formula Field Calculation page and the TINX Product table.
The following screenshot illustrates a link between the Item and TINX Product tables.
The link is required to ensure that the calculations are accurate. The stock calculation loops through the Webshop Products page, which shows the TINX Product table 11205274. It does not loop through the Item page, which shows table 27. The quantity fields that you defined in the formula are calculated fields on the Item page (table 27). Examples include Quantity on Hand (field 68) and Qty. on Sales Order (field 85). They return a value only when evaluated in the context of a specific item record. The link instructs the connector which item record to use for each record on the Webshop Products page (TINX Product table 11205274). This way, the quantity fields can be resolved correctly.
The TINX Product table 11205274 is the most commonly used option. You can also select the TINX Item by Sales Channel table 11205331. Use that option only if you send only outbound products, and you don’t have products on the Webshop Products page (TINX Product table 11205274).
Repeat the previous two steps for the remaining rows on the Formula Field Calculation page.
To calculate stock for a specific Business Central location, on the Formula Field Calculation page, choose the Setup action.
-
On the Formula Field Setup page, add a row with Field No. set to 67 (Location Filter). Then enter the location code in the Filter Value field. You can set the location filter to apply to only one line in the formula if that’s what you want to achieve. However, in most cases, you add the same location to all lines.
- Location is used as a filter in this step, so you don’t need to set up a parent table.
- If you want to calculate stock for multiple locations, create multiple formulas with different location filters.
- You can also set up a location in the Location Tag field on the Stock Formula page. The Location Tag is used only as a primary key, as opposed to the location filter used for the calculation.
You can define when a formula (and stock) is used and sent to the webshop. To do that, return to the Stock Formula page and select the formula row. Then, in the Setup group of the action bar, choose the Conditions action.
In this procedure, you are adding the formula that is similar to what you can achieve with the stock formula in mapping. There are two other procedures in this article that build on top of this basic formula and add more advanced logic to the stock calculation. For more information, see To set up a stock formula for items with variants and units of measure and To add the out-of-stock level to the stock formula
To update the mapping for Item Stock Calculation
The following procedure describes how to add the Item Stock page (TINX Item Stock table 11205970) to the mapping. This step is required to send the stock quantities calculated by the Item Stock Calculation method to the webshop. The following steps are based on WooCommerce. However, the process is similar for other webshops.
[!INCLUDEmapping-alert]
Select Search (Alt+Q) in the upper-right corner, enter Synchronisation Dashboard List, and then choose the related link.
On the Synchronisation Dashboard List page, select WOO-OUT-PRODUCTS, and then choose the View action.
On the WOO-OUT-PRODUCTS synchronization dashboard, select WOO-020, and then choose the Message Definition action.
On the Message Definition page, on the Lines FastTab, in the new empty line select the assist edit button in the Table No. field. Then choose the TINX Item Stock table 11205970.
On the action bar, in the Line group, choose the Indent action.
-
Change the Element Name field to products.
The following screenshot shows the newly added line to the WOO-020 message definition.
To link the new line, on the action bar, in the Manage group, choose the Links action.
On the Document Line Link page, in Field No., select 2 (the Item No. field), and in Reference Field No., select 1 (the No. field).
Close the Document Line Link page to return to the Message Definition page, and then choose the Fields action.
On the Message Line Field page, in Field select 14 (the Stock Qty. 1 field), and in Webshop Field V2 enter stock_quantity. The stock_quantity value is required by WooCommerce to receive the stock information from Business Central.
Close the Message Line Field page to return to the Message Definition page, and then select
-
Select the line where the Table Name field is set to Item, and the Element Name field is set to products.
On the action bar, in the Manage group, choose the Fields action.
-
On the Message Line Field page, select the Ignore Field checkbox, for the stock_quantity line.
Tinx Connector uses the stock_quantity line on the 27 Item line in the WOO-020 message definition. This line sends stock quantities based on the total quantity or the stock formula in mapping methods. In this procedure, you add another line to the message definition to send stock quantities according to the Item Stock Calculation method. Therefore, you need to ignore the stock_quantity line on the 27 Item line. The field may appear differently on other webshops. Review the To review the Total quantity mapping to find the correct field for Magento.
Launching stock calculation
There are three ways to launch the stock calculation, which updates the stock quantities on the Item Stock page.
- Schedule regular calculations with the job queue.
- Manually run the stock calculation.
- Update stock with each new item ledger entry.
To set up the job queue entry for stock calculation
- Select Search (Alt+Q) in the upper-right corner, enter Job Queue Entries, and then choose the related link.
- On the Job Queue Entries page, select the TINX Item Stock Calculation entry (codeunit 11205970), and then choose the Set Status to Ready action. The job queue triggers stock calculations based on the formula(s) each time it runs.
To run the stock calculation manually
- Select Search (Alt+Q) in the upper-right corner, enter Sales Channels, and then choose the related link.
- On the Sales Channel List page, select the relevant sales channel, and then choose View.
- On the Sales Channel Card page, on the action bar, in the Sales Channel group, choose the Stock Formula action.
- On the Stock Formula page, on the action bar, in the Process group, choose the Calculate Stock action. If you have multiple formulas, the stock calculation runs for all of them.
- Review the stock calculation results. For more information, see To review the results of the stock calculation.
To enable Item Ledger Entry Stock Calculation
If you set up the stock formula on the sales channel and schedule the job queue, the stock movement doesn’t automatically trigger stock updates. You need to wait until the next job queue run to update your webshop, even if the quantities have already changed in Business Central. To enable automatic stock updates, you need the calculation triggered on each posting to Item Ledger Entry.
You can also achieve similar results with the Item Stock Calculation Setup available on the Tinx Feature Management page. There are options to trigger the stock calculation on each posting to Item Ledger Entry or in other situations. For more information, see To enable the Item Stock Calculation feature. However, the triggers available on the Item Stock Calculation Setup page are for the new logic based on the TINX Item Stock table 11205970. However, Item Ledger Entry Stock Calculation also supports the old logic based on the TINX Item Location Stock V2 table 11205354. Both the Item Stock Calculation Setup available on the Tinx Feature Management page and the Item Ledger Entry Stock Calculation toggle on the E-Commerce Integration Setup page are triggered by postings to Item Ledger Entry. The posting triggers the stock calculation, but it does not immediately send the updated stock information to the webshop. In the stock formula in the mapping method, you can also set up similar triggers on the Events / Triggers page. The difference is that those triggers are set up for the message definition. That’s why they trigger the message to send the stock information to the webshop right after posting to the Item Ledger Entry. For more information, see To review a stock formula applied to the mapping. The Item Ledger Entry Stock Calculation toggle does not impact the stock formula in the mapping method. It only applies to the Item Stock Calculation method.
The following procedure describes how to enable the Item Ledger Entry Stock Calculation.
-
Select Search (Alt+Q) in the upper-right corner, enter E-Commerce Integration Setup, and then choose the related link.
If you don’t find E-Commerce Integration Setup in Search, change your role in Business Central to TINX E-Com Admin. Then on the Role Center page, select Setup, and then choose E-Commerce Integration Setup.
-
On the E-commerce Setup page, on the Product Catalog Fast Tab, in the Stock Parameters section, turn on the Item Ledger Entry Stock Calculation toggle.
With this setup, each posting to Item Ledger Entry, whether positive or negative, triggers an update to the Item Stock page. The update triggers the synchronization to the webshop. You don’t need to set up the TINX Item Stock Calculation job queue to calculate changes. Stock formulas are taken into account while calculating the stock available for the webshop.
Item Ledger Entry Stock Calculation is a trigger to run the calculation. There is a separate report to run the stock calculation. This report is triggered for the product that is affected by the change to Item Ledger Entry. To manually run the report, on the Stock Formula page, in the action bar under the Process group, choose the Calculate Stock Filtered action. Then select the relevant item from the list.
To review the results of the stock calculation
The Item Stock Calculation can be triggered manually, by the job queue, or by item ledger entries. Regardless of the method, you can find the results on the Item Stock page.
If you have multiple sales channels, the Item Stock page for each sales channel may contain different items. The Stock Formula action on the Sales Channel Card page is associated with a single sales channel. So the stock formula always accounts only for the items for that sales channel.
- Select Search (Alt+Q) in the upper-right corner, enter Sales Channels, and then choose the related link.
- On the Sales Channel List page, select the relevant sales channel, and then choose View.
- On the Sales Channel Card page, on the action bar, in the Sales Channel group, choose the Stock Formula action.
- On the Stock Formula page, on the action bar, in the Navigation group, choose the Item Stock action. The Item Stock page contains the results of the stock calculation for the selected sales channel.
Advanced formulas in Item Stock Calculation
In the Stock formula in the mapping method, you can use only the fields from the Item table 27 to calculate stock. One of the advantages of the Item Stock Calculation method is that you can also use fields from other tables. The following procedures illustrate how to set up stock formulas that exceed the standard stock formula described earlier in this article. For more information, see To create a stock formula in a sales channel.
To set up a stock formula for items with variants and units of measure
If you sell items with different variants and units of measure, you need to calculate stock for each variant and unit of measure separately.
The following screenshot shows the item with two variants and two units of measure. In this case, PCS is the base unit of measure for that item, while the BOX contains 10 pieces. With such a configuration, you need four lines on the Webshop Products page for that item. The screenshot shows how these products appear in Business Central. On the webshop side, the same products are typically represented as a single SKU with different variants.
Before you begin, follow steps 1-12 of the stock formula in a sales channel procedure to create the standard stock formula. For more information, see To create a stock formula in a sales channel.
-
While still on the Formula Field Calculation page, select the first line of the formula, and then choose the Setup action.
-
On the Formula Field Setup page, add a row with Field No. set to 5424 (the Variant Filter field). In the Parent Table No. field, select 11205274 (the TINX Product table), and set the Parent Field No. to 14 (the Variant Code field).
Repeat steps 2 and 3 for the second line in the formula.
On the Formula Field Calculation page, add a third line to the formula. In the Table No. field, select 5404 (the Item Unit of Measure table). In the Parameter field, select 3 (the Qty. per Unit of Measure field).
Select the newly created line, and then choose the Links action.
-
On the Formula Field Links page, set two links.
- First line: set the Field No. field to 1 (the Item No. field). Set the Parent Table No. field to 11205274 (the TINX Product table). Set the Parent Field No. field to 2 (the Item No. field).
- Second line: set the Field No. field to 2 (the Code field). Set the Parent Table No. field to 11205274 (the TINX Product table). Set the Parent Field No. field to 36 (the Unit of Measure Code field).
-
Close the Formula Field Links page to return to the Formula Field Calculation page. For the second line in the formula, choose : (divide by) in the Action field.
The following screenshot shows the formula after the adjustments. The formula calculates the quantities for each variant, then divides the result by the unit of measure.
-
Follow the steps to manually run the stock calculation. For more information, see To run the stock calculation manually.
The following screenshot shows the result of the stock calculation for the item with two variants and two units of measure. With the new stock formula, you are not only providing the webshop with the stock quantities for different variants of the same product. You are also sending the correct quantities based on the unit of measure. This makes them visible to your customers without the need for separate calculations on the webshop side. In the following example, the total quantity of the BLACK variant is 520 pieces. This equals 52 boxes, taking into account the proportion between PCS and BOX units of measure for this item.
To add the out-of-stock level to the stock formula
Before you begin, follow the steps in the To set up a stock formula for items with variants and units of measure procedure to create a stock formula.
On the Formula Field Calculation page, select the last line of the formula (5404 Item Unit of Measure). Then choose the New action to add a new line above the last one.
In the new line, in the Table No. field, select 11205753 (the TINX Web Item Extension table). Then in the Parameter field, select 11 (the Out Of Stock Level field).
-
Select the second line, and change the Action field to - (minus). Then select the third line, and change the Action field to : (divide by). The following screenshot shows the formula after the adjustments.
On the Formula Field Calculation page, select the third line (11205753 TINX Web Item Extension), and then choose the Links action.
On the Formula Field Links page, set the Field No. field to 1 (the Item No. field). Set the Parent Table No. field to 11205274 (the TINX Product table). Set the Parent Field No. field to 2 (the Item No. field).
Process the stock calculation. For more information, see To run the stock calculation manually.
-
Review the stock calculation results on the Item Stock page to ensure that the stock levels are correctly updated. For more information, see To review the results of the stock calculation. The following screenshot shows the updated stock calculation results. The screenshot assumes that the Out Of Stock Level field for the item FRN-DSK-8101 is set to 10.
When using Shopify, see the following information.
For Shopify: Inventory Item ID required
When you use the Item stock formula for Shopify, the Inventory Item ID field must be populated on the Webshop Product page. Items without this ID have the stock calculated, but the quantities are skipped when stock is published to Shopify.
The following screenshot shows an example of the Item Stock page, where the AT-DC-CND-AMB item has the Inventory Item ID field left blank. The missing ID must be resolved to ensure the stock quantity is published to Shopify.
For Shopify: To review the message definition returning the Inventory Item ID
When you create or update a product in Shopify using the GQL-020 message definition, Tinx Connector sends the information to Shopify. Tinx Connector also retrieves information from Shopify. This includes Inventory Item ID. To review the list of fields retrieved by the GQL-020 message definition, select the TINX Item by Sales Channel line. Then select the Response Fields action on the GQL-020 message definition.
For Shopify: To download location IDs
Before you can send stock from Business Central to Shopify, Tinx Connector needs the Shopify location ID for each location in your Shopify webshop. Follow the steps in this procedure once during initial setup, and again whenever your Shopify webshop locations change.
Select Search (Alt+Q) in the upper-right corner, enter Synchronisation Dashboard List, and then choose the related link.
Select the GQL_IN_OTHER dashboard, and then choose the Edit action.
On the Lines FastTab, select the Active checkbox for the GQL-187 message definition.
Wait for the next job queue run if the GQL_IN_OTHER dashboard has the Processing Policy set to On Timer. Alternatively, on the action bar, in the Home group, choose the Process (F9) action.
To verify the download, open Synchronisation Ledger Entries and check that the new GQL-187 entry has the status Processed. Troubleshoot any errors if the status is different. For more information, see Check the synchronisation ledger entries.
-
Return to the GQL_IN_OTHER dashboard and clear the Active checkbox on the GQL-187 line.
Deactivate the locations message definition after each run. If left active, the next scheduled run overwrites the LOCATION ID conversion template and may add duplicate entries.
Select Search (Alt+Q) in the upper-right corner, enter Conversion List, and then choose the related link.
-
Open the LOCATION ID conversion template and verify the results.
Each Shopify location appears as a separate line. The BC Value is set to your sales channel code (for example, SHOPIFY). The Webshop Value is set to the Shopify location ID based on the downloaded data (for example, gid://shopify/Location/108406800769).
For more information, see Conversion templates.
Related information
Synchronize products
Synchronisation
dashboards
Synchronize attributes
Synchronize customers
Key concepts in Tinx
Connector
Troubleshooting checklist