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

# Send Conversion Event

> Documentation for the Send Conversion Event action for Facebook

![images/facebook.svg](https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/facebook.svg?fit=max\&auto=format\&n=EU2WCxuXGIUQcziR\&q=85\&s=c454b1c3cd701c29af7e67be84efec61)

## Getting Started

With the Facebook Conversions API integration, track conversion events in workflows.

Some configuration is required to use the Facebook Conversions API integration to allow Morf automations to act on your Facebook Data Sources.

1. Go to [Events Manager](https://business.facebook.com/events_manager2).
2. Select your business account.

![](https://mintcdn.com/morfhealth/4zxfvotdFqBvkrFr/images/event_manager_selecting_business_account.png?fit=max\&auto=format\&n=4zxfvotdFqBvkrFr\&q=85\&s=725659523719cda256ffc258d30da8dc)

3. Then go to "Data Sources" and select the data source you'd like to send conversion events to.
4. Scroll down to "Generate access token" in the "Set up direct integration" section.

![](https://mintcdn.com/morfhealth/VPKyBRVuRAgQM-CM/images/set_up_direct_integration.png?fit=max\&auto=format\&n=VPKyBRVuRAgQM-CM\&q=85\&s=a74ff7fdda99b1d028e7108834cb2908)

5. Click on "Generate access token": we are going to use the token in Morf.
6. Now go to the "Test events", and click on "Confirm your server's events are set up correctly".
7. Copy the "test event code" (e.g. `TEST1234`) and keep that code, we are going to use it to verify our integration.

![](https://mintcdn.com/morfhealth/VPKyBRVuRAgQM-CM/images/test_event_code.png?fit=max\&auto=format\&n=VPKyBRVuRAgQM-CM\&q=85\&s=784aed0288119d37b2da0c22f2b67695)

In the Morf UI:

1. Add a new Integration.
2. Select Facebook Conversions Access Token.
3. Paste your Data Source ID as "Pixel ID", and the token generated earlier in "Access Token".
4. In a Workflow, add a "Send Conversion Event" action, and populate the "Test Event Code" field with the code from above (format: `TEST1234`).
5. If the integration was successfully set up, events should appear in the "Test events" tab of your Facebook Data Source.
6. Remove the "Test Event Code" value from your action.

You can now start using Facebook Conversion actions in your workflows.

# Parameters

**Action** `Parameters`

**parameters**

**Event ID** `string`

This field maps to the destination API `event_id` field.

**Event Name** `string` *required*

This field maps to the destination API `event_name` field.

**Event Time** `timing.v1.Timestamp` *required*

This field maps to the destination API `event_time` field.

**Event Source URL** `string`

This field maps to the destination API `event_source_url` field.

**Action Source** `string` *required*

This field maps to the destination API `action_source` field.

**Currency** `string`

This field maps to the destination API `custom_data.currency` field.

**Value** `float64 (double)`

This field maps to the destination API `custom_data.value` field.

**Email** `string`

`PII`
This field maps to the destination API `user_data.em` field.

**Phone** `string`

`PII`
This field maps to the destination API `user_data.ph` field.

**First Name** `string`

`PII`
This field maps to the destination API `user_data.fn` field.

**Last Name** `string`

`PII`
This field maps to the destination API `user_data.ln` field.

**Date Of Birth** `string`

This field maps to the destination API `user_data.db` field.

**Gender** `string`

This field maps to the destination API `user_data.ge` field.

**City** `string`

This field maps to the destination API `user_data.ct` field.

**State** `string`

This field maps to the destination API `user_data.st` field.

**Zip Code** `string`

This field maps to the destination API `user_data.zp` field.

**Country** `string`

This field maps to the destination API `user_data.country` field.

**External ID** `string`

`ID`
This field maps to the destination API `user_data.external_id` field.

**Client IP Address** `string`

`PII`
This field maps to the destination API `user_data.client_ip_address` field.

**Client User Agent** `string`

This field maps to the destination API `user_data.client_user_agent` field.

**Click ID** `string`

`ID`
This field maps to the destination API `user_data.fbc` field.

**Browser ID** `string`

This field maps to the destination API `user_data.fdp` field.

**Subscription ID** `string`

This field maps to the destination API `user_data.subscription_id` field.

**Facebook Login ID** `int64`

`ID` `PII`
This field maps to the destination API `user_data.fb_login_id` field.

**Lead ID** `int64`

`ID`
This field maps to the destination API `user_data.lead_id` field.

**Install ID** `string`

This field maps to the destination API `user_data.anon_id` field.

**Mobile Advertiser ID** `string`

This field maps to the destination API `user_data.madid` field.

**Page ID** `string`

This field maps to the destination API `user_data.page_id` field.

**Page Scoped User ID** `string`

`PII`
This field maps to the destination API `user_data.page_scoped_user_id` field.

**Click To WhatsApp ID** `string`

`ID` `PII`
This field maps to the destination API `user_data.ctwa_clid` field.

**Instagram Account ID** `string`

`ID` `PII`
This field maps to the destination API `user_data.ig_account_id` field.

**Instagram ID** `string`

`ID` `PII`
This field maps to the destination API `user_data.ig_sid` field.

**Content IDs** `[]string`

**Test Event Code** `string`

This field maps to the destination API `test_event_code` field.

```json Result Object Example theme={null}
{
  "$result_object_key": {
    "facebook_trace_id": "AC-7AuFIXL7XSBYAK7ABam_"
  }
}
```

```json Result Object Description theme={null}
{
  "$result_object_key": {
    "facebook_trace_id": "Facebook trace ID"
  }
}
```

### Result Object Field Details

You can use the result of the action's data as inputs to downstream workflow actions.

Each fetch action requires an object name, which nests the action's result data inside the downstream data context in the workflow. See [Passing Data Between Actions](https://docs.morf.health/docs/knowledge_base/passing_data_between_actions.md) for how to set it and reference the result from downstream nodes.

Here we demonstrate how to refer to this data using the prefix `$result_object_key`.

**SendConversionEventResponse** `Fetch Action Response Object`

**fields**

**facebook\_trace\_id** `string` *required*

Facebook trace ID

```json CEL theme={null}
$result_object_key.facebook_trace_id
```

```json Example theme={null}
"AC-7AuFIXL7XSBYAK7ABam_"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.