To view this content in our official product documentation, click here.
Introduction
A SuiteQL query looks for inventory level changes in NetSuite, and retrieves items that have had quantity updates within a given lookback period. This data is batched, mapped, and cached for later use.
The lookback date is calculated by referencing `datefrom` and `dateto` flow variables in `TO_IMESTAMP` functions at the end of the query.
Next, a script extracts all unique SKUs from this data and builds a query string that can be used to look up these products in Shopify. The data is then filtered and appended to the existing cache.
Having retrieved inventory data from Shopify, cached data is loaded back into the flow. A script then runs, comparing NetSuite inventory items against Shopify’s inventory data, to determine any quantities that need updating (i.e. Delta values).
This flow is designed to handle multiple locations - additional branches can be added if required.
Limitations
There are no limitations to note for this flow.
Assumptions
There are no assumptions to note for this flow.
Customisation
To ensure that this process flow runs as required, some customisation options are available. These are documented in the following sections:
Flow variables
The table below summarises flow variables defined for this process flow.
| Flow variable | Summary | Default value |
|---|---|---|
datenow |
Set the relative time period to start looking for updated inventory items in NetSuite. Update the default value as required. | +0 minutes |
datefrom |
Set the relative time period to look back for updated inventory items in NetSuite. Update the default value as required. | -30 days |
For information on working with flow variables, please refer to our flow variables documentation.
Process flow shapes
This process flow includes some shapes that can be configured with your own settings. Please see guidelines in the table below.
{% hint style="warning" %} Shape settings determine the outcome of process flows. Do not change shape settings unless they are listed below. {% endhint %}
| Shape | Notes |
|---|---|
| Trigger |
The default setting is to run every 10 minutes (recommended) but you can change the schedule if required.
Keep in mind that the NetSuite connector includes a query that retrieves items updated within a given lookback period (based on the value of the |
| Connector (NetSuite) | If you did not add or select a NetSuite instance during the blueprint installation process, the following settings must be configured:Source instance : Set to your required NetSuite instance.Source endpoint : Set to POST suiteQLQuery : Leave as it defaults. This variable references your datenow and datefrom flow variables to determine the lookback period for updated items. Make sure these flow variables are set as required. |
| Connector (Shopify) | If you did not add or select a Shopify instance during the blueprint installation process, the following settings must be configured:Source instance : Set to your required Shopify instance.Source endpoint : Set to POST Retrieve inventory data by graphql
|
| Split | The level to split value must be updated with the name of your NetSuite warehouse location (exactly as it appears in NetSuite). |
| Connector (Shopify) |
If you did not add or select a Shopify instance during the blueprint installation process, the following settings must be configured:
|
Branching for multiple locations
If you need to update this flow to handle multiple locations, you can do so as follows:
{% stepper %} {% step %} Add a branch shape
Add a branch shape immediately after the second script shape - for example:

All subsequent shapes are moved to the first branch and a second branch is added. If required, add more branches. {% endstep %}
{% step %} Replicate first branch shapes in new branches
Add all shapes found in the first branch to each new branch, with the same configuration.
{% endstep %}
{% step %} Update split shapes
On every branch (including the first one), edit the split shape. Here, change the level to split field to the name of a warehouse location (exactly as it appears in NetSuite). For example:

This location name is passed into the subsequent script, so the remaining flow processes for this location {% endstep %} {% endstepper %}
Reference
Reference information for this process flow is documented in the following sections:
- Operations count
- Scripts used in this process flow
- Cross-reference lookups used in this process flow
Operations count
The operations count for this process flow is: x per order.
Scripts in this process flow
| Script | Summary |
|---|---|
| Inventory - generate shopify graphql | Query string to search SKUs in Shopify. |
| Calculate inventory adjustments for multiple locations | Calculate inventory adjustments for multiple locations - checks the inventory between both systems to create a delta value for shopify. |
Cross-reference lookups in this process flow
This process flow does not use cross-reference lookups.
Comments
0 comments
Please sign in to leave a comment.