NetSuite > Shopify - create/update companies, contacts & payment terms
Introduction
Before pushing sales orders from Shopify to NetSuite, companies and contacts must exist in both systems.
By syncing from NetSuite to Shopify first, we ensure that net terms are added to Shopify companies. This is achieved using a cross-reference lookup that maps NetSuite terms to Shopify payment terms template GIDs.
The time period for pulling new/updated data from NetSuite is set using flow variables. Companies, together with associated contacts and addresses, are compared to those in Shopify - a match is made if the company name is exactly the same in both systems. New companies follow one processing route and existing companies follow another:
New companies are created using the first address, then additional locations and payment terms are added.
Existing companies are checked for new/updated contacts, locations, and payment terms.
Process flow snapshot
Limitations
Company addresses
Companies in NetSuite must have at least one address, otherwise the flow will fail.
Net terms
One net term is supported for each company. NetSuite does not support per-location terms (as locations are simply addresses).
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
The following cross-reference lookup tables must be updated before running this flow:
Please ensure that you have completed the necessary setup before proceeding.
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.
datefrom
Sets the earliest timestamp for records to be retrieved. Update the default value as required.
-1 hour UTC
dateto
Sets the latest timestamp for records to be retrieved. Update the default value as required.
+0 minutes UTC
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 (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 (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 all companies and locations
Connector (Shopify)
Route: New company
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 Add new B2B company
Connector (Shopify)
Route: New company
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 Add new contact to company
Connector (Shopify)
Route: New company
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 Add B2B company location via graphql
Connector (Shopify)
Route: New company
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 all locations of company
Connector (Shopify)
Route: Updated company ➤ New contact
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 Add new contact to company
Connector (Shopify)
Route: Updated company ➤ New location
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 Add B2B company location via graphql
Connector (Shopify)
Route: Updated company ➤ Update net terms
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 Update payment terms
Reference
Reference information for this process flow is documented in the following sections:
Scripts in this process flow
Group companies
Groups the netsuite output of companies, contacts and locations.
NS to Shopify - Determine new or updated company
Outputs arrays for split to handle new and updated companies
Inject company ID into multiple contacts
To structure a company contact correctly when adding a new contact
Inject company ID when adding new locations
To handle multiple locations on new B2B locations
Split locations for payment terms
For payment terms create.
NS to Shopify - Determine new contact and new locations to add
Creates new contacts and creates new locations
Cross-reference lookups in this process flow
Net terms to payment terms template
Maps NetSuite term values to Shopify template IDs. Requires setup before this process flow is used.
Last updated
Was this helpful?
