A Service Console that fits the agent using it

One screen instead of four, for a legal lead generation team on the phone all day. The qualification form is one the client can change without a deployment.

Service Console and dialer integration for a legal lead generation company · Florida, 2023

The day the console had to fit into

James Ryder Interactive found and qualified people who wanted to file legal claims over health problems. Their agents were on the phone all day. Take the call, ask a set of questions, check what the person told them, pass them on to whoever handled the next step. CallShaper was the dialer. Salesforce was where the work actually happened.

Except it wasn't one place. Agents moved between screens during a live call, while someone waited on the other end. And a fronting agent and an inbound agent don't need the same things in front of them. One is qualifying a stranger, the other is picking up a conversation that already started.

The job was one workspace in the Lightning Service Console that changes depending on who is using it.

I worked straight with the US team on this, from working out what they needed through technical design and development to the production deployment.

The questions don't live in the code

This was the decision the whole thing turned on.

The obvious way to build a qualification form is to write the questions into the component. It works, it's fast, and it's wrong here, because campaigns change. A new claim type means new questions, and if the questions are in JavaScript then every change is a developer, a deployment and a wait.

So the questions live in Custom Metadata Types instead. The text, the order, the answer type, which question each one depends on and which answer makes it appear. The Lightning Web Component reads the set for that campaign and builds the form from it. Answer one question and the next one appears or disappears.

Changing a question is now a configuration change, not a release.

Components that stay in sync without knowing about each other

The console is several separate components, not one big one. They talk through Lightning Message Service. When the agent saves the qualification answers, everything else on the page hears about it and refreshes.

The point of doing it that way is that none of them have to know the others exist. You can add a component later without going back into the ones already there.

Connecting the dialer

CallShaper pushes lead and call information into Salesforce through a custom Apex REST endpoint, and Salesforce calls out to the dialer when it needs something back.

That work runs in Queueable Apex. An agent should never be watching a spinner because Salesforce is waiting on another system. The call is still live, and the person on the line can hear the pause.

How the Service Console and the CallShaper integration fit together The Lightning Service Console holds several Lightning Web Components that stay in sync over Lightning Message Service. The qualification form is built from Custom Metadata Types. Underneath, CallShaper sends call and lead data into a custom Apex REST endpoint, the work runs in Queueable Apex, and Salesforce calls back out to the dialer. LIGHTNING SERVICE CONSOLE Lead / Case information Qualification form (LWC) Call controls & history Lightning Message Service Custom Metadata Types INTEGRATION CallShaper dialer Apex REST endpoint inbound calls & leads Queueable Apex Salesforce records callout back to the dialer
The console on top, the integration underneath. Components stay in sync over Lightning Message Service; the qualification form is built from Custom Metadata.

Where the logic lives

Simple rules run in Record-Triggered Flows, where an admin can read them. Anything more involved goes into Apex, behind a trigger handler. That gives one place per object where things happen, rather than logic scattered across three triggers nobody can put in order.

That choice is for whoever comes after me. It costs nothing while you are building and saves a week the first time something has to change.

How it shipped

Every API call went through Postman before I wrote a line of Apex, so I knew what came back before I wrote anything to handle it. The Apex tests use HttpCalloutMock, which means they don't need the live dialer and don't break when it changes. Everything went through Git before production.

Stack

Sales & Service Cloud · Lightning Service Console · Lightning Web Components · Lightning Message Service · Apex REST · Queueable Apex · Custom Metadata Types · Record-Triggered Flow · trigger handler pattern · CallShaper · Git · Postman · HttpCalloutMock

Emina Koćić, Salesforce Consultant · Virago. I've worked in Salesforce since 2020 and hold Platform Developer I, Platform Developer II and JavaScript Developer I certifications. I help Ops and RevOps teams with no developer get their Salesforce working again. Based in Tuzla, working with teams in Europe and North America. More about me · LinkedIn · Book a call

Agents switching between screens on a live call?

That is usually a console problem, and it is usually fixable. Tell me what your team has open at once and I will tell you what it would take.