Response Parser Tool


There’s a new tool in Lead Prosper - the Response Parser! Using this tool you can easily parse your buyer’s API responses to extract the information that they require. To watch a tutorial on this topic click here


With the response parser, when you copy and paste an accepted ping or post response from your API specs into the left side of the tool, it will automatically parse the response into the information that you need to enter into your buyer set up

If you click on the parsed response on the right side of the tool, you will see the information in a format that matches exactly what you’ll see in the buyer set up your campaign


You'll then copy and paste this info into your Response Mapping section of your buyer setup

Now, let’s cover some specific examples of how to use the response parser


Part 1- Response Parser/Correctly Setting Response Mapping 

In this section, we'll cover how to use the Response Parser to set up response mapping based on an example response from sample ping/post API specs.


In this example, our ping post buyer is already built out except for the response mapping. To open the response parser, click on the link at the top of the response mapping section

Then open your API specs and find the ping response section. Copy the accepted response section and paste it into the left side of the response parser


Repeat the same step for the post response, pasting the information into the post section of the response parser

You can then click on success on the right side of the ping section of the parser. This will bring up a window with the information that needs to be added to the response mapping section of the buyer set up. You can see below that the response type will be XML, the condition needs to be key equal with, the key will be /response/result, and the value will be success

If the buyer system returns the real time price, you can choose to have Lead Prosper track it when storing analytics. Toggle the real time price option to ON in your buyer set up

To get the price key needed here, look back at the response parser. Click on the value nested under price on the right side of the parser. The window will then show you the price key for real time price or SEND POST IF rules, which in this case is /response/price. Copy and paste this into your buyer setup into the “real time price” section

Repeat the response mapping process for the post setup. As you can see below, the condition, key and value for an accepted post will be the same as the ping

Enter this information into the post response mapping section. The response for a duplicated lead is now automatically filled out for you, but can be changed to suit your needs if the default is not enough

Part 2 - How to Pull a Ping ID

When working with ping/post buyers, you will often be required to include an ID in the POST that was contained within the initial ping response


To extract this value from the ping, go to the ping section of the response parser and click on <ping_id> on the right side. This will bring up the selection preview. Here you will see the buyer response keys. The shortcode needed to grab the ping id is under the “use in POST configuration” section

Copy and paste this lp_ping_response shortcode into the post payload builder in your buyer set up

Save your buyer then test to make sure your ping_id was sent in the post

Part 3 -  Troubleshooting the Buyer

Once a test response is sent, you might see a section that outlines possible errors that were detected while testing. While some need to be fixed, others might just be informational. For example, test leads can still be accepted by the buyer, but the system will alert you that the lead contains possible test parameters


You can see below that the errors are an invalid shortcode in the ping, an incorrect real time price configuration, and a wrong or invalid ping_id

First, to fix the invalid shortcode in the ping, click back to your ping configuration in your buyer set up. The error response told us that the zip code shortcode was invalid. If you look above the payload builder, you see that the campaign shortcode should be mapped to zip_code instead of just zip

Copy and paste the correct shortcode into the payload builder

The next error was that the price could not be extracted based on the real time response mapping.

If you click on price in the response parser, you can see that /response/price needs to be in the real time price section instead of just the word price

Enter the correct real time price key, which is /response/price

Finally, if you scroll down to the POST body of the rejected lead, you will see that the final error is due to a wrong or expired ping_id

Click back to the response parser and click on ping_id on the right side. This will bring up a window with the Buyer Response Keys. Here you’ll copy the ping_id shortcode under the “Use in POST configuration” section

If you click back over to your POST configuration, you can see it was not correctly entered in the POST payload builder initially

Paste in the correct ping_id shortcode to the payload builder

Save your campaign then retest your buyer

As you can see the lead was accepted and the system still alerted the presence of potential test parameters

That’s it for the new Response Parser in Lead Prosper! As always if you have any questions please use the support button or send us an email at support@leadprosper.io 

Still need help? Contact Us Contact Us