Order Details Template Message

Creating an order details template from Meta Manager

To create an order details template, the business should use their Meta Business Manager within their WhatsApp Business Platform account. Once logged into a WhatsApp Platform account, they access the Message Templates under WhatsApp Manager > Account tools section and follow the below steps:

1

Click on create template

2

Select Utility category to expand Order details message option

3

Enter the desired template name and supported locale

Depending on the number of locales selected there will be an equal number of template variants and businesses need to fill in the template details in respective locale.

4

Please fill in template components such as Header, Body and optional footer text and submit.

5

Once submitted, templates will be categorized as per the guidelines and undergo the approval process, please refrain from having marketing content as part of template components.

6

The template will be approved or rejected after the template components are verified by the system.

7

Once approved template status will be changed to ACTIVE

Please be informed that template's status can change automatically from ACTIVE to PAUSED or DISABLED based on customer feedback. We recommend that you monitor status changes and take appropriate actions whenever such change occurs

Support content:

Sending order details template message

Order details template message allows the businesses to send invoice(order_details) message as predefined Open order details call-to-action button component parameters. It supports businesses to send all payment integration (Payment Gateway or Payment Links) integration as button parameters.

1

Make a POST call to /messages endpoint and attach a message object with type=template

2

Add a template object with a predefined Open order details call-to-action button.

The following sample describes how to send order details template message parameters to prompt the consumer to make a payment, as an example:
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "PHONE_NUMBER",
  "type": "template",
  "template": {
    "name": "TEMPLATE_NAME",
    "language": {
      "policy": "deterministic",
      "code": "LANGUAGE_AND_LOCALE_CODE"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "image", // Uses header with image as an example
            "image": {
              "link": "http(s)://the-url"
            }
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "order_details",
        "index": 0,
        "parameters": [
          {
            "type": "action",
            "action": {
              "order_details": {
                "currency": "INR",
                "order": {
                  "discount": {
                    "offset": 100,
                    "value": 250
                  },
                  "items": [
                    {
                      "amount": {
                        "offset": 100,
                        "value": 400
                      },
                      "name": "ORDER_ITEM_NAME",
                      "product_id": "ORDER_ITEM_PRODUCT_ID",
                      "quantity": 1,
                      "retailer_id": "ORDER_ITEM_RETAILER_ID",
                      "country_of_origin": "ORIGIN_COUNTRY",
                      "importer_name": "IMPORTER_NAME",
                      "importer_address": {
                        "address_line1": "IMPORTER_ADDRESS",
                        "city": "CITY",
                        "country_code": "COUNTRY",
                        "postal_code": "ZIP_CODE"
                      }
                    }
                  ],
                  "shipping": {
                    "offset": 100,
                    "value": 0
                  },
                  "status": "pending",
                  "subtotal": {
                    "offset": 100,
                    "value": 400
                  },
                  "tax": {
                    "offset": 100,
                    "value": 500
                  }
                },
                "payment_configuration": "unique_payment_config_id",
                "payment_type": "upi",
                "reference_id": "reference_id_value",
                "total_amount": {
                  "offset": 100,
                  "value": 650
                },
                "type": "digital-goods"
              }
            }
          }
        ]
      }
    ]
  }
}

3

Once the order details template message is delivered, a successful response will include an object with an identifier prefixed with wamid. Use the ID listed after wamid to track your message status.

{
  "messages": [{
    "id": "{message-id}"
  }]
}

Post order details template message flow

After the order details template message delivery the rest of the payment flow is the same as “Sending invoice in customer session window” and depends on the chosen payment integration order details parameters. For more details refer to Payment Gateway or Payment Links.

Last updated

Was this helpful?