Shopify > NetSuite - sales order creation
Introduction
This flow retrieves orders from Shopify that were created in a paid or pending state, based on the order's financial status. Depending on this state, orders are sent down one of two branches:
Paid orders. The order is created in NetSuite against the relevant company, then a customer deposit is applied, and an invoice is raised.
Unpaid orders. The order is created in NetSuite against the relevant company, but no documents are created (payment can be made through NetSuite when ready).
Process flow snapshot
Limitations
One subsidiary ID is supported.
You must apply the required ID before running this flow - please see Customisation ➤ Process flow shapes for more information.
This flow expects new orders
This flow does not support updating existing orders.
Cash sales are not supported.
N/A
Order details
Mappings are defined for standard orders. If required, mappings can be added for more complex orders (e.g. discounts and gift cards).
Shopify GraphQL error handling
There is a known limitation with error handling for Shopify GraphQL. Please refer to the Error handling for Shopify GraphQL section for more information and a suggested approach that you may wish to adopt in your flows.
Assumptions
Companies must be synced in both systems (see NetSuite > Shopify - create/update companies, contacts & payment terms and Shopify > NetSuite - create/update companies, locations & contacts).
Products must be synced in both systems (see Shopify > NetSuite - create & update products).
The following cross-reference lookup tables must be updated before running this flow: Shopify location > NetSuite location ID. Please ensure that you have completed the necessary setup before proceeding.
NetSuite permissions are required to create invoices, customer deposits, and the ability to create invoices without fulfilment (see Installation ➤ Stage 2: NetSuite prerequisites).
Your NetSuite
subsidiary IDmust be applied before running this flow. - please seeCustomisation➤Process flow shapesfor more information.This flow assumes that SKUs are stored in NetSuite's
upccodefield. 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.
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.
date
Set the relative time period to look back for new orders in Shopify. Update the default value as required.
-1 minute
Process flow shapes
This process flow includes some shapes that can be configured with your own settings. Please see guidelines in the table below.
Shape settings determine the outcome of process flows. Do not change shape settings unless they are listed below.
Trigger
The default setting is to run hourly, which is recommended. You can change the schedule if required. Keep in mind that flow variables determine the lookback period, so these settings should align.
Notify
This flow is designed in a try/catch structure, so notifications are generated if any part of the flow fails. To achieve this, the catch route includes a notify shape, which must be configured for your own notification preferences.
Alert level: Defaults to error but can be changed if needed
Channel: Defaults to email + log but can be changed if needed
Email Limit: Defaults to 5 but can be changed if needed
Notification Group: Replace the notify placeholder which your required notification group.
Message: If required, you can change the placeholder message.
For more information, please refer to our Notify shape and Notification groups pages.
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 orders via graphql
Variables : Leave the filter variable as it defaults. This variable references your date flow variable to determine the lookback period for new orders. Make sure this flow variable is set as required.
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 suiteQL
Query: Leave as the default.
Connector (NetSuite)
Route: Paid orders
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 suiteQL
Query: SuiteQL compares SKUs to a value in NetSuite. This NetSuite connector is configured with a query that expects the comparison value in upccode. If you use a different field, please update the query accordingly.
Connector (Shopify)
Route: Paid orders
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 fulfillment location of order via graphql
Variables : Leave the order ID variable as it defaults.
Map
Route: Paid orders
You must update the custom string transform function associated with the subsidiary.id mapping rule:
For more information about working with the custom string transform documentation, please see our custom string documentation.
Connector (NetSuite)
Route: Paid orders
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 create sales order
Connector (NetSuite)
Route: Paid orders
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 create customer deposit
Connector (NetSuite)
Route: Paid orders
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 transform SO into invoice
Connector (NetSuite)
Route: Unpaid orders
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 suiteQL
Query: SuiteQL compares SKUs to a value in NetSuite. This NetSuite connector is configured with a query that expects the comparison value in upccode. If you use a different field, please update the query accordingly.
Connector (Shopify)
Route: Unpaid orders
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 fulfillment location of order via graphql
Variables : Leave the order ID variable as it defaults.
Map
Route: Unpaid orders
You must update the custom string transform function associated with the subsidiary.id mapping rule:
For more information about working with the custom string transform documentation, please see our custom string documentation.
Connector (NetSuite)
Route: Unpaid orders
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 create sales order
Reference
Reference information for this process flow is documented in the following sections:
Scripts in this process flow
Add single quotes to products
Adds single quotes to products so they can be searched correctly in Netsuite.
Merge NS ID to line items
Pushes the NetSuite ID into line items from the previous payload for cleaner mapping.
Pulls SO ID from header
Pulls the NetSuite order ID from the header so it can be used again.
Cross-reference lookups in this process flow
Shopify location > Netsuite Location ID
Maps locations from Shopify to NetSuite. Requires setup before this process flow is used.
Last updated
Was this helpful?
