Update order line items
There are two ways to update an order line item:
- In the Zuora UI, access the order line item details page and then update the order line item.
- Use the "Update an order line item" operation.
Whether an order line item can be edited is also dependent on the state of the order line item. See State transitions for an order line item, fulfillment, and order for more information about the state.
A sales order line item and a return order line item have different editable fields. See Update an order line item for more information about the differences.
Use Zuora UI
To update an order line item from the UI, complete the following steps:
-
Navigate to Customers > Orders. The Orders page opens and lists the orders in your tenant. The order line items included in an order are listed in the ORDER LINE ITEMS column.
-
If you only have the item name, go through some pages by clicking the page number at the right bottom to identify the order line item you are to update. Click the item name in the ORDER LINE ITEMS column. The order line item details page opens. Go to Step 5 to update the order line item.
If you have information about the order that includes the order line item that you are to update, you need to first search for the order. For information about how to search for an order, see View the Details of an Order. -
Once you find the order that includes the order line item, click the order number in blue in the ORDER column. The order details page opens.
-
In the Order Line Items area, identify the specific order line item you are to update, and click the order line item name in the ITEM NAME column. The order line item details page opens.
-
On the top right of the order line item details page, click the pencil icon to open the edit window.
-
Update the detailed information about the order line item. Depending on the item state, some of the fields may not be editable. Fields that are not editable are grayed out. See Update an order line item for more information about the editable fields.
-
After you are finished, click the Save Changes button on the top right.
Use REST API
Use the Update an order line item operation to update an order line item. Keep the following points in mind when you run the "Update an order" operation:
-
Determine the required field "itemId" and other required custom fields for the order line item.
-
The fields of an order line item are only editable in certain states, depending on the "itemState" field. See the field description for the Update an order line item operation.
The following API request updates an existing order line item without fulfillment in an order.
Request | PUT /v1/order-line-items/{itemId} |
---|---|
Request Body |
{ "itemName": "LMS Training Fee", "itemType": "Product", "description": "webcam", "purchaseOrderNumber": "PO-12345678", "productCode": "P-0000001", "quantity": 10, "amountPerUnit": 499, "listPricePerUnit": 500, "transactionStartDate": "2021-02-01", "transactionEndDate": "2021-02-01", "itemState": "SentToBilling", "billTargetDate": "2021-02-01" } |
The following API request updates an existing order line item to allow adding fulfillments to an order line item.
Request | PUT /v1/order-line-items/{itemId} |
---|---|
Request Body |
{ "itemName": "fulfillmentOLI", "billingRule": "TriggerAsFulfillmentOccurs" } |