Media Alpha Two Step Ping/Post for a Dynamic Endpoint
https://retreaver.com/webhook-configurator/v1/?call_key=[call_key]&call_uuid=[call_uuid]
&output_tag_prefix=media_alpha_12345
&ping_url=https://insurance.mediaalpha.com/call-transfers-ping.json
&ping_method=POST
&ping_headers={"Content-Type":"application/json"}
&ping_data={"api_token":"API_TOKEN","call_type":"Inbound","data":{"zip":"[caller_zip]"},"ip":"","local_hour":12,"max":3,"placement_id":"PLACEMENT_ID","sub_1":"","transfer_type":"cold","ua":"","url":"","version":17}
&ping_output_map={"PingOutputMap":{"ping_bid_id":"call_transfers%5B0%5D.bid_id","ping_ping_id":"ping_id","ping_error":"error"}}
&return_ping_response=true
&send_post=true
&post_condition_key=ping_bid_id
&post_condition_operator=exists
&post_condition_value=0
&post_url=https://insurance.mediaalpha.com/call-transfers-post.json
&post_method=POST
&post_headers={"Content-Type":"application/json"}
&post_data={"api_token":"API_TOKEN","bid_id":"<podd_start>ping_bid_id<podd_end>","call_type":"Outbound","data":{"zip":"[caller_zip]"},"ip":"","local_hour":12,"ping_id":"<podd_start>ping_ping_id<podd_end>","placement_id":"PLACEMENT_ID","transfer_type":"cold","url":"","version":17}
&post_output_map={"PostOutputMap":{"final_bid":"bid","final_timer":"qualification_duration","transfer_number":"phone_num","post_error":"error"}}
&return_post_response=true
Webhook Template Summary:
This webhook will attempt to pass caller data to Media Alpha in order to potentially return a dynamic transfer number, conversion bid and conversion timer.
Webhook Template Implementation Guide:
Step 1) Create a new Media Alpha buyer profile:
Create a new buyer profile that will utilize the returned transfer number, bid and timer values returned by the webhook template. At minimum, add a descriptive name and a placeholder number such as "1234567890":
Press the "Create Call Buyer" button to create the buyer profile:
Note the system buyer ID after creating this buyer profile - we will use this unique value in our output tag in later steps to identify which buyer the integration is intended for:
For the purpose of this example, the buyer ID of the newly created buyer is "72544", but your buyer ID will differ - be sure to match your unique buyer ID in later steps.
Step 2) Configure the dynamic transfer number:
Head back to the buyer you created in step 1 and hit "edit". Replace the number portion of the buyer using the following syntax: [media_alpha_72544_transfer_number]:
Step 3) Configure the conversion override tags:
Create a new conversion criteria on the buyer profile, and apply the following tags:
The "seconds_tag" tag value should be "media_alpha_72544_final_timer".
The "revenue_tag" value should be "media_alpha_72544_final_bid".
This will override the default conversion criteria and instead utilize the duration and bid provided by the Media Alpha API:
Note: If you do not see the seconds_tag and revenue_tag fields, contact Retreaver support to enable the "conversion tag override" feature on your Retreaver account.
Optional Note: Adding minimum bids / maximum duration filters: As a side note, you could add a minimum bid or maximum duration by applying the seconds/revenue tags on the buyer. Use the tag wizard to add a numeric tag on the buyer. This will prevent the buyer from being routed to unless the tags match with the call:
Step 4) Create a new Retreaver Campaign Webhook:
Head to your Retreaver campaign edit menu, scroll down to the webhooks section, and create a new webhook using the "Start - When a call comes in" webhook trigger:
Copy the webhook template from the top of this guide into the URL field:
Step 5) Configure the webhook output tag prefix:
Modify the "output_tag_prefix" webhook configurator parameter by adding the associated buyer ID you created in step 1 to the end of the "media_alpha_12345" value.
For our example, the output_tag_prefix will now be "&output_tag_prefix=media_alpha_72544":
Step 6) Configure the webhook template to your offer:
Replace the Media Alpha API_TOKEN and PLACEMENT_ID parameters in your webhook, paste the values within the enclosed double quotes. Be sure to replace the parameters in both the "ping_data" & "post_data" fields with the values provided by your partner specifications:
Lastly name the webhook something descriptive such as "Media Alpha Webhook 72544" and update your campaign.
Step 7) Apply the new Media Alpha buyer to your campaign routing settings:
Scroll to the routing settings on your campaign edit screen, and place in your new buyer once you are ready to go live:
For more information on Retreaver Webhook Templates, view our support guide:
Comments
Please sign in to leave a comment.