ODBC Driver for Shopify

Build 24.0.9060

Fulfillments

Create, update, and query fulfillments.

Table-Specific Information

Select

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

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. To retrieve fulfillments associated with a fulfillment order you need to specify the FulfillmentOrderId.

    SELECT * FROM Fulfillments WHERE OrderId = '5729988903171'
    
    SELECT * FROM Fulfillments WHERE OrderId = '5729988903171' AND Id = '5165361791235'
    
    SELECT * FROM Fulfillments WHERE FulfillmentOrderId = '6817622622467'

  • 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 FulfillmentOrderId column to insert a fulfillment.

  • Fulfill all line items.

    INSERT INTO Fulfillments (FulfillmentOrderId) VALUES ('6817622622467')

  • Fulfill one line item using aggregates.

    You must specify the fulfillment order line item id and the quantity to be fulfilled in the aggregate.

    Note: To obtain the fulfillment order line item id, you can query the Id column in the FulfillmentOrderLineItems table.

    INSERT INTO Fulfillments (FulfillmentOrderId, LineAggregate) VALUES ('6817622622467','[{\"id\":14179445244163,\"quantity\":5}]')

  • 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, ItemQuantity) Values ('14179445244163', '5')

    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 LineAggregate the name of the temporary table. For instance:

    Insert INTO Fulfillments (FulfillmentOrderId, LineAggregate) VALUES ('6817622622467', '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 (FulfillmentOrderId, LocationId, LineAggregate) VALUES ('6817622622467', '1448280087', 'OrdersItems#TEMP')

  • Fulfill many line items using aggregates.

    INSERT INTO Fulfillments (FulfillmentOrderId, LineAggregate) VALUES ('6817622622467', '[{\"id\":14179445244163,\"quantity\":5},{\"id\":14179445276931,\"quantity\":2}]')

  • Fulfill many line items using temporary table.

    INSERT INTO OrdersItems#Temp (ItemId, ItemQuantity) Values ('14179445244163', '5')
    INSERT INTO OrdersItems#Temp (ItemId, ItemQuantity) Values ('14179445276931', '2')
    INSERT INTO Fulfillments (FulfillmentOrderId, LineAggregate) VALUES ('6817622622467', 'OrdersItems#TEMP')

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

    INSERT INTO Fulfillments (FulfillmentOrderId, TrackingNumbers, NotifyCustomer) VALUES ('6817622622467', 'FEDEX1', true)

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

    INSERT INTO Fulfillments (FulfillmentOrderId, Id, Status) VALUES ('6817622622467', '5165361791235', 'Complete')

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

    INSERT INTO Fulfillments (FulfillmentOrderId, Id, Status) VALUES ('6817622622467', '5165361791235', 'Open')

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

    INSERT INTO Fulfillments (FulfillmentOrderId, Id, Status) VALUES ('6817622622467', '5165361791235', 'Cancel')

Update

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

UPDATE Fulfillments SET TrackingNumbers = 'FedEx123,UPS123' WHERE OrderId = '5729988903171' AND Id = '5165361791235'

Columns

Name Type ReadOnly References Description
Id [KEY] Long True

A unique numeric identifier for the fulfillment.

OrderId Long False

Orders.Id

A unique numeric identifier for the order.

LocationId [KEY] Long False

A unique numeric identifier for the Location.

NotifyCustomer Bool False

A flag indicating whether the customer should be notified

Status String False

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 False

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.

FulfillmentOrderId Long False

FulfillmentOrders.Id

The ID of the fulfillment order that is associated with the fulfillments.

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