# Send PostHog event data to Salesforce

#### Contents

- Installation
- Configuration
- FAQ
- Is the source code for this destination available?

This destination connects to your Salesforce instance, sending events from PostHog to Salesforce as they are ingested.

You'll also need access to the relevant Salesforce account.

## Installation

1. In PostHog, click the [Data pipeline](https://app.posthog.com/data-management/destinations) tab in the left sidebar.
2. Click the [Destinations](https://app.posthog.com/data-management/destinations?search=salesforce) tab.
3. Search for 'Salesforce' and click **\+ Create**.
4. Connect your Salesforce account at the configuration step.
5. Press **Create & Enable** and watch your 'Objects' get populated in Salesforce!

## Configuration

| Option | Description |
| --- | --- |
| `Salesforce account`<br>**Type:** integration<br>**Required:** True |  |
| `Object path`<br>**Type:** string<br>**Required:** True | The path to the object you want to create. |
| `Include all event properties as attributes`<br>**Type:** boolean<br>**Required:** True | If set, all event properties will be included as attributes. Individual attributes can be overridden below. |
| `Include all person properties as attributes`<br>**Type:** boolean<br>**Required:** True | If set, all person properties will be included as attributes. Individual attributes can be overridden below. |
| `Additional properties`<br>**Type:** json<br>**Required:** True | Additional properties for the Salesforce Object.

How to create this via the API

Using our REST API you can create this destination like so:

Terminal

PostHog AI

```bash
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
    "type": "destination",
    "name": "Salesforce",
    "inputs": {
        "oauth": {
            "value": ""
        },
        "path": {
            "value": "Contact"
        },
        "include_all_event_properties": {
            "value": ""
        },
        "include_all_person_properties": {
            "value": ""
        },
        "properties": {
            "value": {
                "email": "{person.properties.email}"
            }
        }
    },
    "enabled": true,
    "template_id": "template-salesforce-create"
}'
```

## FAQ

### Is the source code for this destination available?

PostHog is open-source and so are all the destination on the platform. The [source code](https://github.com/PostHog/posthog/blob/master/posthog/cdp/templates/salesforce/template_salesforce.py) is available on GitHub.

### Who maintains this?

This is maintained by PostHog. If you have issues with it not functioning as intended, please [let us know](https://us.posthog.com/#panel=support%3Asupport%3Aapps%3A%3Atrue)!

### What if I have feedback on this destination?

We love feature requests and feedback. Please [tell us what you think](https://us.posthog.com/#panel=support%3Afeedback%3Aapps%3Alow%3Atrue).

### What if my question isn't answered above?

We love answering questions. Ask us anything via [our community forum](/content/questions/index.html).
