Click HTTP above the Template Editor to select this format type.
In theory, if a buyer specification contains a sample request to the buyer API, you can copy it to the Template Editor to simplify mapping process. However, in practice, sample requests in specifications rarely contain all the necessary fields. So it is recommended to map all the fields manually.
Map all the fields using instructions below for our Example Buyer Specification.
1. lead_type - determines the type of lead. MUST be '5' for Auto Insurance.
If there is no field on PX side for mandatory mapping you can hardcode some value agreed with the buyer for this particular case. To execute hardcoding, enter necessary value after the ‘=’ sign.
Enter the field name lead_type, ‘=’ and put ‘5’ to hardcode this field, then enter ‘&’ symbol to separate it from the next field: lead_type=5&
.
2. lead_mode is hardcoded similarly to the previous field:
The fields 3-5 (email, address, email and address) in our specification contain contact data of the lead, which is not included to ping request and will be added only on the post stage.
6. tcpa_text contains the TCPA message that is shown to consumers on the form where their information is submitted.
Enter ‘tcpa_text=’ and put ‘{‘ to open the list of PX fields for corresponding vertical (Auto in our case). Start typing the field name to find the most appropriate PX field and click it for selection.
On the Mapping Panel, select URL encoding in the Encoding Type dropdown menu. Read more about Field Encoding.
The tcpa_text tag displays a text message shown to the end-user when submitting the form. Open the PX specification for Auto Vertical and find the following TCPA message:
By clicking Get My Quotes, I authorize security companies, their dealers and partner companies to contact me about security offers by phone calls and text messages to the number I provided. I authorize that these marketing communications may be delivered to me using an automatic telephone dialing system or by prerecorded message. I understand that my consent is not a condition of purchase.
Copy and paste this text to Custom Value For Non Collected Leads field:
7. origination_datetime - Date/time when lead was submitted by consumer, in format 'YYYY-MM-DD hh:mm:ss', e.g. '2017-03-16 07:16:51'.
Enter origination_datetime={
and select the appropriate PX field (Lead Creation Date):
The date format in the specification is YYYY-MM-DD, which is different from PX default formatting. Enter the necessary format to Custom Date Format field on the Mapping Panel:
Read more about custom date formatting.
8. phone_last_4 - Last 4 digits of primary_phone. Required by some buyers on ping.
Map the field according to instructions in 7th point:
On the Mapping Panel, enter the necessary format to Custom Phone Format field.
Read more about custom phone number formatting.
9. residence_type - Primary applicant’s residence status. 0 = Own, 1 = Rent.
Map the field according to instructions in 7th point:
Then map the field’s options using Mapping Panel.
1) Click On for Answer Values:
2) Map data formats by entering appropriate values from buyer specification to PX fields:
10. haveInsurance - Indicates whether driver1 has a current auto insurance policy or not. May include auto insurance policies that have expired no more than 30 days in the past. 0=No, 1=Yes.
When there is a condition in the field options, such fields should be mapped using Perform Check functionality. Use instructions in the document to map haveInsurance field properly in the Template Editor and on Mapping Panel:
According to these configurations, PX system will check whether the driver from the lead is insured or not and assign appropriate values (0 or 1), which are accepted by buyer.
The fields 11-14 in the specification (insuranceCompany, current_policy_start_date, current_policy_expiration_date, continuously_insured_period) are required only if haveInsurance=1(Yes). In this case, Perform Check should be used as well, so that PX system first checks haveInsurance field, and then decides whether to use next four fields or not.
Map all the fields and their options that are required if the haveInsurance=1 inside the PerformCheck tag, using these instructions (do not forget to put & before the first field):
13. current_policy_expiration_date - driver1's current policy expiration date, in the format YYYY-MM-DD. A date no more than 30 days in the past, the current date, or a future date.
Map this field according to instructions in the 7th point and enter 0 years and 01 months in Default Value field:
Read more about date shifting.
The fields 15 and 16 (driver1_firstname and driver1_lastname) in our specification contain contact data of the lead, which is not included to Ping request and will be added only on the post stage.
The fields 17-19 are driver1_gender, driver1_dob, and driver1_maritalStatus.
There can be many drivers in a lead in Auto vertical that have the same fields in buyer specifications with different indexes (driver1, driver2, etc). For this purpose, API Builder has Field Cloning and Indexing features.
In our example, fields are used with the following Index tags:
-
driver1_gender ->
driver{QuoteRequest.Drivers.Driver.Index_OneBased}_gender
-
driver1_dob ->
driver{QuoteRequest.Drivers.Driver.Index_OneBased~1}_dob
-
driver1_maritalStatus ->
driver{QuoteRequest.Drivers.Driver.Index_OneBased~2}_marital_status
To clone fields with different indexing, follow these instructions:
1. Put Each Driver Start and Each Driver End tags:
2. Map all the fields (and their options) that are required for drivers with different indexes between these two tags:
Fields 20-22 (vehicle1_year, vehicle1_make, vehicle1_vin) are mapped similarly as driver fields, using Field Cloning and Indexing:
22. Let's take a closer look at the mapping of the vehicle1_vin field - the Vehicle Identification Number, e.g. '1ACBC535*B*******'.
On the Mapping Panel, enter the necessary format to Custom VIN Format field.
Read more about Custom VIN Formatting.
Here is what Map Your Ping API Fields & Inputs block with HTTP formatting looks like when all fields from the buyer specifications have been mapped:
It is recommended to click Save at the bottom of the Step 2 - Map API Inputs periodically to save your mappings.
As soon as you are done, click Save and Continue to save your mappings and proceed with the next step.
As soon as all fields are mapped for ping request, it is recommended to go to Step 3 and then to Step 4 in order to make all possible testing, and only after that proceed with mapping Fields & Inputs for Post request. This flow allows avoiding random lead sales because of sending post request to the buyer.
0 comments
Please sign in to leave a comment.