Skip to main content

Using Your Salesforce Integration in Call Flow HTTP Requests

Call Salesforce from your call flow without entering credentials, using your connected Salesforce integration.

V
Written by Valeriia Volobrinskaia

The HTTP Request step can call your Salesforce org directly. When the endpoint is your Salesforce org address, CloudTalk signs the request with your connected Salesforce integration, so you never enter Salesforce credentials in the call flow.

User level: Admin


Before You Start

  • Your Salesforce integration must be connected and active in CloudTalk (Dashboard > Integrations). See Configure Salesforce.

  • The endpoint must use your org's own domain, for example https://yourcompany.my.salesforce.com/.... Other Salesforce addresses such as login.salesforce.com or Marketing Cloud are not supported.

  • You need to know which Salesforce REST API call you want to make. Salesforce's API documentation lists the available endpoints.

Set Up the Request

  1. Add an HTTP Request step to your call flow (see the HTTP Request Step guide).

  2. In Endpoint, enter the full Salesforce API URL on your org domain.

  3. Choose the Method and fill in Request Headers and Request Body as the Salesforce API requires. For a JSON body, add the header Content-Type: application/json.

  4. Do not add an Authorization header. CloudTalk adds authentication for you using the connected integration.

  5. Save the flow.

Every time a call reaches the step, CloudTalk sends the request to Salesforce on behalf of your integration. You can use dynamic variables such as {{call.external_number}} in the endpoint, headers and body, exactly as in any HTTP Request step.

Example: Log an Inbound Call as a Salesforce Task

Field

Value

Endpoint

https://yourcompany.my.salesforce.com/services/data/v58.0/sobjects/Task

Method

POST

Headers

Content-Type = application/json

Body

Subject = Inbound call from {{call.external_number}}

Status = Completed

Priority = Normal

Parse response

Off (fire and forget)

Using the Salesforce Response in a Condition Splitter

With Parse response enabled, the Salesforce answer is stored as a single block. In a Condition Splitter you can:

  • Check the status code: select HTTP Response, path statusCode, for example equals 200.

  • Check whether the answer contains a value: select HTTP Response, path body, operand contains.

Note: Reading a specific Salesforce field from the response (for example, records.0.Id) is not supported at this time.

If the Integration Is Not Available

If your Salesforce integration is disabled, not connected, or the endpoint does not match the org it is connected to, the request is not sent to Salesforce. The step is logged as failed and the call flow continues to the next step. Callers are not affected.

Good to Know

  • Communication requires HTTPS.

  • When Parse response is on, the flow waits up to 10 seconds for Salesforce to answer. When it is off, the request is sent and the flow moves on after at most 3 seconds.

  • Requests count against your Salesforce API limits like any other API call.


Need help or have a question? Just reach out through our Support portal. We're here for you.

Did this answer your question?