Sendery
Sendery

Guides

Order confirmations and line items

Send order details and totals in a template with a Line Items block.

Add line items to your email

Add a Line Items block in the template editor. It comes ready for items, adjustments, subtotal, and total. Use those names in your app’s data, or customize them in the editor.

Send the rows

Pass the rows in data when sending an email, using your published template’s key. Each item has name, quantity, and amount; adjustments such as tax or discounts have label and amount. The example below uses the block’s default variable names.

JSON
{
  "to": "[email protected]",
  "template": "order-confirmation",
  "data": {
    "order_number": "1042",
    "items": [
      {
        "name": "Notebook",
        "quantity": 2,
        "amount": "$24.00"
      }
    ],
    "adjustments": [
      {
        "label": "Tax",
        "amount": "$2.40"
      }
    ],
    "subtotal": "$24.00",
    "total": "$26.40"
  }
}

Limits and amounts

Supply 1–100 item rows and 0–20 adjustment rows. All row fields are required and accept scalar values of up to 2,000 bytes. If an adjustments variable is configured but there are no adjustments, pass []. Calculate totals and format currencies in your application; Sendery displays the supplied values.