Articles in this section

Configure the new GraphQL-based Product flows

Shopify has announced the deprecation of REST-based product flows, requiring all public apps using GraphQL or REST product APIs to transition to the new GraphQL product APIs by February 1, 2025. Celigo has been granted a special extension, allowing support for this transition until July 1, 2025. However, we recommend migrating to the new GraphQL-based product flows as early as possible to ensure a smooth and seamless transition. Celigo will phase out the existing REST-based product flows and adopt Shopify’s productSet mutation. For more details about this Shopify update, refer to the deprecation timelines for the new GraphQL product APIs.

New flows

The following GraphQL-based product flows are now available in the Shopify - NetSuite integration app. You can transition to these new flows using the instructions provided below.

  • Flows > Product

    • NetSuite item to Shopify product (add or update)

    • NetSuite matrix item to Shopify product (add or update)

  • Flows > Inventory

    • Shopify product ID to NetSuite item (mass update)

Deprecating flows

Shopify will deprecate REST-based product flows on 1 July 2025, and Celigo will disable the following REST-based flows at that time.

  • Flows > Product 

    • (To be deprecated) NetSuite image to Shopify image (add or update)

    • (To be deprecated) NetSuite item to Shopify product (add or update)

    • (To be deprecated) NetSuite matrix item to Shopify product (add or update)

Fig1.png
  • Flows > Inventory

    • (To be deprecated) Shopify product ID to NetSuite item (mass update)

Fig2.png

The functionality of the NetSuite image to Shopify image(add or update) flow will be incorporated into the logic of the other two flows, so it will no longer exist as a separate flow.

Steps to configure the flows: 

  1. Transition to GraphQL-based flows: To avoid disruptions, disable REST-based product flows and enable GraphQL flows before 1 July 2025.

  2. Re-authorize Shopify connection: Once GraphQL flows are enabled, you must reauthorize the Shopify connection. 

  3. Recreate custom mappings: If you’ve implemented custom mappings in REST flows, ensure equivalent mappings are correctly configured in the GraphQL flows. This applies to the flows NetSuite item to Shopify product (add or update) and NetSuite matrix item to Shopify product (add or update).

Once migrated, you can use Shopify’s enhanced 2000 Variants feature, which provides better scalability and functionality for managing products.

Transition to GraphQL-based product flows

To transition REST-based product flows to GraphQL:

  1. Open your Shopify - NetSuite integration app.

  2. Navigate to Flows > Product.

    Fig3.png
  3. Turn on the toggle for the following flows:

    • NetSuite item to Shopify product (add or update)

    • NetSuite matrix item to Shopify product (add or update)

      Fig4.png
  4. Re-authorize Shopify connection:  

    • Reauthorize the Shopify connection if you use the Sync published scope from NetSuite to Shopify setting to sync scopes.

    • If you enable this setting after reauthorization, reauthorize the connection again to sync the scopes. For more information about the scopes settings, see Settings.

      Note

      If you enable the Sync published scope from NetSuite to Shopify setting before authorizing the connection, you will see this error: “Unable to get a response from Shopify. Refresh the page and try again. If the issue continues, contact Celigo Support. Shopify returned: Access denied for publications field. Request access: 'read publications' access scope”

      Fig5.png
  5. Recreate custom mappings:  

    • If you’ve implemented custom mappings in REST flows, ensure equivalent mappings are correctly configured in the GraphQL flows. This applies to the flows NetSuite item to Shopify product (add or update) and NetSuite matrix item to Shopify product (add or update).

    • The GraphQL-based Product API utilizes the productSet mutation outlined in the Shopify productSet mutation article. Only fields included in this mutation can be added to custom mappings.

  6. Turn off the toggle for the following flows:

    • (To be deprecated) NetSuite item to Shopify product (add or update)

    • (To be deprecated) NetSuite matrix item to Shopify product (add or update)

      Fig6.png
  7. Schedule the flow: Once the flow is enabled, schedule it according to your business requirements. You can refer to the current REST-based flow schedule and replicate the same settings.

  8. Updating Saved Searches for Product flows: When updating a saved search for product flows, always make the changes via Settings > Product > NetSuite saved search to sync items and/or NetSuite saved search to sync matrix items rather than modifying them at the flow level. Updating the search at the Settings level ensures that the changes automatically apply to the flow level for both REST and GraphQL flows (item and matrix).
    • Do not update the saved search at the flow level (Get Items from NetSuite export), as this will not reflect across all flow areas.
    • If you have created a new saved search and want to test the flow, first update the saved searches at the Settings level as explained above. Then, disable the REST flow and proceed with testing the GraphQL flow. Once you are confident in its performance, keep the GraphQL flow enabled. If further testing is required, you can re-enable the REST flow as needed.

