TDV Adapter for Shopify

Build 24.0.9060

FulfillmentOrderMerge

Merges a set or multiple sets of fulfillment orders together into one based on line item inputs and quantities.

Execute

The stored procedure requires any of the following scopes: write_merchant_managed_fulfillment_orders, write_third_party_fulfillment_orders.

Using TEMP tables

The Driver Uses #TEMP tables as fields for aggregate information entered

You must include in your query:

INSERT INTO MergeIntents#TEMP (fulfillmentOrderId, fulfillmentOrderLineItemId, fulfillmentOrderLineItemQuantity) VALUES('gid://shopify/FulfillmentOrder/6150690832407', 'gid://shopify/FulfillmentOrderLineItem/12666931609623', 1)

INSERT INTO MergeIntents#TEMP (fulfillmentOrderId, fulfillmentOrderLineItemId, fulfillmentOrderLineItemQuantity) VALUES('gid://shopify/FulfillmentOrder/6150690865175', 'gid://shopify/FulfillmentOrderLineItem/12666931675159', 2)

INSERT INTO MergeIntents#TEMP (fulfillmentOrderId, fulfillmentOrderLineItemId, fulfillmentOrderLineItemQuantity) VALUES('gid://shopify/FulfillmentOrder/6150691454999', 'gid://shopify/FulfillmentOrderLineItem/12666932396055', 2)

Then you execute the procedure by specifying the value of MergeIntents with the name of #TEMP table used MergeIntents#TEMP.

EXEC FulfillmentOrderMerge MergeIntents = 'MergeIntents#TEMP'

*The temporary table must be defined and used within the same connection. Closing the connection will clear out any temporary tables in memory.

Using aggregate values

Alternativelly you can specify an aggregate value as follows:
EXEC FulfillmentOrderMerge MergeIntents = '[
	{
	 "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/6150690865175",
     "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/12666931675159",
     "fulfillmentOrderLineItemQuantity": 2
    },
	{
	 "fulfillmentOrderId": "gid://shopify/FulfillmentOrder/6150691454999",
     "fulfillmentOrderLineItemId": "gid://shopify/FulfillmentOrderLineItem/12666932396055",
     "fulfillmentOrderLineItemQuantity": 2
    }
	]'
    

Input

Name Type Description
MergeIntents String Temp table or aggregate (json/xml) array of objects containing fulfillmentOrderId, fulfillmentOrderLineItemId and fulfillmentOrderLineItemQuantity.

Result Set Columns

Name Type Description
Success Boolean Indicates whether or not the operation executed successfully.
Details String Any extra details on the operation's execution.
FulfillmentOrderId String The id of the new fulfillment order as a result of the merge.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060