Often a call buyer does not pay based on call-duration, rather they pay when an actual sale has occurred. In these cases, the call buyer will wish to post data back to Retreaver to inform us that a conversion has happened.
To facilitate this process, Retreaver introduces the concept of call keys. Call keys are special API keys that are uniquely associated with a call. In conjunction with the call's UUID, the call key grants the holder the ability to update calls using the Retreaver API.
You can pass call UUIDs and keys to your buyers via webhook or through SIP headers.
Buyer Postback Overview
Passing the call UUID and key to a buyer
Method 1: via webhook, for buyers not using SIP
Adding an "answered" ping Webhook.
-
To add an answered ping, scroll to the "Webhooks" section of your campaign configuration. Click the green plus to add a new webhook group and set the trigger type to "answered".
-
To ensure the webhook is only triggered for calls routed to a specific buyer, use the Wizard to tag the webhook with your buyer's
system_buyer_id
. This webhook will now only be triggered for calls that have been accepted by the given buyer. -
Your buyer will need to provide you with an HTTP endpoint capable of receiving and processing the request. Use replacement tokens to designate where the call UUID -
[call_uuid]
- and key -[call_key]
- will be inserted in the URL.
You will need to work with your Buyer to determine the format of the URL itself, at minimum they will need the call UUID and key to pass data back to Retreaver. They will most likely also need the caller ID of the caller so they can correlate the call with the correct contact record in their systems.
Method 2: via SIP header
If your Buyer is using a SIP-based phone number, the call UUID and key will be automatically passed to them via SIP headers. They should look for headers named X-PH-RetreaverUUID
and X-PH-RetreaverKey
in the SIP INVITE, and store these values for later use.
Adding tags to calls via our call API
Use the "add_tags" method to attach tags to a call on a UUID basis, this ensures that any tags passed along using this method are only applied to this one particular call and not any subsequent return calls.
Once your endpoint has the call UUID and key, they can make API requests to Retreaver and add tags to calls using the "add_tags" method:
https://retreaver.com/calls/CALL_UUID/add_tags?key=CALL_KEY
Have your buyer replace CALL_UUID and CALL_KEY with the actual values that we passed to them. To add tags to the call, simply append additional URL parameters:
https://retreaver.com/calls/CALL_UUID/add_tags?key=CALL_KEY&tag=value&tag2=value2
Calling the above URL (via GET, POST, or HEAD) will result in the call being tagged tag:value
, tag2:value2
. Your buyer can call this endpoint repeatedly to add additional tags to this one particular call.
Note for Repeat Caller Handling
Note: If "Repeat Caller Handling" is enabled on a campaign toggle - Tags associated to prior calls will be carried over to subsequent return calls.
This could cause duplicate tag issues if the tags assigned via the add_tags method were meant for a single call instance, such as the case with ping/post integrations that return bids or transfer numbers.
In order to prevent repeat caller handling from retagging subsequent calls, please open a support ticket to request a flag on your account in order to disable this feature while still maintaining the ability to route to previous or new buyers that come with the repeat caller handling functionality.
Informing Retreaver of a conversion
In order to track conversions based on data posted back to us, you'll need to have a postback conversion group defined for your Campaign. There are two ways you can implement conversion postbacks, either using a posted-back revenue value or using a string-matching conversion trigger with a pre-set revenue and payout.
Using a posted-back revenue value
Configuring a postback conversion with posted-back revenue value.
Firstly apply a filter tag to the "matches" field, this will instruct Retreaver to only allow a conversion postback if the call came from a certain publisher or was processed by a particular endpoint.
The Postback Timeout field defines how many seconds after the call ends Retreaver should wait before deeming the call non-converted. Retreaver waits until a postback is received or the timeout is reached before firing any post-call webhooks.
In order to derive the payout from the revenue that is posted back, you can set a modifier in the "posted-value payout modifier" field. The string that you enter in the field will be evaluated operation-by-operation from left to right, and the operators can include * (multiplication), / (division), - (subtraction), and + (addition).
In order to multiply the value posted back by 0.8, enter *0.8
in the field. For a call with $10.00 in revenue, this would cause the payout to be set to $8.00. If the modifier field is left blank, the payout will be set to the revenue amount, which is likely not what you want.
In cases where you are not paying a publisher, set the payout to zero by setting the modifier to *0
.
Once you are finished configuring the postback criteria, update the campaign to apply your changes. You can then view the postback instructions and generate a unique postback URL that your partners will use in a POST HTTP webhook request to confirm a conversion from their end.
Using a conversion trigger with a static revenue and payout
Perhaps you have a call buyer that has agreed to pay you a certain price, but they simply want to post back to you whether or not there has been a sale. In this case, you can configure a Postback conversion to use a "conversion trigger", which is a keyword that we will look for in the Postback request URL from your buyer that will indicate a successful conversion has occurred..
Your buyer will need to replace the call UUID and call key with the correct values and send an HTTP request to the URL. We will then detect that a conversion has occurred and set the static revenue and payout on the call.
Setting an appropriate postback timeout
When using postback conversions, all post-call webhooks are delayed until it has been decided whether or not the call has converted. By default, a timeout of 10 minutes after the call ends is set.
If we don't receive a postback from your Buyer, the call will be counted as non-converted and any non-conversion webhooks will be processed. If a conversion value is posted back after this happens, we'll mark the call as converted and process any conversion webhooks.
In cases where tag data is posted back that doesn't cause a conversion to be triggered, a non-conversion will not be triggered until the postback timeout expires.
Comments
Please sign in to leave a comment.