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

# Salesforce

> Connect Salesforce and use available lookups and actions.

Connect Salesforce to let the AI retrieve customer and case details (lookups)
and perform approved updates (actions).

## On this page

* [Connect](#connect)
* [Frequently asked questions](#frequently-asked-questions)
* [Supported tools](#supported-tools)
  * [Lookups](#lookups)
  * [Actions](#actions)

## Connect

**1. Log in as a Salesforce admin and go to Setup**

You need permissions to access Platform Tools on Salesforce in the Setup page.

**2. Open External Client App Manager**

Navigate to `Apps` → `External Client Apps` → `External Client App Manager`

![External Client App Manager](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-client-app-manager.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=c353380627bc0c5bddcc454f4ada044a)

**3. Create a new External Client App**

![Create new
app](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-new-client-app.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=57e1542f9538fa4734e4d88856fd5cca)

**4. Fill out the necessary information**

* Enter a Name (for example, “Typewise OAuth”)
* Provide your preferred Email address
* You can leave the rest of the basic information blank
* Under API → `Enable OAuth`
* Enter a random callback URL (this won't be used)
* Select and add the necessary scopes. Make sure to add the `api` scope.
* Make sure `Enable Client Credentials Flow` is selected
* Ensure all other checkboxes are disabled

  ![Fill details](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-client-manager.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=334f7268880361f7b3a3f5929ac841d2)

  ![Scopes](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-oauth.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=7ef4d7e53df8888bed18775443ab98f3)

Once you're done, click `Create` to create the client.

**5. Enable client credentials flow and assign user**

After creating the new app:

* Navigate to the newly created app
* Under policies, enable client credentials flow
* Assign a user to run as (this user will be attributed to all actions/reads performed by this app)

  ![Enable flow](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-credentials-flow.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=95852a6b716d5bf43f8b86cc525b560a)

**6. View and share the generated credentials**

You’ll need the consumer key and secret to enable the integration.

![Credentials](https://mintcdn.com/typewise/ht7a5v6EXYgQrv7K/images/documentation/integrations/salesforce-oauth/external-consumer-key.webp?fit=max\&auto=format\&n=ht7a5v6EXYgQrv7K\&q=85\&s=88f850e8425afddd86485b957a118f6c)

**7. Connect Salesforce in Typewise**

In Typewise, go to **Integrations**, find Salesforce, and click **Install**. You'll need:

* **Subdomain:** The part of your Salesforce URL before `.my.salesforce.com`. For example, for `https://acme.my.salesforce.com`, the subdomain is `acme`.
* **Client ID:** The consumer key of the app.
* **Client Secret:** The consumer secret of the app.

## Frequently asked questions

### How do I whitelist the Typewise platform if I have IP restrictions in place?

If you have organizational or user login IP restrictions, then you need to
whitelist Typewise’s IP addresses to ensure we can authenticate and connect to
Salesforce.

**1. Relax IP restrictions for the OAuth app**

Under the newly created app, navigate to policies. Inside the App
Authorization section, make sure **IP Relaxation** is set to **Relax IP
restrictions** ![IP
Relaxation](https://mintcdn.com/typewise/aZ9AArvIMh1cVCTu/images/documentation/integrations/salesforce-oauth/external-ip-relaxation.png?fit=max\&auto=format\&n=aZ9AArvIMh1cVCTu\&q=85\&s=c5b5f6cdcaca6845439a1a6ac898ee73)

**2. Navigate to the user profile**

Go to Administration → Users. Click on the Profile assigned to the user that
you selected as the run as user. ![User
Profile](https://mintcdn.com/typewise/aZ9AArvIMh1cVCTu/images/documentation/integrations/salesforce-oauth/external-user-profile.png?fit=max\&auto=format\&n=aZ9AArvIMh1cVCTu\&q=85\&s=893a2b8396d16600045d85d47867408c)

**3. Whitelist Typewise IPs**

Once the Profile settings open, scroll down to the **Login IP Ranges**
section.

![Login IP Ranges](https://mintcdn.com/typewise/aZ9AArvIMh1cVCTu/images/documentation/integrations/salesforce-oauth/external-login-ip-ranges.png?fit=max\&auto=format\&n=aZ9AArvIMh1cVCTu\&q=85\&s=e643eb04a4ac7a88f9884b9d1cf57fdc)

Add the following IP addresses to the list:

```text theme={null}
3.69.200.242
3.78.134.40
3.123.85.62
16.63.211.71
16.63.85.45
```

![Whitelist IP addresses](https://mintcdn.com/typewise/aZ9AArvIMh1cVCTu/images/documentation/integrations/salesforce-oauth/external-whitelist-ip-addresses.png?fit=max\&auto=format\&n=aZ9AArvIMh1cVCTu\&q=85\&s=384ff779dec2241492253422f8b3bcaf)

> [!TIP]
>
> Use the same IP as the start and end IP addresses.

> [!WARNING]
>
> If you plan to use this user’s profile for other profiles, make sure to
> add your own IP address to maintain access.

You should now be able to successfully connect to Salesforce.

***

## Supported tools

The following is a selection of commonly used tools available through the
Salesforce integration. Additional lookups and actions are available. Contact us
if you need a tool that isn't listed here.

### Lookups

> [accordion] get\_case\_by\_id
>
> Retrieve all fields of a Salesforce case by its ID.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `case_id` | The ID of the case to retrieve. | Yes | |

> [accordion] get\_case\_description\_by\_id
>
> Retrieve only the `Description` field of a Salesforce case by its ID.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `case_id` | The ID of the case to query. | Yes | |

> [accordion] get\_customer\_details
>
> Retrieve customer details including name, email, phone, and mailing address.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `user_email` | Email address of the customer to retrieve details for. | Yes | |

> [accordion] get\_all\_open\_tickets
>
> Get all open Salesforce cases for a customer (excluding `Closed` / `Resolved`).
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `user_email` | Email address of the customer to retrieve tickets for. | Yes | |
> | `limit` | Maximum number of results to return. | No | `100` |

> [accordion] get\_ticket\_status
>
> Get the status and key information of a Salesforce case.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `case_identifier` | The Case ID (starts with `500`) or Case Number to look up. | Yes | |

> [accordion] More lookups available
>
> Additional Salesforce lookup tools are available. Contact us to enable lookups not listed here.

### Actions

> [accordion] update\_customer\_details
>
> Update a customer's Salesforce Contact fields. You must provide `user_email` and at least one field to update.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `user_email` | Email address of the customer to update. | Yes | |
> | `first_name` | First name. | No | |
> | `last_name` | Last name. | No | |
> | `phone` | Primary phone number. | No | |
> | `mobile_phone` | Mobile phone number. | No | |
> | `mailing_street` | Mailing street address. | No | |
> | `mailing_city` | Mailing city. | No | |
> | `mailing_state` | Mailing state or province. | No | |
> | `mailing_postal_code` | Mailing postal or ZIP code. | No | |
> | `mailing_country` | Mailing country. | No | |

> [accordion] create\_customer\_profile
>
> Create a new customer profile (Contact) in Salesforce.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `user_email` | Email address for the new customer profile. | Yes | |
> | `last_name` | Customer’s last name. | Yes | |
> | `first_name` | Customer’s first name. | No | |
> | `phone` | Primary phone number. | No | |
> | `mobile_phone` | Mobile phone number. | No | |
> | `mailing_street` | Mailing street address. | No | |
> | `mailing_city` | Mailing city. | No | |
> | `mailing_state` | Mailing state/province. | No | |
> | `mailing_postal_code` | Mailing postal/ZIP code. | No | |
> | `mailing_country` | Mailing country. | No | |

> [accordion] write\_post\_to\_ticket
>
> Write a comment to an existing Salesforce case.
>
> | Parameter | Description | Required | Default |
> | :- | :- | :-: | :- |
> | `case_identifier` | The Case ID (starts with `500`) or Case Number to add a comment to. | Yes | |
> | `comment_text` | The comment text to add. | Yes | |
> | `is_public` | Whether the comment should be public. | No | `true` |

> [accordion] More actions available
>
> Additional Salesforce action tools are available. Contact us to enable actions not listed here.


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