> For the complete documentation index, see [llms.txt](https://docs.nalpeiron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nalpeiron.com/zengain-docs/crm-integration/salesforce-integration-example.md).

# Salesforce Integration Example

## Overview

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

Zengain works well with most CRMs; however, this example focuses on connectivity with Salesforce (SF).

Version 1 of the Salesforce integration example will enable Zengain signals to be displayed against SF accounts. This is achieved by implementing SF flows to retrieve signal data from Zengain, triggered by a scheduled task.

Zengain API credentials and the URL endpoint are defined in SF using the Named Credentials—External Credentials setup.

Additionally, an API client is defined in Zengain to enable the SF API to authenticate and authorize the use of the API.&#x20;

A custom field called **ZGCustomerID** is created on the SF accounts table to link SF accounts to Zengain.&#x20;

This field contains the Zengain customer ID, which links the SF account to the Zengain customer record. This is used to pull the correct data for this account.

A custom object (**ZGSignal**) is created in SF to hold the Zengain signal data.

A flow is created in SF to pull the signal data from Zengain and store it in the **ZGSignal** custom object.

Additional SF flows are created to display the Zengain signals at the Account and Contact levels.

SF Lightning pages are created for the account and contact objects, including the Zengain signal flow to display the signal data.

Actionable signals automatically create tasks for the account owner. Therefore, the account owner will see tasks for all the actionable signals for all the accounts they own.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.nalpeiron.com/zengain-docs/crm-integration/salesforce-integration-example.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.
