Conversions API (CAPI) for WhatsApp Ads – Track CTWA Events | WOZTELL

Conversions API for WhatsApp (CTWA)

Introduction

Click-to-WhatsApp Ad (CTWA) is a common way to provide entry point from the ad directly into the Whatsapp conversation. With the support of Ads Trigger and App Events, you can create a complete conversion flow in the chatbot builder.



Set up CTWA

To begin with, you need to set up a Click-to-WhatsApp Ad (CTWA) so that customers can be redirected from the app to your business number.

To set up the CTWA in the Ads Manager, you can refer to the guide provided by Meta.



Grant Ads Permission

  1. To enable the features related to Click-to-WhatsApp ads and Conversion Event on WOZTELL, please allow the Ads Permission on the platform page of the WhatsApp Cloud channel.

NOTE

Please make sure the Facebook user performing the Facebook Login for Business flow has the "Full Control" to manage the relevant ad account.



  1. At the first step of the Login for Business flow, select the Business Account to connect with WOZTELL.
  1. Choose the page to be associated with.
  1. Choose the Ad account to be connected to.

Idea
NOTE:

This dataset is essential to register conversion events through the Conversions API. WOZTELL handles dataset creation automatically using your WhatsApp Business Account ID (`waba_id`) and links it to your connected page. This dataset acts as the destination where Meta receives event data for performance measurement.
  1. For the conversion API, Meta will create a dataset in the Events Manager, which is named after the name of the associated page.

  1. Allow WOZTELL to have the following permissions.
  1. Now WOZTELL has been connected to your business account.
  1. Click "Back to Woztell" to close the pop-up window.


Features

By allowing the Ads Permission, you now have access to features related to CTWA and the Conversions API.

CTWA Preview

With the Ads Permission, the Click-to-WhatsApp Ad (CTWA) can be visualized in the conversation history in order to distinguish it from other kind of entry.

The Click-to-WhatsApp Ad (CTWA) can also be displayed in the inbox thread.



Ads Trigger

The Meta Ads Trigger allow you to create chatbot flow specifically for members who entered the conversation by CTWA. It is able to recognize entry via a "particular ad" or "any ads". On top of that, you can also add keyword groups to the trigger.

Idea
NOTE

If you set up the Ads Trigger without any keyword group, it will be triggered by any user input, if that member is associated with an ad.


Create Trigger

  1. First, create a global node.
  1. Create a new trigger and select Meta Ads Trigger.
  1. You can add keyword to the trigger.
  1. Besides, you can decide if the chatbot is triggered by All Ads or Specific Ads with the corresponding Ad ID.

Create Response

  1. To place the response, create a general node.
  1. Create a new response.
  1. Add the response message and save the node.
  1. Finally, make sure you are redirecting from the global node to the general node with response.


Send Conversion Event

For customers that enters the conversation via CTWA, Meta supports the Conversion events to help keep track on possible conversions. You can make use of the action to mark the a completed purchase or submitted lead at certain point of your chatbot flow.

These events will be sent to Meta and with association to a particular CTWA ad.


Idea
NOTE:

To ensure proper attribution of the conversion to the original ad click, the event payload must include the "ctwa_clid" field (Click-to-WhatsApp Click ID). This identifier is automatically captured by WOZTELL from the `referral` object in the webhook when a user initiates a conversation through a CTWA.
You must store this ID and send it later when a conversion (e.g. lead submitted or purchase) occurs in the conversation.




  1. Given you have a chatbot flow for user entry via CTWA, you can create a new node for sending the event.
  1. Create a new action.
  1. Select "Send Conversion Event", then choose the corresponding "WABA ID", "Ads Account ID" and "Ads ID".


{
  "data": [
    {
      "event_name": "Purchase",
      "event_time": 1675999999,
      "action_source": "business_messaging",
      "messaging_channel": "whatsapp",
      "user_data": {
        "whatsapp_business_account_id": "<WABA_ID>",
        "ctwa_clid": "<CLICK_ID>"
      },
      "custom_data": {
        "currency": "USD",
        "value": 123
      }
    }
  ],
  "partner_agent": "WOZTELL"
}
  1. Under "Event Type", if you are selecting "Purchase", please specify the "Currency" and "Value".
  1. If you are selecting "Lead" event, there will be no further field required to input.
  1. If needed, you can also include additional information under the "Optional Input". Please refer to here for details.
  1. Once the node containing the "Send Conversion Event" action is executed, will be sent to Meta to mark a completed conversion.

Warning
Important:

Meta does not deduplicate events automatically. If there’s a possibility of sending the same conversion multiple times (e.g., via retries or multiple flows), ensure your system handles deduplication before calling the Conversions API.

To quickly confirm if the events have been sent successfully, you can head to the corresponding dataset under the Events Manager of your Facebook Business Manager.

Now, you can create and send Purchase Event or Lead Event to mark a completed conversion. The event can be displayed in the Events Manager within the Facebook Business Manager.
Once the event has been sent, you can validate it in Meta’s Events Manager by selecting the dataset associated with your business account. This confirmation ensures that Meta has received and processed the event correctly.

Idea
NOTES:

The events data will be shown in dataset configured at step 5 of the ads permission.

If you are a partner working on behalf of a client, make sure the client knows how to locate their dataset in Events Manager for verification purposes.