# Order Details Template Message

### Creating an order details template from Meta Manager <a href="#creating-an-order-details-template" id="creating-an-order-details-template"></a>

To create an order details template, the business should use their Meta Business Suite 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:

{% stepper %}
{% step %}
Click on `create template`
{% endstep %}

{% step %}
Select `Utility` category to expand `Order details message` option
{% endstep %}

{% step %}
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.
{% endstep %}

{% step %}
Please fill in template components such as `Header`, `Body` and optional `footer` text and submit.
{% endstep %}

{% step %}
Once submitted, templates will be [categorized as per the guidelines](https://docs.360dialog.com/docs/resources/templates#template-categories) and undergo the [approval process,](https://docs.360dialog.com/docs/resources/templates) please refrain from having marketing content as part of template components.
{% endstep %}

{% step %}
The template will be approved or rejected after the template components are verified by the system.&#x20;
{% endstep %}

{% step %}
Once approved template [status](https://docs.360dialog.com/docs/resources/templates#template-statuses) 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](https://docs.360dialog.com/docs/resources/templates#template-statuses) and take appropriate actions whenever such change occurs
{% endstep %}
{% endstepper %}

### Support content:&#x20;

{% embed url="<https://www.facebook.com/business/help/2055875911147364?id=2129163877102343>" %}

### Sending order details template message <a href="#sending-order-details-template-message" id="sending-order-details-template-message"></a>

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](https://docs.360dialog.com/docs/messaging/payments/payments-singapore-only/receive-whatsapp-payments-via-stripe) or [Payment Links](https://docs.360dialog.com/docs/messaging/payments/payments-india-only/receive-whatsapp-payments-via-payment-links)) integration as button parameters.

{% stepper %}
{% step %}
Make a `POST` call to /`messages` endpoint and attach a message object with `type=template`
{% endstep %}

{% step %}
Add a template object with a predefined `Open order details` call-to-action button.

<details>

<summary>The following sample describes how to send order details template message parameters to prompt the consumer to make a payment, as an example:</summary>

```json
{
  "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"
              }
            }
          }
        ]
      }
    ]
  }
}
```

</details>
{% endstep %}

{% step %}
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.

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

{% endstep %}
{% endstepper %}

### Post order details template message flow <a href="#post-order-details-template-message-flow" id="post-order-details-template-message-flow"></a>

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](https://docs.360dialog.com/docs/messaging/payments/payments-singapore-only/receive-whatsapp-payments-via-stripe) or [Payment Links](https://docs.360dialog.com/docs/messaging/payments/payments-india-only/receive-whatsapp-payments-via-payment-links).
