How to setup Webhooks for Salesforce x Cheerio AI Integration
Prerequisites
Cheerio AI Webhook Endpoint URL:
https://newprod.api.cheerio.in/api/salesforce/webhook/<<USER_ID>>Salesforce System Administrator Access.
Step 1: Add Cheerio Endpoint to Remote Site Settings / Named Credentials
In Salesforce, go to Setup (gear icon), search for Named Credentials in the Quick Find box.

Under the External Credentials tab, click New:
Label: Cheerio AI Credential
Authentication Protocol: Custom or No Authentication (depending on your Cheerio header requirements).
Click Save.

Under the Named Credentials tab, click New:
Label: Cheerio_AI_Endpoint
Name: Cheerio_AI_Endpoint
URL: [https://newprod.api.cheerio.in/api/](https://newprod.api.cheerio.in/api/) (or your specific base URL like webhook.site if need to test first)
External Credential: Select Cheerio AI Credential.
Click Save.

Step 2: Create an External Service / HTTP Callout Action in Flow
Go to Setup > Flows > click New Flow.

Step 2: Create an External Service / HTTP Callout Action in Flow
In Salesforce, go to Setup → Search for Flows in the Quick Find box → Click New Flow.
Select Record-Triggered Flow and click Create.
Configure the Configure Start panel:
Object: Select Lead (or your target object).
Trigger the Flow When: Select A record is created or updated.
Set Entry Conditions:
Condition Requirements: Select Formula Evaluates to True.
Formula: Enter your execution filter formula (e.g., NOT(ISBLANK({!$Record.Id})) or AND(NOT(ISBLANK({!$Record.Id})), NOT(ISBLANK({!$Record.Email})))).
When to Run the Flow for Updated Records: Select Only when a record is updated to meet the condition requirements.
Optimize the Flow for: Select Actions and Related Records.
Add Asynchronous Path: Ensure the Add Asynchronous Path toggle/checkbox is checked (Required for HTTP callouts).
Click Done / close the panel.

Step 3: Create the Apex-Defined Request Variable
Open the Toolbox panel on the left side of Flow Builder and click New Resource.
Configure the resource details:
Resource Type: Select Variable.
API Name: varLeadRequestBody
Data Type: Select Apex-Defined.
Apex Class: Select the External Service class generated for the HTTP callout (e.g., ExternalService__CheerioWebhook_Request).
Availability: Check Available for input and Available for output.
Click Done.
Step 4: Map Payload Values (Set Request Body Values)
On the Run Asynchronously path of the Flow canvas, click the + (Add Element) icon.
Select Assignment element:
Label: Set Request Body Values
API Name: Set_Request_Body_Values
In the Set Variable Values section, map the record values to your Apex-Defined variable properties:
{!varLeadRequestBody.leadId} ←\leftarrow← Equals ←\leftarrow← {!$Record.Id}
{!varLeadRequestBody.firstName} ←\leftarrow← Equals ←\leftarrow← {!$Record.FirstName}
{!varLeadRequestBody.lastName} ←\leftarrow← Equals ←\leftarrow← {!$Record.LastName}
{!varLeadRequestBody.email} ←\leftarrow← Equals ←\leftarrow← {!$Record.Email}
{!varLeadRequestBody.phone} ←\leftarrow← Equals ←\leftarrow← {!$Record.Phone}
Click Done.

Step 5: Add HTTP Callout Action (Send Lead Webhook)
Below the Set Request Body Values Assignment element on the Run Asynchronously path, click the + icon.
Select Action:
Action Name / Type: Select your Cheerio HTTP Callout Action (or click Create HTTP Callout if configuring for the first time).
Label: Send Lead Webhook
API Name: Send_Lead_Webhook
Under Set Input Values for the Selected Action:
Map the Body parameter to your Apex-Defined variable: {!varLeadRequestBody}.
Click Done.
Step 6: Save & Activate Flow
Click Save in the top right header.
Set Flow Label: Lead Webhook Flow.
Click Activate.
Recommended for You

How to do Salesforce App Setup with Store URL, Consumer Key and Secret
How to do Salesforce App Setup with Store URL, Consumer Key and Secret
How to do Salesforce App Setup with Store URL, Consumer Key and Secret

Get started with Cheerio MCP
Get started with Cheerio MCP
Get started with Cheerio MCP
