Shopify orders are retrieved in CIC and the order JSON is translated into NetSuite Sales Order XML, which is then posted to NetSuite.
This section explains the settings required to configure the integration between Shopify and NetSuite to retrieve orders and create the corresponding Standard Sales Order on NetSuite.
How to Configure - Global Variables, Reference Table, and Schedulers
- Configure the following global variables in the
com.cleo._customer_.booster.shopify.ShopifyGVGlobal Variable object:
Global Variable Description ShopifyStoreNames Specifies the Shopify store names being connected to. Multiple store names can be mentioned separated by commas. Shopify Vault entries should also be the same as the store names ShopifyLeakRate Shopify has specific rate limits on how many times an API can be invoked for each of the APIs. The throttling limit from Shopify is handled as part of the Accelerator. PollingHours This is used to retrieve orders from Shopify for the last “n” hours.
Default value: 24
OrderTags Shopify allows users to add & remove tags on a specific order. To retrieve an order based on these tags, the user can specify the required tags in this global variable. Multiple tags can be configured by providing comma-separated values (for example, tag1, tag2). The values provided here are case-insensitive. If tag-based filtering is not required, the default values can be removed and the value can be left blank.
Default value : tag1, tag2
FinancialStatus Filters orders by their financial status (any, paid, unpaid, void, etc) Default value: paid FulfillmentStatus
Filters orders by their fulfillment status (any, partial, shipped, etc). Default value: unshipped
This is used to identify HTTP error codes that need to be flagged as ‘successful job flows’ in the cockpit. If not mentioned here, the error codes would be flagged as failed jobs in the cockpit. In case a Shopify API request is throttled ( i.e with HTTP 429 Too Many Requests error ), the execution waits as per time period configured in global variable - ShopifyLeakRate , and the API request is made again. Since we have a retry logic for throttled requests implemented in the accelerator, these jobs need not be marked as failures, and hence this global variable is configured with a default value of throttling error code (429).
Default value : 429
- Configure Reference Table
- Deploy the project -
- Run the process - com.cleo._customer_.shopifynetsuite.order.xref.CreateCountryCodeRefTableBPS to create the required reference table.
- To verify the setup is complete, navigate to the Integration tab > Reference Tables and ensure the required table was created.
- Deploy the project -
- Configure the Process Schedulers:
The Scheduler -
com.cleo._customer_.booster.shopify.ordersLaunchShopifyOrderPSis scheduled to run every 1 hour with start time set as 12:00:00 AM.
The Scheduler -
com.cleo._customer_.booster.shopify.cancelledOrders.LaunchShopifyCancelledOrdersPSis scheduled to run the cancelled orders flow every 4 hour with start time set as 02:00:00 AM.
See Creating and Defining Process Schedules – Cleo for more information about defining Schedulers.
How to Test the Order Flow
After you configure the Order Flow (described above), you can test the flow by running it manually or automatically.
- Make sure the following Projects have been deployed:
Note: If any of the projects are already deployed and are not modified, they do not need to be redeployed. If the util 1.0.0 project already exists in the workspace, the customer should upgrade to the latest version.
- Run the LaunchShopifyOrderBPS.
- Manually - Run the LaunchShopifyOrderBPS from your Workspace. For more information, see Business Processes in Starting Objects.
- Automatically - If you have correctly configured the LaunchShopifyOrderPS scheduler, the Business Process will start as scheduled. For information about scheduling, see Creating and Defining Process Schedules.
- Run the LaunchShopifyCancelledOrdersBPS.
- Manually - Run the LaunchShopifyCancelledOrdersBPS from your Workspace. For more information, see Business Processes in Starting Objects.
- Automatically - If you have correctly configured the LaunchShopifyCancelledOrdersPS scheduler, the Business Process will start as scheduled. For information about scheduling, see Creating and Defining Process Schedules.
- Review the results of the flow as follows:
- Review Auditor logs.
- Verify the following in the CIC Cockpit: Message Tiles, Jobs, Dashboard > Charts.
- If the processing fails, then a ticket will be generated; errors will be visible in the cockpit message tile and the job (examples shown below).
(Cockpit error job)
How to Customize the Order Flow
Two typical areas of the Order Flow to customize are Process Schedulers and mapping details.
Customizing the Schedule
The schedulers (
com.cleo._customer_.booster.shopify.orders.LaunchShopifyOrderPS and com.cleo._customer_.booster.shopify.cancelledOrders.LaunchShopifyCancelledOrdersPS ) are configured by default to retrieve orders every 1 hour and run the cancel order flow every 4 hours, respectively. Change either or both schedules to run more frequently or less frequently. For details on defining a scheduler, see Creating and Defining Process Schedules.
Adding Mapping Details
The Sales order on NetSuite is currently created with the data required to process orders successfully. The values that are being mapped are documented in the Integration Design Specification -
(com.cleo._customer_.shopifynetsuite.docs.Shopify-NetSuite-Accelerator-LMS.xlsx) - However, if you wish to add any additional fields, you must update the following Rulesets:
- For new orders, update the
- For updating orders, update the com.cleo._customer_.shopifynetsuite.orderUpdate.ShopifyOrderToNetsuiteSalesOrderUpdateRS Ruleset.
- For canceled orders, update the
Please contact Cleo Support for assistance with the above steps.
Orders to be retrieved from multiple stores
The Scheduler picks up the orders at the same time. Order flow can’t be separated for different scheduled timings for individual stores. In order to update this, clone the LaunchShopifyOrdersBPS.bps and ResolveParametersShopifyOrdersBPS.bps objects located in
com.cleo._customer_.booster.shopify.orders and rename them. Then, update step one in the LaunchShopifyOrdersCloneBPS object with cloned ResolveParametersShopifyOrders Business Process.
In the cloned ResolveParametersShopifyOrdersBPS, update the variable v_vaultEntryGV with the renamed ShopifyStoreNames.<com.cleo._customer_.booster.shopify.ShopifyGV.ShopifyStoreNames)
Next, create the same cloned variable ShopifyStoreNameCone in the ShopifyGV.globalVar object found in
Clone the LaunchShopifyOrdersPS located in the
com.cleo._customer_.booster.shopify.orders package (Rename object. eg. LaunchShopifyOrdersClonePS). Update the name of the BP in the LaunchShopifyOrdersClonePS and update polling frequency in the Recurrence section of the editor.