You can query the Fulfillment object through Data Query. You can also perform join queries from the Fulfillment object, Order Line Item object, and other objects. For information about the basic usage of Data Query, see Constructing SQL Queries in Data Query.
The following table lists all the fields that are defined on the Fulfillment object. You can access the Fulfillment object and all its fields through Data Query and the Orders API.
|billTargetDate||Date||Indicates when the fulfillment will be invoiced.|
|carrier||String||The express company.|
|description||String||The description of the fulfillment for reference purposes.|
|externalId||String||The ID of the fulfillment. The ID is generated based on the external system.|
|fulfillmentDate||Date||The date of the fulfillment.|
|fulfillmentLocation||String||The occurring location of the fulfillment.|
||String||The fulfillment number, for example,
||String||The value that maps an external value from the ERP system, for example, the value can be
|fulfillmentType||Enum||The fulfillment type. The value can be Delivery or Return, which indicates whether to deliver or return the fulfillment items.|
|id||String||The ID of the fulfillment. The ID is generated by Zuora.|
|orderLineItemId||String||The ID of an order line item that the fulfillment is associated with.|
|quantity||BigDecimal||The quantity of the fulfillment items to be delivered or returned.|
|state||String||The state of the fulfillment. The value can be
|trackingNumber||String||The express number from the express company.|
SQL example for querying the Fulfillment object
The following query example demonstrates how to use Data Query to access the Fulfillment fields.
Join the Fulfillment to an Order Line Item.
select oli.ItemName, oli.Quantity as OrderLineItemQuantity, oli.Amount, f.FulfillmentNumber, f.Quantity as FulfillmentQuantity, f.State as FulfillmentState from orderlineitem oli left join fulfillment f on f.OrderLineItemId = oli.Id
The query result is as follows:
ItemName, OrderLineItemQuantity, Amount, FulfillmentNumber, FulfillmentQuantity, FulfillmentState "LMS Fee", 100.0, 1000.0, "F-000001", 50.0, "SentToBilling"