Using amoCRM? You do not need to call this method: in the amoCRM connector settings, mark the stages that count as a sale, and the sale will be sent automatically when a manager moves a deal to such a stage. See the "Connecting amoCRM" article, section "Sales to Meta by deal stage".
Why you need this
WazzaBee knows which ad every customer came from, but it does not know how the conversation ended: that lives in your CRM. Send us the deal outcome, and the «Ads» section will show sales, revenue and average order value for each ad: you will see which creative brings money and which one only brings enquiries.
Sales and qualified leads are sent to Meta if "Sales in Meta" is connected in the Ads section and the customer came from a "Send WhatsApp message" ad. Your ads then learn from buyers. See "Ads and Meta CAPI".
POST /v1/outcomes
URL
POST https://api.wazzabee.com/api-gateway/v1/outcomes
Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Request body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chatId | string | ✅ Yes* | The customer's phone number or their messenger ID. We take the latest conversation of that contact |
conversationId | string (UUID) | ✅ Yes* | The conversation ID, if you have it stored. More precise than chatId |
outcome | string | ✅ Yes | sale: a sale, qualified: a qualified lead, refused: declined, no_answer: no reply |
amount | number | For sale | The sale amount. Without it we cannot accept a sale: there would be nothing to calculate in the return-on-ad-spend report |
currency | string | No | The currency of the amount, KZT by default |
channelId | string (UUID) | No | The channel. Pass it if the same number writes to you on several channels |
comment | string | No | A note: what was bought, any details. Up to 500 characters |
* You need either chatId or conversationId, at least one of them.
Request example
curl -X POST "https://api.wazzabee.com/api-gateway/v1/outcomes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chatId": "77071234567",
"outcome": "sale",
"amount": 185000,
"comment": "Spain visa, paid in full"
}'
Response
{
"success": true,
"conversationId": "uuid",
"outcome": "sale",
"amount": 185000,
"currency": "KZT"
}
Errors
| Code | Reason |
|---|---|
| 400 | outcome is missing or unknown; amount was not passed for a sale; neither chatId nor conversationId was provided |
| 403 | The channel is not linked to your integration |
| 404 | Conversation not found: the customer has not written to you yet, or the number differs from the one they wrote from |
How to wire it into your CRM
Call the method at the moment the deal changes stage. One call per transition is enough.
- Deal paid →
outcome: "sale"and the amount paid; - Lead qualified but has not paid yet →
outcome: "qualified"; - Declined →
outcome: "refused"; - Not answering →
outcome: "no_answer".
sale with the amount paid. We count money, not the outcome of the case.
Calling the method again for the same conversation overwrites the previous outcome: an agent can fix a mistake and we keep the current value. There will be no duplicates.
