We are making changes to the WhatsApp Business Platform pricing model. See Pricing Updates on the WhatsApp Business Platform.
You can compare two templates by examining how often each one is sent, which one has the lower ratio of blocks to sends, and each template's top reason for being blocked.
Use the WhatsApp Message Template > Compare endpoint to target one template and compare it with another.
GET /<WHATSAPP_MESSAGE_TEMPLATE_ID>/compare ?template_ids=[<TEMPLATE_IDS] &start=<START> &end=<END>
Placeholder | Description |
---|---|
| ID of the WhatsApp Message Template to target. |
| ID of the WhatsApp Message Template to compare the target to. |
| UNIX timestamp indicating start of timeframe. See Timeframes. |
| UNIX timestamp indicating end of timeframe. See Timeframes. |
Timeframes are limited to 7, 30, 60 and 90 day lookbacks from the time of the request. To define a timeframe, set your end date to the current time as a UNIX timestamp, then subtract the number of days for your desired timeframe, in seconds, from that value:
604800
for a 7 day window.2592000
for a 30 day window.5184000
for a 60 day window.7776000
for a 90 day window.Upon success, the API will return a list of WhatsApp Business Template Comparison nodes describing each template's block rate, number of times sent, and top reason for being blocked.
{ "data": [ { "metric": "BLOCK_RATE", "type": "RELATIVE", "order_by_relative_metric": [<ORDER_BY_RELATIVE_METRIC>] }, { "metric": "MESSAGE_SENDS", "type": "NUMBER_VALUES", "number_values": [<NUMBER_VALUES>] }, { "metric": "TOP_BLOCK_REASON", "type": "STRING_VALUES", "string_values": [<STRING_VALUES>] } ] }
Placeholder | Description |
---|---|
| Array of template ID strings, in increasing order of block rate (ratio of blocks to sends). |
| Array of message send number value objects. Objects have the following properties:
|
| Array of top block reason string value objects. Objects have the following properties:
Block reasons can be:
See the View metrics for your WhatsApp Business message template help center topic for descriptions of these reasons. |
curl -X GET 'https://graph.facebook.com/v21.0
/5289179717853347/compare?template_ids=[1533406637136032]&start=1674844791182&end=1674845395982' \
-H 'Authorization: Bearer EAAJB...'
{ "data": [ { "metric": "BLOCK_RATE", "type": "RELATIVE", "order_by_relative_metric": [ "1533406637136032", "5289179717853347" ] }, { "metric": "MESSAGE_SENDS", "type": "NUMBER_VALUES", "number_values": [ { "key": "5289179717853347", "value": 1273 }, { "key": "1533406637136032", "value": 1042 } ] }, { "metric": "TOP_BLOCK_REASON", "type": "STRING_VALUES", "string_values": [ { "key": "5289179717853347", "value": "UNKNOWN_BLOCK_REASON" }, { "key": "1533406637136032", "value": "UNKNOWN_BLOCK_REASON" } ] } ] }