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

Click to view process flow snapshot

Limitations

Limitation
Summary

One subsidiary ID is supported.

You must apply the required ID before running this flow - please see CustomisationProcess 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

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

date

Set the relative time period to look back for new orders in Shopify. Update the default value as required.

-1 minute

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 (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

Script
Summary

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

Cross-reference lookup
Summary

Shopify location > Netsuite Location ID

Maps locations from Shopify to NetSuite. Requires setup before this process flow is used.

Last updated

Was this helpful?