Note

  • Plan the transition ahead of time to avoid disruptions after 1 July 2025.

  • Review your existing configurations and ensure all necessary updates are applied.

Syncing Weight, Weight unit, and Cost from NetSuite to Shopify using GraphQL-based product flows

Shopify's release update: On January 15, 2025, Shopify introduced support for leveraging the inventoryItem object within productVariants. The Weight and Weight Unit fields are part of the inventoryItem object. As a result, you can now sync Inventory Information to Shopify using GraphQL product flows. Since this change was implemented after our initial release of GraphQL flows, the out-of-the-box solution did not include prebuilt Weight mappings. Therefore, you need to manually configure the mappings. For more details about Shopify's official changelog: Shopify Changelog - New InventoryItem Field.

Sync Weight and Weight unit from NetSuite to Shopify

You can sync the Weight from NetSuite to Shopify using GraphQL-based product flows. The mapping in the product flows ensures that both Weight and Weight Unit are accurately transferred to Shopify.

Pre-requisite: Before syncing, ensure that the Weight Unit and Weight Value fields are added to the Saved Search results criteria in NetSuite.

How the sync Works:
  • By default, NetSuite passes the Weight Unit as "lb," "kg," etc., and the Weight Value as "null" if it is not provided.

  • However, Shopify expects the Weight Unit to be either "kilogram," "pounds," etc., and treats null weight values as "0.0" instead of null.

To ensure seamless synchronization, configure the weight settings in the mapping correctly as explained below for null value correction, and incorporate the provided handlebar for unit correction. This will ensure that the weight values align with Shopify’s expected format.

