> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pingtree.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ping+Post Routing

> A real-time lead auction system that pings multiple buyers, collects bids, and posts the lead to the highest bidder. Designed for dynamic lead distribution in verticals like insurance, finance, and education.

**Ping+Post Routing** is a real-time bidding system used to distribute leads across multiple buyers. It enables campaigns to ping eligible buyers, collect bids, and post the lead data to the highest (or best-matching) bidder for final acceptance—maximizing revenue and optimizing routing logic.

***

### How It Works

<img className="block" src="https://mintcdn.com/pingtree/x6rVi2wH1ZE3qfEN/assets/images/docs/documentations/campaign/distribution/pingpost-1.png?fit=max&auto=format&n=x6rVi2wH1ZE3qfEN&q=85&s=ff8cf68d47e13353a7b701581363acc2" alt="domains" width="1297" height="747" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-1.png" />

1. **Lead Submission**\
   A visitor submits a form. Pingtree receives the full lead payload.

2. **Ping to Buyers**\
   Pingtree sends a **Ping** request (HTTP GET or POST) to all eligible buyer endpoints simultaneously. This request includes partial lead data (e.g., zip code, age, product interest) based on mapping.

3. **Buyers Evaluate & Respond**\
   Each buyer evaluates the lead and returns a Ping response with:

   * Accept/Reject status
   * Bid amount (price they're willing to pay)
   * A unique Ping ID token (required for Post)

   Only responses marked as “Accepted” are retained for routing.

4. **Select Highest Bidder**\
   Pingtree sorts all accepted responses by bid value. The buyer with the highest bid is selected.

5. **Post to Winning Buyer**\
   Pingtree sends a **Post** request (with full lead data and Ping ID) to the winning buyer. If accepted, the lead is sold. If rejected, Pingtree retries posting with the next highest bidder.

6. **Fallback Handling**\
   If all posts fail, the lead is marked as unsold.

***

### Buyer Posting Specs

When integrating with a Ping+Post buyer, their API documentation should clarify:

* **Ping Endpoint URL** & required fields
* **Post Endpoint URL** & full data field set
* Authentication headers or static tokens
* Distinction between Ping and Post requests
* Expected Ping ID/token requirements

***

### Configuration & Setup

Follow these steps to configure a Ping+Post integration:

<Steps>
  <Step title="Enable Ping+Post Routing">
    In the advertiser or custom endpoint’s Lead Routing section, enable **Ping+Post Routing** and switch to the **PING** tab.
  </Step>

  <Step title="Map Ping Request Fields">
    • Input the Ping URL and method (GET or POST)\
    • Map the necessary partial lead fields\
    • Enable "Bypass Ping" if this buyer should only be used for direct Post scenarios

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-2.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=8acce604f28e1dd6d6ddd708c5f7b729" alt="domains" width="1476" height="542" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-2.png" />
  </Step>

  <Step title="Configure Ping Response Mapping">
    • Set Ping Timeout (max wait time per buyer)\
    • Map **Ping ID**, **Accept/Reject flag**, and **Bid Amount**\
    • Optionally map **Reject Reason** and other logging fields\
    • Use "Store Fields From Buyer Response" to auto-populate lead fields based on buyer data

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-3.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=a4b3bd9dd4fd8ac63589ffeaea871a15" alt="domains" width="1117" height="691" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-3.png" />

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-4.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=2a0dae87cc1c29bd1000a5df03450f6a" alt="domains" width="1175" height="803" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-4.png" />
  </Step>

  <Step title="Map Post Request Fields">
    • Switch to the **POST** tab\
    • Enter the Post endpoint and map full lead fields\
    • Use `{{ping_id}}` or other stored response values in static fields as required by the buyer\
    • Map response logic to confirm lead acceptance or rejection

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-5.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=8d2b4c9d1c805fd251bfd9f8a383d4ca" alt="domains" width="1588" height="834" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-5.png" />

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-6.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=da8a5fe9d2c8cf631d613e605b0dfc04" alt="domains" width="1600" height="533" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-6.png" />
  </Step>

  <Step title="Test & Validate">
    • Use “Test Endpoint” to send sample Ping/Post requests\
    • Use “Get Sample Response” with a valid `transaction_id` to test mapping\
    • Confirm bid handling, Ping ID tracking, and endpoint response structure

    <img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-7.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=6dca9317625da81386eaa12ff3593c69" alt="domains" width="1600" height="600" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-7.png" />
  </Step>
</Steps>

***

### Routing Logic Setup

<img className="block" src="https://mintcdn.com/pingtree/uuIKrMDhyS8zGCac/assets/images/docs/documentations/campaign/distribution/pingpost-8.png?fit=max&auto=format&n=uuIKrMDhyS8zGCac&q=85&s=e66eca729496a581148c556394b4d011" alt="domains" width="1600" height="661" data-path="assets/images/docs/documentations/campaign/distribution/pingpost-8.png" />

Configure your Ping+Post logic under **Distribution > Routing Logic > Ping+Post Tab**:

* **Enable Ping+Post Routing**: Activates Ping+Post logic, overriding default routing.
* **Async Toggle**: Sends Ping requests to all buyers at once, waits for responses, and picks the highest bidder (recommended).
* **Sync Flow**: Sends Ping requests sequentially. Stops at first qualified bid that meets minimum price and proceeds to Post.
* **Group Wait Time**: In Async, sets how long Pingtree waits for all buyers in a group to respond.
* **Add Groups**: Organize buyers into tiers or categories. If all buyers in one group fail, Pingtree moves to the next group.
* **Source Approval Flow**: If enabled, Pingtree returns the bid to the source via API. The source then triggers the Post using the Lead ID.

***

### Revenue Attribution

Revenue is captured from the **Bid Amount** returned in the Ping response. Even if a buyer also returns a value in the Post, Pingtree prioritizes the Ping value for billing and reporting.

***

### Example: Ping+Post Lifecycle Summary

1. A form submission generates a lead.
2. Pingtree sends Pings to five buyers.
3. Three buyers respond:
   * Buyer A: Accept - \$45, Ping ID: abc123
   * Buyer B: Reject
   * Buyer C: Accept - \$42, Ping ID: xyz789
4. Buyer A wins (highest bid).
5. Pingtree posts the full lead + `abc123` Ping ID to Buyer A.
6. Buyer A accepts → lead is sold, revenue = \$45.

***

### Best Practices

* Validate mappings using the "Get Sample Response" tester.
* Always verify Ping ID logic with the buyer’s dev team.
* Use Async routing to increase chances of highest bid.
* Store buyer responses when possible for debugging or redirection needs.
* Separate Ping and Post logic clearly in documentation and configs.

***
