Creates a new metric event for a contact identified by their phone number. Metric events are the core building block for tracking customer actions and triggering automated WhatsApp flows.
Use Cases
1. Performance & Revenue Tracking
Track any customer action (purchases, sign-ups, cart additions, etc.) to measure the effectiveness of your WhatsApp campaigns.
Attribution: When the metric name is set to order, Wax automatically attributes conversions to your WhatsApp campaigns. If the contact had a conversation within the attribution window (configured in organization settings), the order will appear as a conversion in:
- The Performance Dashboard
- Automation performance reports
- Broadcast performance reports
This allows you to measure ROI and understand which campaigns drive the most revenue.
2. Triggering Automations
Metric events can trigger WhatsApp automation flows. For example:
- Send an order confirmation when an
orderevent is received - Trigger a welcome flow when a
sign_upevent occurs - Send a cart reminder when a
cart_abandonedevent is tracked
To set this up, create an automation in Wax with a Metric Event trigger and specify the metric name to listen for.
Using Properties as Flow Variables
The properties field allows you to pass any custom data with the event. All properties are available as variables in your automation flows, enabling highly personalized messages.
Example: If you send a metric event with properties like product_name, order_total, and delivery_date, you can use them in your flow messages as: "Hi! Your order for {{product_name}} ({{order_total}}€) will arrive on {{delivery_date}}."
This makes it easy to send dynamic, personalized content without hardcoding message templates for each scenario.
Deduplication
Use the unique_id parameter (e.g., your order ID) to prevent duplicate events. If an event with the same unique_id already exists for the metric, the request will be rejected with a 409 Conflict error.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
429too many requests