Configure mapping for weight fields
  1. In the Flows > Product section, open the "Field Mappings" for the NetSuite Item to Shopify Product Add/Update flow.

  2. Click Post products to Shopify. Scroll to the standard mappings for variants.

  3. Click + to add a new row under the variants

    1. In the text field, type in inventoryItem and select the datatype as the object.

    2. Click + at the inventoryItem level. In the text field, type in measurement and select the datatype as the object.

    3. Click + at the measurement level. In the text field, type in weight and select the datatype as the object.

      Mapping_Weight.png
    4. Click + at the weight level. Type in value and select the datatype as number.

    5. From the source field dropdown, select Item Weight (Variant).

      For items with weight value zero or no value: If an item's weight value is zero or you do not need to define a weight in NetSuite (e.g., Item type as service), configure the mapping as explained below:

      1. Click Settings next to the NetSuite Item Weight (Variant) field.

      2. In the Action to take if source field has no value dropdown, select Use custom default value.

      3. In the Custom value field, enter 0.0.

        Null_setting.png
    6. Click + at the weight level. Type in unit and select the datatype as string

    7. From the source field dropdown, selectItem Weight Units (Variant).

      For items with weight units other than "kilogram" or "pounds": Shopify expects the weight unit to be either "kilogram" or "pounds". If an item's weight unit you want to sync from NetSuite is not in"kilogram" or "pounds", configure the mapping as explained below:

      1. Click Settings next to the NetSuite Item Weight Units (Variant) field.

      2. From the Destination data type dropdown, select string.

      3. From the Field mapping type dropdown, select Handlebars expression.

      4. In the Handlebars expression, copy and paste this:{{#compare variants.[Item Weight Units (Variant)] "==" "lb"}}POUNDS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "kg"}}KILOGRAMS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "g"}}GRAMS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "oz"}}OUNCES{{else}}{{variants.[Item Weight Units (Variant)]}}{{/compare}}{{/compare}}{{/compare}}{{/compare}}

      5. From the Action to take if handlebars expression returns and empty value, select Use custom default value.

      6. In the Custom value text box, enter POUNDS.

      7. Click Save.

        Expression_Handlebar1.png

Now, once you run the flow, the weight records get synced correctly without any errors.

Syncing Cost from NetSuite to Shopify (other inventory fields)

You can sync the Cost from NetSuite to Shopify using GraphQL-based product flows. The mapping in the product flows ensures that Cost is accurately transferred to Shopify.

Pre-requisite: Before syncing, ensure that the Cost field is added to the Saved Search results criteria in NetSuite.

To ensure seamless synchronization, configure the cost settings in the mapping correctly as explained below.

Configure mapping for cost field
  1. In the Flows > Product section, open the "Field Mappings" for the NetSuite Item to Shopify Product Add/Update flow.

  2. Click Post products to Shopify. Scroll to the standard mappings for variants.

  3. Click + to add a new row under the variants

    1. In the text field, type in inventoryItem and select the datatype as the object.

    2. Click + at the inventoryItem level. In the text field, type in Cost and select the datatype as the string.

    3. From the source field dropdown, select Price (Variant).

  4. Click Save.

    Cost_image.png

    Similarly, you can also sync the harmonizedSystemCode from NetSuite to Shopify, using the GraphQL-based product flows.

Field Mappings in GraphQL-based Product Flows

The following fields in the table have Standard Mapping (Mandatory) and Standard Mapping pre-configured as out-of-the-box mappings in the product flow.

Important

Do not delete any Standard mapping (mandatory) mappings, as they are essential for the flow to function correctly.

Table 1. Product flow: REST to GraphQL mappings

Required Field

Shopify GraphQL

NetSuite

Comments

product > id

$.product_id

standard mapping (mandatory)

product > title

$.Display Name

standard mapping (mandatory)

 

product > descriptionHtml

$.Sales Description

standard mapping 

 

product > productType

$.Shopify Product Type

standard mapping 

 

product > tags

$.Shopify Product Tags

standard mapping 

 

product > files

$.Images[*]

standard mapping 

product > variants > id

$.variants.variant_id

standard mapping (mandatory)

 

product > variants > sku

$.variants.Item Name (Variant)

standard mapping 

 

product > variants > price

$.variants.Price (Variant)

standard mapping 

 

product > variants > barcode

$.variants.UPC Code (Variant)

standard mapping 

 

product > variants > inventoryPolicy

$.variants.Shopify Enable Out Of Stock Selling (Variant)

standard mapping 

 

product > variants > inventoryItem > measurement > weight > value

$.variants.[Item Weight (Variant)]

custom mapping

 

product > variants > inventoryItem > measurement > weight > unit

{{#compare variants.[Item Weight Units (Variant)] "==" "lb"}}POUNDS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "kg"}}KILOGRAMS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "g"}}GRAMS{{else}}{{#compare variants.[Item Weight Units (Variant)] "==" "oz"}}OUNCES{{else}}{{variants.[Item Weight Units (Variant)]}}{{/compare}}{{/compare}}{{/compare}}{{/compare}}

custom mapping

product > variants > option1

$.variants.Variation Option 1 (Variant)

standard mapping (mandatory)

product > variants > option2

$.variants.Variation Option 2 (Variant)

standard mapping (mandatory)

product > variants > option3

$.variants.Variation Option 3 (Variant)

standard mapping (mandatory)

 

product > variants > compareAtPrice

$.variants.Compare at Price (Variant)

standard mapping 

 

see help article for guidance

meta[*].Frame:Width (Meta)

custom mapping (metafields)

 

see help article for guidance

meta[*].custom:hardware_image(Meta)

custom mapping (metafields)


The following screenshot displays the list of standard mappings for simple items.

Simple_items_mapping.png

The following screenshot displays the list of standard mappings for matrix items.

Matrix_item_mapping.png

Note

If your business requirements do not require standard mapping fields (that are not marked as mandatory or required) you can delete them as needed.

GraphQL-based product flow limitations

There are certain limitations when using GraphQL-based flows. These details will help you understand the constraints and necessary adjustments for a seamless migration and enhanced functionality.

Limitations: 

  • Price lists: The price list updates are supported for products with fewer than 100 variants during the first sync. For products with more than 100 variants, the initial sync (Create scenario) will not include price list updates for variants beyond 100. However, in subsequent runs (Update scenario), the price list details will sync correctly.

  • HS codes: The HS codes are supported only for products with fewer than 100 variants. HS code updates are not supported for products with more than 100 variants.

  • Track inventory for variants: Shopify does not support setting the Track Inventory field individually for each variant. For products with more than 100 variants, inventory details will not sync during the first run (Create scenario). In the next scheduled run (Update scenario), inventory details for variants beyond 100 will sync correctly.

  • Real-time product ID and inventory item ID sync: The real-time flow for writing back product_id and inventory_item_id to NetSuite is constrained by Shopify webhooks, which support a maximum of 100 variants. For products with more than 100 variants, users must trigger or schedule the mass ID update flow to sync IDs efficiently.

  • Publication scope

    • The GraphQL-based product flow allows the addition of new publications but restricts the removal of any existing publications. 

    • You will need to re-authorize the Shopify connection to sync the scopes for new products and any additions to the scope for existing products.

Additional information

Field mappings: 

  • GraphQL-based flows use 2.0 mappings, which have been moved to the new Mapper 2.0 from the previous REST-based versions.

  • The metadata structure has also been updated and will vary in GraphQL-based flows, enhancing data organization and compatibility.

  • To update metafield information for both variants and the parent level, we recommend configuring the "Specify your Shopify metafield components for products and variants" setting under Settings > Product instead of using mappings.

    • If you previously updated metafields via mappings, ensure you now use the above-mentioned setting.

    • If you have already configured this setting under Settings > Product, no further updates are necessary.