Map Responses step allows mapping responses from the buyer’s API about a lead received from PX.
Every tab of this step includes two types of fields:
- Regular Expression fields that extract a particular part from the buyer’s response. Each field should be filled in with an expression so that all success and failure responses from the buyer API are mapped properly.
Follow Regular Expression Templates article to find specific examples or use Regular Expressions FAQ to view the description for each symbol:

- Lead Response fields are handy for testing regular expressions. Paste the response from the specification to this field to check if your expression works correctly. If the response is highlighted, it means it is successfully extracted by a regular expression entered above.
No matter if it is Ping, Post or Direct Post response, there are two types of responses:
- Success responses.
- Failure responses (mapped in Error Mapping tab)
All examples of responses are taken from the buyer specification.
The quantity of tabs available on this step depends on the Lead Type and Distribution Type of the campaign configured on Step 1.
Possible available tabs are listed below:
Success
Success tab allows map a Success status of the response from the buyer API. Success is the only static parameter of the response, so there is no need to use special symbols in the Regular Expression field.
Payout
Payout (only for Ping Post posting type) is the parameter of the success response that gives the information about how much the buyer paid for a lead.

Response ID
Response ID is a unique ID passed in the buyer response, showing the interconnection between requests and responses in a lead flow process. In general, Response ID is any additional ID sent by Buyer API, which is different from Ping ID. Response ID is most often called Lead ID in the buyer response. Nevertheless, it can have any different name.

Ping ID
Ping ID (only for Ping/Post distribution type) - the same to Response ID parameter, but used for another purpose. Ping ID parameter passed back in the ping response is stored in order to know which post corresponds to which Ping. Then it is sent back in the post request.

Error Mapping
Error Mapping tab allows mapping failure responses in order to receive error statuses or messages describing the reason why the lead was rejected.

As soon as you are done with regular expressions, map Status Codes between buyer and PX APIs. This enables PX to show to the user not only an error code but also its name.
If buyer specification does not contain a list of error codes, you will receive Unmapped Error notification on Step 4 and will be able to come back to finish error mapping:

Click the green plus icon to add the field, enter the status code from buyer specification and find the most appropriate PX status code in the drop-down menu:

Map all status codes that are mention in the specification. If there is no appropriate PX status code in the list, select GeneralError:
Click the green minus to delete the field.
All status codes that are mapped on this step are reflected on circle charts in Buyer Campaign report and act as filters in Transaction Inbound and Transaction Outbound reports.
Redirect URL
Redirect URL (for Exclusive lead type) is a part of the Pass Back mechanism that returns specific buyer responses when the lead is sold, and passes them back to the publisher. This tab is available only when Pass Back is enabled for a campaign.

Buyer Email
Buyer Email (for Exclusive lead type; enabled by request) works similarly to Buyer Raw Response and is used to pass the buyer email from buyer to publisher through PX system.

Buyer Raw Response
Buyer Raw Response (for Pay Day Loans vertical and Exclusive lead type) is used to pass the text response from buyer to the publisher as is, for example, the reason why buyer has not bought the lead. This tab is available only when Pass Back is enabled for a campaign.

Click Save and continue to save all response mappings and proceed with next step of API configuration.
Split
Split tab is available only when Brand consent is required for ping post aggregator campaign.
Split is used in Brand consent flow for ping post campaigns to accept multiple brands in a single ping response. This regex helps to split the single response with multiple brands into multiple responses with single brand each.
Default regex is the following:
<LegInfo>(?<Value><LegName>[0-9a-zA-Z\s]+</LegName><LegPrice>[\d\.]+</LegPrice>)</LegInfo>
Brand name
Brand name tab is available only when Brand consent is required for ping post aggregator campaign.
Leg Name regex enforces mapping between buyer and PX, using the value extracted from API response and Buyer's brand field name selected in campaign settings.
Default regex is the following:
<LegName>(?<Value>[^</]*)</LegName>
For each brand that can't be mapped from API response, a separate transaction appears in Transactions outbound report with BrandNotResolved
result code.
0 comments
Please sign in to leave a comment.