Use the Create an order operation
This topic explains how to use the Create an order operation to add sales order line items, including setting required fields and understanding account ownership and fulfillment settings.
Use the REST API
Depending on whether you want to create fulfillments to track the shipment of the sales order line item, select one of the following options:
- To create a sales order line item without fulfillments through the REST API, only perform Task 1: Use the "Create an order" operation to create an order and add a sales order line item.
- To create a sales order line item with fulfillments through the REST API, perform the following tasks:
- Task 1: Use the "Create an order" operation to create an order and add a sales order line item.
- Task 2: Use the "Create fulfillments" operation to add fulfillments for the sales order line item and generate invoices.
Use the Create an order operation to create an order line item and add a sales order line item. Keep the following points in mind when you run the "Create an order" operation:
-
Determine the following fields and other required custom fields for the sales order line item. Note that the default value for the
itemCategoryfield isSales, therefore you do not need to set the field for a sales order line item.-
itemName -
itemType -
listPricePerUnit -
quantity
-
-
The
existingAccountNumberfield specifies the invoice owner of the subscriptions and order line items in this order. TheownerAccountNumberfield specifies the owner of the order line item, just as the subscription owner is the owner of a subscription. If you do not set theownerAccountNumberfield, the owner of the order line item is the same as the invoice owner. -
To allow creating fulfillments for the order line item, the
itemStatefield must be set toBookedand thebillingRulefield must be set toTriggerAsFulfillmentOccurs. For more information, see State transitions for an order line item, fulfillment, and order .
The following API request creates a sales order line item for an existing customer account.
|
Request |
|
|
Request Body |
|
The following API request creates a sales order line item associated with a one-time charge for an existing customer account.
|
Request |
|
|
Request Body |
|