# Configure a Data Post for Your Program

Data Post Conversions allow you to track and reward partners that collect potential customer information and send the leads to you. To learn more, see [Data Post Conversions Explained](https://help.impact.com/en/support/solutions/articles/48001234935).

{% hint style="warning" %}
**Warning:** This event type is generally used when partners have already collected lead data and want to send it to you. This [shouldn’t be confused with a Host & Post form](https://help.impact.com/en/support/solutions/articles/48001234935-data-post-conversions-explained#what-s-the-difference-between-data-posts-and-host-post-forms-0-2) that posts directly from the partner’s site to yours.
{% endhint %}

## Prerequisites

The Data Post feature works with your existing lead collection endpoint. To ensure impact.com can successfully forward partner submissions and interpret your response, your existing endpoint must meet the following requirements:

* Accept a POST request containing the data submitted by the partner.
* Support basic access authentication (optional but recommended).
* Validate incoming data based on your business rules (e.g., check for duplicates, ensure all required fields are present).
* Respond immediately with a machine-readable format (XML or JSON) that tells impact.com whether the submission was valid or invalid.

{% stepper %}
{% step %}

### Set up a data post event type

Work with your impact.com integrations engineer to get a Data Post event type set up. Contact [support](https://app.impact.com/support/portal.ihtml?createTicket=true&) for assistance.

{% hint style="success" %}
**Note:** Unlike other event types, the Data Post event type doesn’t undergo a validation process. To test this event type, you’ll need to set up a partner account to do a live test.
{% endhint %}
{% endstep %}

{% step %}

### Configure your validated data to send to impact.com

Once you’ve received your partner’s data, the response your server sends to impact.com is critical in creating a conversion and associating data with it. The data you send back to impact.com must contain specific fields that will be parsed using the XPath or Regular Expressions configured in the event type.

In your validated data:

* Include a unique ID. This is the unique transaction ID for this submission and will be used as the Order ID for the conversions.
* Include a clear signal that the submission was successful.
* Include a note that can be used for logging or debugging purposes. When a response is invalid, you can use this to provide a reason for the failure to help your partner diagnose and fix issues with their data submissions.

#### Examples of what a valid and invalid data response would look like

**Valid responses**

{% tabs %}
{% tab title="JSON" %}

```json
{
  "dataPostResponse": {
    "valid": true,
    "uniqueid": "98",
    "sale_amount": "10.00",
    "customerid": "177",
    "email": "name@email.com",
    "note": "Lead submitted successfully"
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<dataPostResponse>
<valid>true</valid>
<uniqueid>98</uniqueid>
<sale_amount>10.00</sale_amount>
<customerid>177</customerid>
<email>name@email.com</email>
<note>Lead submitted successfully</note>
</dataPostResponse>
```

{% endtab %}
{% endtabs %}

**Invalid responses**

{% tabs %}
{% tab title="JSON" %}

```json
{
  "dataPostResponse":
  {
  	"valid":"false",
  	"uniqueid":"",
  	"sale_amount":"",
  	"customerid":"",
  	"email":"",
  	"note":"No email address was submitted"
  }
}
```

{% endtab %}

{% tab title="XML" %}

```xml
<dataPostResponse>
<valid>false</valid>
<uniqueid/>
<sale_amount/>
<customerid/>
<email/>
<note>No email address was submitted</note>
</dataPostResponse>
```

{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/integration-guides/for-brands/tracking-integrations/configure-a-data-post-for-your-program.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
