> 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/zentitle2-docs/ui-administration/integrations/salesforce/connecting-salesforce-to-zentitle.md).

# Connecting Salesforce to Zentitle

Connect the Salesforce integration sample to your Zentitle2 account by configuring the Z2NCred named credential, the Z2ECred external credential, and a new API client.

Having carried out the required user configuration steps to connect the Salesforce integration sample to Zentitle, we are now in a position to establish this connection.

Go to Salesforce Setup. In the quick find box, search for **Named Credentials.**

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Fzlm43TRKzilOsfg2TvDa%2FScreenshot%20(377).png?alt=media&amp;token=29e33e37-14af-44ed-ac47-7a1b5613430a" alt=""><figcaption></figcaption></figure>

Click the **Named Credentials** link. On the next page, select the Named Credential named **Z2NCred:**

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FRLB9vRMzvfqxQLKRlpor%2FScreenshot%20(700).png?alt=media&amp;token=0834c774-3c9a-49a8-a600-30d4a7b51ad8" alt=""><figcaption></figcaption></figure>

Follow this link and click the Edit button that appears at the top right of the new page

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FJNGS3DiDkV0Lc7Is09IL%2FScreenshot%20(701).png?alt=media&amp;token=1d801940-c30e-4815-913d-5d48eb3ef38a" alt=""><figcaption></figcaption></figure>

which will take you to the Edit page for the Z2NCred Named Credential.

At this stage, you are required to enter into Salesforce some details about your Zentitle2 account. In a separate browser window, login to Zentitle2. On the sidebar, go to **Administration>API Credentials**. On the **API Credentials** page, click the **Management API** tab to view the **Management API Details**:

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FFoJUfYYbZcai66SyDjNp%2FScreenshot%20(703).png?alt=media&amp;token=657de0a5-c8cc-48df-8029-937d7549f11f" alt=""><figcaption></figcaption></figure>

Take a note of the following information:

* Tenant ID
* API URL
* OAuth URL

Keep this browser window open at the current page as we shall return to it shortly.

Go back to the **Edit** page for Z2NCred in SalesForce.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FzUJYez6rEmM71S45QzgG%2FScreenshot%20(702).png?alt=media&amp;token=dab799a0-9b25-49af-ad3b-7db6cb738dd8" alt=""><figcaption></figcaption></figure>

Ensure that the form is populated as shown above. Set the URL to be the API URL from your Zentitle Account. (i.e., <https://sf-demo.api.zentitle.io>) and click **Save.**

Back on the Zentitle API edit page, go to the **Custom Headers** section and click the **New** button.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FmwaByGIbQpgMqDoeMXuN%2FScreenshot%20(384).png?alt=media&amp;token=052ed313-0a06-41d2-a609-0c67fba9a8a9" alt=""><figcaption></figcaption></figure>

Under the Custom Headers section click Edit to change the N-TenantId, and replace the value with the Tenant ID found in the API Credentials page of your Zentitle Account and click **Save**.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FTlzCX7W2s6vqZx4o7fAy%2FScreenshot%20(381).png?alt=media&amp;token=73a15f1c-355c-473a-a3b1-0fc5886106c5" alt=""><figcaption></figcaption></figure>

Go back to the **Named Credentials** page and click on the **External Credential** tab. Click on the External Credential named **Z2ECred** to go to the page for this item.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FIess1LtNcN2zwk43EShG%2FScreenshot%20(715).png?alt=media&amp;token=6bbcab31-323d-4dea-8ca1-123c775a7a68" alt=""><figcaption></figcaption></figure>

In the **Actions** dropdown, click **Edit** to update the External Credential. This will take you to the edit page.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FS43rRVQiAmhT3Wb9GrOw%2FScreenshot%20(716).png?alt=media&amp;token=f70f729a-0048-423d-9b95-f0cd352a067e" alt=""><figcaption></figcaption></figure>

Set the **Identity Provider URL** to be the **OAuth URL** value found on the API Credentials page of your Zentitle Account, appended by /protocol/openid-connect/token and then click **Save.**

Under the Principals section of the Z2ECred page, if the **Admin Perms** principal has been created, click the **Actions** dropdown ![](https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FVVXaW8WCy7QoKeeSjiYz%2FScreenshot%20\(483\).png?alt=media\&token=2cdc5b1d-6272-48a1-ab8c-cae51291575f) and select **Edit.**

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2Flt18ixRHaFxL83Xml28N%2FScreenshot%20(764).png?alt=media&amp;token=dfd742a8-8548-45a5-8bdc-f40404f5e6e6" alt=""><figcaption></figcaption></figure>

If this principal does not already exist, create a new Admin Perms principal. Either way ensure that it has been configured as follows:

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FxkCXhmcMYJxio7M1ziIx%2FScreenshot%20(717).png?alt=media&amp;token=a64cd0d4-e2a1-4485-976f-1fd136e1cfad" alt=""><figcaption></figcaption></figure>

Now return to the go to the **API Credentials page** of your Zentitle Account and click **Add API Client.**

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FQQXzWV8En5ck0FARlfhc%2FScreenshot%20(394).png?alt=media&amp;token=5519767a-77a1-493a-9e7c-93748616b034" alt=""><figcaption></figcaption></figure>

Set a name (Client ID) of your choosing and click **Save**.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FnkDneAFEOfSSbi4fB4nG%2FScreenshot%20(395).png?alt=media&amp;token=fe97a17d-33eb-4444-802a-c5cd1adbb689" alt=""><figcaption></figcaption></figure>

You will now be asked to save the **Client Secret** as shown. Please do so.

<figure><img src="https://2412542193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1tBhTGn5igyI6ECLHjpC%2Fuploads%2FEJFcBthuqGFNr9VcpX73%2FScreenshot%20(727).png?alt=media&amp;token=11a76b50-9dff-46fb-a7d7-08e159fbb1dd" alt=""><figcaption></figcaption></figure>

Back in the Salesforce Principal edit page, enter the name you used for the **Client ID**, copy the **Client Secret** from Zentitle2, enter it and click **Save**. This completes the setup of our Salesforce integration sample.

Finally, on the Z2ECred page, create a **custom header** configured identically to the one you created on the Z2NCred page.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nalpeiron.com/zentitle2-docs/ui-administration/integrations/salesforce/connecting-salesforce-to-zentitle.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
