AI Case Summary Bot Integration

Context

Get started

Insurance

Get started

Get started

Salesforce

Get started

Get started

Copilot Studio

Get started

Key Technical Concepts Learned

 External Credential Authentication

Named Credential Integration

HTTPS Callouts from Flow (POST + GET)

Dynamic JSON Body Construction

Multi-Step Conversation with ID Chaining

Loop-Based Response Parsing and Conditional Logic

Eliminated manual review of 300+ daily cases by enabling on-demand AI summarization

Reduced case review time by 50%, freeing up support agents for higher-value work

Maintained full security and API compliance using Named Credentials and External Auth

Extendable architecture for other record types and objects

Impact

The client, one of the largest insurance software providers globally, handled over 300 new support cases each day—each containing long-form descriptions, internal case comments, and multi-threaded updates. Reviewing this unstructured information created delays in reassignment, resolution, and oversight.


To address this, an internal team had developed a custom Copilot AI bot capable of summarizing case histories. However, there was no secure or scalable way to trigger the bot from within Salesforce or return results in a structured format.


The goal was to enable agents to initiate an AI-powered summary directly from a Case record—returning clean, usable summaries without compromising sensitive data or disrupting workflow. The integration needed to be seamless, scalable, and compliant with enterprise security standards.

Avatar image for about me page

The Solution

t

A no-code, multi-step automation to extract case summaries was built entirely in Salesforce using Flows, Named Credentials, and multi-step HTTPS callouts—orchestrated through a clean event-driven architecture:

1.Event-Triggered Flow → Subflow Handoff

At the click of a button launched screenflow, the record ID was passed to a subflow designed to manage the entire bot interaction sequence.

2.Start Conversation (POST Callout)

The subflow initiated a new conversation with the Copilot bot via an HTTPS POST callout, authenticated using a Named Credential tied to an External Credential + Principal.

3.Capture Conversation ID

The bot’s initial response returned a conversationId, which was extracted and stored for use in downstream requests.

4.Send Case Number (Second POST Callout)

A second POST callout sent the Case Number as a structured JSON payload (including metadata like sender ID and message type).

5.Delay, Then Retrieve Response (GET Callout)

After a short pause, the subflow made a GET callout using the conversationId to retrieve the bot’s response.

6.Loop & Parse Response

The returned response (an array of activities) was parsed using a Loop with Decision logic to identify the AI-generated summary.

7.Update Case

The final conversational summary is written to a field on the Case record for visibility