Skip to main content

Create an order line item

Zuora

Create an order line item

There are two ways to create an order line item:

  • In the Zuora application, create an order and then add order line items to this order.
  • Use the "Create an order" operation.

Use the Zuora application

To create an order line item from the UI, complete the following steps:

  1. Log in to the Zuora application and then navigate to Customers > Orders. The Orders page opens.
  2. Click Create New Order at the top right. The Create New Order page opens.

  3. In the Order Overview area, enter the name of the account that owns the order in the Account field. By default, the account that owns the order will also own the order line item.

    You can enter the account by clicking either Account Name or Account Number.

    • If you click Account Name, type part of the account name in the Account field and the filtered accounts can be dynamically listed for your selection.
    • If you click Account Number, type the complete account number.
  4. In the Order Date field, enter the order date you are to assign to the order.

  5. In the Order Line Items area, click ADD ORDER LINE ITEM on the right. The Add Order Line Item window is displayed.

  6. Provide detailed information about the order line item. 

    Section Field name Description
    Basic Information Item Name Required field. Name of the order line item. This name represents the name of the object that is sold and will typically be displayed on invoices, quotes, portals, and so on.
    Product Code The product code that is used as an identifier for the downstream system. This code is used to map the products in external systems such as the SKU in an external product catalog or a provisioning system.
    Item Type Required field. The category of the order line item. Valid values are Fee, Product, and Services.
    Transaction Date The date of the order line item transaction. If it is not specified, the Order date will be used as the transaction date.
    Description A brief description of the order line item for reference.
    Item State State of the order line item. Valid values are Executing, Sent To Billing, Complete, and Canceled. By default, the starting state of an order line item is Executing. For more information, see Order Line Item States and Order States.
    Bill Target Date

    The date when the order line item will be invoiced.

    Pricing List Price Per Unit The list price per unit at the time of transaction. This field is used for reporting purposes. The Amount Per Unit value is used to determine the charge amount for this order line item. If List Price Per Unit is not specified, Amount Per Unit will be used as the list price.
    UOM Unit of measure. The UOM is defined in Billing settings
    Amount Per Unit Required field. The amount that is charged per unit excluding discounts. This field can contain tax for tax inclusive.
    Quantity Quantity of the order line item to be purchased. The charge amount will be calculated based on the specified Quantity and Amount Per Unit values. When this field is specified, each unit must be identical and you cannot modify a unit individually. To have a different unit, create another order line item.
    Sold To Contact First Name

    Use this section to specify the information about the Sold To Contact for this order line item. You have three options:

    • Leave this section empty by keeping the Use Billing Contact toggle button turned on. The default Sold To Contact under the invoice owner account of this order line item will be used as the Sold To Contact for this order line item.
    • Create a new contact as the Sold To Contact for this order line item by filling in the relevant fields. To edit the relevant fields, you must first turn the Use Billing Contact toggle button off.
    • Use an existing contact of the customer account by filling in the relevant fields. To edit the relevant fields, you must first turn the Use Billing Contact toggle button off.
    Last Name
    Country
    State
    City
    County
    Postal Code
    Address 1
    Address 2
    Tax Tax Mode Indicates whether the charge amount is tax inclusive or tax exclusive.
    Tax Code The tax code that is used to identify the appropriate tax rules and rates to apply to this order.
    Finance Revenue Recognition Rule Name of the applicable revenue recognition rule.
    Recognized Revenue Accounting Code The accounting code for recognized revenue.
    Deferred Revenue Accounting Code The accounting code for deferred revenue.
    Additional Information The custom fields that are defined on the Order Line Item object.
  7. After you are finished, click Save. The Add Order Line Item window is closed.

  8. (Optional): Repeat Step 5 - 7 to create more order line items as you need in the current order. The maximum number of order line items allowable in an order is 100. Use the Actions link to either edit or delete an order line item after creation.

  9. (Optional): When the order line item state is Sent To Billing with the Bill Trigger Date field specified, you can preview the billing information for the order. To do that, click Preview Billing. Specify the preview settings and click Update Preview to see the preview invoices. After you are finished, click Back to return to the previous page.

  10. Click Activate to activate the order.

  11. (Optional): To generate invoices for the order line item in the Sent To Billing status, create a bill run. For instructions, see Creating Bill Runs.

Use the REST API

Use the Create an order operation to create an 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 order line item:

    • itemName
    • itemType
    • itemState
    • amountPerUnit
  • Use the itemState and billTargetDate fields to determine the order line items that are to be invoiced at the specified date. For an order line item to be invoiced, its state must be SentToBilling. When a bill run is created, it will pick up order line items to be invoiced based on the billTargetDate field.

  • Use the processingOptions section to indicate whether an invoice should be generated and whether payment should be collected.

  • Specify the Sold To contact for the order line item. You have three options:

    • Skip the soldToContact section and the soldTo field. The Sold To Contact of the customer account will be used as the Sold To Contact for this order line item.
    • To create a new contact as the Sold To Contact for this order line item, specify the relevant fields in the soldToContact section.
    • To use an existing contact of the customer account, specify contact ID for the soldTo field.

The following API request creates two order line items for an existing customer account and also runs billing and payment at the same time. For the first order line item, an existing contact of the customer account is used as the Sold To contact. For the second order line item, a new contact is created and used as the Sold To contact.

Request POST /v1/orders
Request Body
{
  "existingAccountNumber":"A00000002",
  "orderDate":"2021-04-27",
  "description":"",
  "orderLineItems": [
      {
          "itemName": "LMS Training Fee",
          "itemType": "Product",
          "description": "webcam",
          "purchaseOrderNumber": "PO-12345678",
          "productCode": "P-0000001",
          "quantity": 10,
          "amountPerUnit": 499,
          "listPricePerUnit": 50,
          "transactionDate": "2021-02-01",
          "itemState": "SentToBilling",
          "billTargetDate": "2021-02-01",
          "soldTo": "2c92c8fe7278f85b01727d4af6bf626f"
      },
      {
          "itemName": "delivery fee",
          "itemType": "Fee",
          "description": "delivery fee",
          "purchaseOrderNumber": "PO-12345678",
          "productCode": "F-0000001",
          "quantity": 1,
          "amountPerUnit": 12.95,
          "listPricePerUnit": 12.95,
          "transactionDate": "2021-02-01",
          "itemState": "SentToBilling",
          "billTargetDate": "2021-02-01",
          "soldToContact":{
             "address1": "123 Main St",
             "city":"Chamblee",
             "state": "Georgia",
             "country": "USA",
             "postalCode": "30341",
             "firstName": "Shaf",
             "lastName": "Ahnaf"
          },          
          "customFields": {
              "Color__c": "black",
              "Mode__c": "scalar"
          }
      }
  ],
  "processingOptions": {
      "runBilling": true,
      "collectPayment": true
  }
}