TDV Adapter for Shopify

Build 22.0.8462

Fulfillments

Create, update, and query fulfillments.

Table-Specific Information

Select

The adapter uses the Shopify API to process search criteria that refer to the Id, OrderId, CreatedAt, and UpdatedAt columns. The adapter processes other filters client-side within the adapter.

For example, the following queries are processed server side.

  • If you specify the unique identifier of the order, then this view will only list fulfillment information concerning that order. You can also retrieve a specific fulfillment by specifying OrderId and Id.

    SELECT * FROM Fulfillments
    
    SELECT * FROM Fulfillments WHERE OrderId = '123'
    
    SELECT * FROM Fulfillments WHERE OrderId = '123' AND Id='567'

  • This view supports filtering by the CreatedAt and UpdatedAt columns on the server side.

    SELECT * FROM Fulfillments WHERE CreatedAt > '2017-10-25'

Insert

You must specify the OrderId column to insert a fulfillment.

  • Fulfill one line item using aggregates.

    INSERT INTO Fulfillments(OrderId, LineAggregate) VALUES('123', '[{\"id\":\"123\"}]')

  • Fulfill one line item using temporary table. The temporary table you are populating is dynamic and will be created at run time the first time you insert to it. Temporary tables are denoted by a # appearing in their name. When using a temporary table to insert, the temporary table must be named in the format [TableName]#TEMP, where TableName is the name of the table you will be inserting to. For instance:

    Insert INTO OrdersItems#Temp (ItemId) Values ('123')

    Once your temporary table is populated, it is now time to insert to the actual table in Shopify. You can do this by performing an INSERT to the actual table and setting as a value for LinesAggregate the name of the temporary table. For instance:

    Insert INTO Fulfillments (OrderId, LinesAggregate) VALUES ('123', 'OrdersItems#Temp')

    In cases that two ore more shop locations are specified in your Shopify account the LocationId needs to be added. For instance:

    Insert INTO Fulfillments (OrderId, LocationId, LinesAggregate) VALUES ('123', '456', 'OrdersItems#Temp')

  • Fulfill many line items using aggregates.

    INSERT INTO Fulfillments(OrderId, LineAggregate) VALUES('123', '[{\"id\":\"123\"},{\"id\":\"456\"},{\"id\":\"789\"}]')

  • Fulfill many line items using temporary table.

    INSERT INTO OrdersItems#Temp (ItemId) VALUES ('123')
    INSERT INTO OrdersItems#Temp (ItemId) VALUES ('456')
    INSERT INTO OrdersItems#Temp (ItemId) VALUES ('789')
    INSERT INTO Fulfillments (OrderId, LineAggregate) VALUES ('123', 'OrdersItems#Temp')

  • Fulfill all line items, notify the customer, and set a tracking number.

    INSERT INTO Fulfillments(OrderId, TrackingNumbers, NotifyCustomer) VALUES('123', 'FEDEX1', true)

  • Partially fulfill a single line item by explicitly specifying the line item and quantity to be fulfilled using aggregates.

    INSERT INTO Fulfillments(OrderId, LineAggregate) VALUES('123', '[{\"id\":\"123\",\"quantity\":5}]')

  • Partially fulfill a single line item by explicitly specifying the line item and quantity to be fulfilled using temporary table.

    INSERT INTO OrdersItems#Temp (ItemId,ItemQuantity) VALUES ('123',5)
    INSERT INTO Fulfillments (OrderId,LineAggregate) VALUES ('456','OrdersItems#Temp')

  • Complete a fulfillment (you must specify the Id of the fulfillment as well).

    INSERT INTO Fulfillments(OrderId, Id, Operation) VALUES('123', '456', 'Complete')    

  • Transition a fulfillment from pending to open (you must specify the Id of the fulfillment as well).

    INSERT INTO Fulfillments(OrderId, Id, Operation) VALUES('123', '456', 'Open')

  • Cancel a fulfillment (you must specify Id of the fulfillment as well).

    INSERT INTO Fulfillments(OrderId, Id, Operation) VALUES('123', '456', 'Cancel')

Update

You must specify the OrderId and Id of the fulfillment to fulfill an order.

UPDATE Fulfillments SET TrackingNumbers='FedEx123,UPS123' WHERE OrderId='123' AND Id='456'

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

A unique numeric identifier for the fulfillment.

OrderId [KEY] Long False

Orders.Id

A unique numeric identifier for the order.

LocationId [KEY] Long False

A unique numeric identifier for the Location.

NotifyCustomer Boolean False

A flag indicating whether the customer should be notified

Status String True

The status of the fulfillment.

Receipt String True

Provides information about the receipt of this fulfillment.

TrackingCompany String False

The name of the tracking company.

TrackingNumbers String False

A list of comma-separated tracking numbers, provided by the shipping company.

TrackingUrls String True

The sum of all the prices of all the items in the fulfillment.

VariantInventoryManagement String True

States the name of the inventory management service.

CreatedAt Datetime True

The date and time when the fulfillment was created.

UpdatedAt Datetime True

The date and time when the fulfillment was last modified.

LineAggregate String False

A JSON aggregate of line items associated with the fulfillment.

OrderUpdatedAt Datetime True

The date and time when the order was last modified.

OrderCreatedAt Datetime True

The date and time when the order was last created.

Operation String False

An operation to apply to the fulfillment. Complete, Open, or Cancel.

The allowed values are Complete, Open, Cancel.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462