Prerequisite: In Shopify, verify if the order status is fulfilled.
When you run the NetSuite Fulfillment to Shopify Fulfillment Add flow, if the retry data has empty fulfillment_orders array and you get the error message “Fulfillment payloads array size must be greater or equal to one” (error code: 422), check if the line item exists and is eligible for fulfillment in Shopify.
In the following scenarios you might see the empty fulfillment_orders in the retry data:
- When you sync an item fulfillment from NetSuite for a Shopify order that is already fulfilled, closed, refunded, or cancelled in Shopify.
- If the fulfillment order status is cancelled or closed.
- For negative order edits, if you sync an item fulfillment for a removed item in the order list, the fulfillment order gets closed or cancelled for that item. If you try to export an item fulfillment for the removed item then the error is shown.
- On updating the default response mapping of the "Get order fulfillment order info from Shopify” export with different values.
Default mapping:
Retrieve fulfillment_orders data
- Sign in to your Shopify account.
- Navigate to the specific order for which the error has occurred.
- Retrieve the fulfillment_orders data for a Shopify order by accessing the right endpoint by adding a suffix as /fulfillment_orders.json to the URL.
For example, https://admin.shopify.com/store/{{store_name}}/orders/{{order_id}}/fulfillment_orders.json - If you still cannot retrieve the data from the Shopify admin store using the endpoint, you can make a proxy call from POSTMAN using the integration app level API token and Shopify connection ID of that specific store configured within the integrated apps.
Retrieve the Shopify connection ID
- Sign in to your integrator.io account.
- Click on the Shopify - NetSuite integration app tile.
- Click the Connections tab.
- Under the Name column, click Shopify connection.
- Copy the Shopify connection ID from the URL link.
Retrieve API token
In integrator.io, API tokens can be created and managed within the "API Tokens" section of the account. You need to log in using the integrator.io owner account credentials to manage API tokens in the integration app.
Note: Contact the integrator.io owner and request access to their account.
Once you receive access from the integrator.io owner, perform the following steps:
- Sign in to your integrator.io account.
- Click on the Shopify - NetSuite integration app tile and navigate to the appropriate store, if you have multiple stores configured.
- Click Admin > API tokens.
- Click +Create API token. The Create API token screen is displayed.
- In the Token permissions section, select the Scope as full access.
- Click Save and close.
- On the API tokens page, click Show token to copy the token ID.
Note: This API token is used to authenticate API requests to the integrator.io account.
- Login to the POSTMAN to retrieve the fulfillment_orders data via proxy call. Make a GET request as shown in the below image.
- In the Headers tab, enter the API token using the "Authorization" header with the value "Bearer [token_value]".
- Click Send to get the fulfillment_orders response from Shopify.
Note: Make sure the Integrator-Method field value must always be GET and not POST/PUT.
Comments
Since Celigo is able to retrieve the Shopify order status in the Get order fulfillment order info from Shopify step, would it be better if it stops processing the fulfillment export for orders that are fulfilled, closed, refunded, or cancelled instead of returning this error?
Alternatively, the error should specify what the root cause is.Instead of "Fulfillment payloads array size must be greater or equal to one" which is a generic error, it would say "Fulfillment fails because order is already fulfilled", something along those lines. That's going to help a lot in troubleshooting.
Hi, Francis Hernandez we have already given a fix by enhancing the error message with this: You can\'t fulfill the line-item: ' + fulfillmentLine[ETAIL_LINE_ID] + ' as the fulfillment order status is canceled or closed.
If you are not getting this error, we request you to raise a support ticket and we are happy to assist you. See this article on how to submit a ticket.
Thanks!
Please sign in to leave a comment.