To view this content in our official product documentation, click here.
Introduction
At a high level, this process flow will:
- Fetch updated products from Shopify. A GraphQL request retrieves products modified since the last sync date.
- Check if a product exists in NetSuite.The flow searches NetSuite by SKU to determine if each product already exists.
- Create new products in NetSuite, where needed. If the product doesn't exist in NetSuite, a
parentmatrix item is created first, followed by child matrix items for any variants. - Update existing products in NetSuite, where needed. If the product already exists in NetSuite, the flow checks for new variants in Shopify. If yes, new
childmatrix items are created in NetSuite. If no, theproduct priceis updated.
Limitations
| Limitation | Summary |
|---|---|
| Product updates (general) | Currently, updates are limited to product price details. |
| Product updates (NetSuite requirements) | Matrix options must already exist in NetSuite, with their unique internal IDs. These IDs are required for cross-reference lookups, defined during your initial Patchworks setup. |
| Fixed variant structure | When a product is first created, child matrix items determine which matrix options apply for the entire product. Given the current API and complexities around NetSuite matrix items, these matrix options cannot be changed or removed later; once set, the variant structure is locked for a product. |
Assumptions
- SuiteQL compares Shopify SKUs to a value in NetSuite. To achieve this, comparison values are expected in the item
upccodefield, in NetSuite. If you use a different field to store this value, any connector queries, mappings and scripts referencing theupccodefield must be updated. Please see the Customisation ➤ process flow shapes section for details. - This process flow uses cross-reference lookup tables. Please ensure that you have completed the relevant setup for these tables before running the flow. For further information, see our Installation & setup guide ➤ Stage 1: Patchworks setup.
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 |
|---|---|---|
updatedat |
Set the relative number of days to look back for product updates. Update the default value as required. | -10 days UTC |
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 | Edit this shape and define your preferred run schedule. This flow can be run manually as and when required, or on a trigger schedule. Keep in mind that the lookback period is determined by the updatedat flow variable. |
| 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 Get new and updated productsUpdated at : Set to Updated at references a flow variable value, defined in process flow settings. |
| Connector (NetSuite) |
If you did not add or select a NetSuite instance during the blueprint installation process, the following settings must be configured:
|
| Script | The Determine new or updated products script expects NetSuite SKU comparison values in upccode. If you use a different field to store these values (and you updated the NetSuite connector above accordingly), you must update this script to reflect the required field. Having saved and deployed your updated script, come back to this shape and ensure that the correct script version is selected. For information about working with scripts, please refer to our Custom scripting section. |
| Map |
As noted above, if you do not use NetSuite's
|
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 |
|---|---|
| Extract SKUs for NetSuite search | Checks Shopify SKUs against NetSuite for new and existing products. |
| Determine new or updated products | Checks if there is a matching NetSuite ID to the SKU, then creates two arrays - one for the new products branch and another for the update products branch. |
| Pull NetSuite ID from matrix header | Pulls the ID from the header after a parent matrix item is created. |
Cross-reference lookups in this process flow
| Cross-reference lookup | Summary |
|---|---|
| Shopify location Netsuite Location ID | Maps locations from Shopify to NetSuite. Requires setup before this process flow is used. |
| Shopify variants Netsuite internal ID | Maps Shopify product size values to the corresponding internal ID associated with NetSuite's matrixoptioncustitem1 field. Requires setup before this process flow is used. |
Comments
0 comments
Please sign in to leave a comment.