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

Click to view process flow snapshot

Limitations

Limitation
Summary

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.

Flow variable
Summary
Default value

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

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.

Shape
Notes

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 companyNew 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 companyNew 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 companyUpdate 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

Script
Summary

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

Cross-reference lookup
Summary

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?