# Send Conversion Events to Facebook

You can send online and offline conversion events to Facebook API from within Gleantap. This is done by setting up a Webhook within the flows.

Here is how you can go about it -&#x20;

1. **Go to Flows -** Click "+" to add a new Flow.
2. Add the Name of the Flow and click "Next" to specify the segment.
3. Select the segment that has your conversions.&#x20;
4. Continue forward to the Design your Flow step and click "+" select - "Action".
5. From the right panel, select Sales > "Submit to Webhook"
6. Add the following info for the Webhook
   1. URL: <https://api.gleantap.com/v1/facebook/fireConversionEvent>
   2. Method: POST
   3. Payload Type: JSON
   4. Payload
      1. email - (Select "Email" from the dropdown)
      2. phone - (Select "Phone" from the dropdown)
      3. event\_name - (Enter Custom Value - could be anything eg. "purchase")
      4. app\_id - (Enter Custom Value - this is your workroom ID. If you go to your dashboard, this is your last part of the URL after "/")
      5. pixel\_id - (Enter Custom Value - this is your facebook pixel id)
      6. access\_token - (Enter Custom Value - get your access token from facebook - [instructions here](https://developers.facebook.com/docs/marketing-api/conversions-api/get-started/))
      7. user\_id - (Select "Member ID" from dropdown)
      8. action\_source - (Enter Custom Value - this could be anything eg. "web" or "instore")
7. Click "Save"
8. Click "Publish" to go live with the flow.

Once the flow is live it starts sending each of the conversions you have in the segment to facebook. You can verify if its working correctly by clicking and opening any of the contacts that got processed through the flow and find a attribute in their profile called "fb\_conversion\_api\_response" and it should look like&#x20;

<figure><img src="/files/y1TCJ7vnOU3uqklk55s1" alt=""><figcaption></figcaption></figure>


---

# 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://help.gleantap.com/integration/send-conversion-events-to-facebook.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.
