{"id":180,"date":"2026-06-20T14:52:09","date_gmt":"2026-06-20T14:52:09","guid":{"rendered":"https:\/\/thebnmhub.com\/cgl\/?p=180"},"modified":"2026-06-20T14:54:02","modified_gmt":"2026-06-20T14:54:02","slug":"building-an-agentforce-service-agent-for-order-updates-returns-refunds-and-human-agent-handoffs","status":"publish","type":"post","link":"https:\/\/thebnmhub.com\/cgl\/building-an-agentforce-service-agent-for-order-updates-returns-refunds-and-human-agent-handoffs\/","title":{"rendered":"Building An Agentforce Service Agent for Order Updates, Returns, Refunds and Human Agent Handoffs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Welcome! This post is about building an Agentforce Service Agent that can respond to customer questions about order updates, tracking information, returns, and refunds. That part sounds simple enough. A customer asks, \u201cWhere is my order?\u201d The agent looks up the order. The agent answers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And yet, and yet, and yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The dangerous part of customer service automation is not that the agent might fail to answer. That failure is visible. The customer notices. The support team notices. Someone fixes the configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The more dangerous failure is when the agent answers too early, with too much confidence, using data the customer has not been verified to receive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A customer asking for a tracking number is not just asking for a tracking number. They are asking the system to expose fulfillment data. A customer asking about a refund is not just asking about a refund. They are asking the system to expose payment status, return eligibility, order history, and sometimes account-level information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So the first principle for this build is straightforward:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The agent should not answer private order, return, refund, or tracking questions until the customer has been verified.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">The second principle is equally important:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">When the conversation escalates, the human agent should not have to reconstruct the conversation from scratch.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">That means the agent should do two jobs at once:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Help the customer directly when it can safely do so.<\/li>\n\n\n\n<li>Prepare the human agent when escalation becomes necessary.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The second job is where the Case object becomes useful. Instead of treating the Case as a passive record created after the conversation goes poorly, we can use it as the shared workspace between Agentforce and the human service team.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result is an Agentforce solution that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Greets the customer by name when phone or email context is already available.<\/li>\n\n\n\n<li>Verifies the customer before disclosing order, tracking, return, or refund details.<\/li>\n\n\n\n<li>Answers supported questions using Salesforce data, external order systems, carrier APIs, refund systems, and knowledge.<\/li>\n\n\n\n<li>Writes customer tone, recommended response, and case brief onto the Case record.<\/li>\n\n\n\n<li>Displays that intelligence in a Lightning Web Component card.<\/li>\n\n\n\n<li>Changes the card color based on customer sentiment:\n<ul class=\"wp-block-list\">\n<li>Red for angry or frustrated customers.<\/li>\n\n\n\n<li>Yellow for disappointed or moderately unhappy customers.<\/li>\n\n\n\n<li>Green for happy or satisfied customers.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s build it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span id=\"bppb-heading-anchor-1\"><\/span><span id=\"bppb-heading-anchor-2\"><\/span>Agentforce For Service<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Agentforce should not be designed as a prettier chatbot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That sentence is worth sitting with for a moment, because many AI service implementations go wrong at exactly this point. A traditional chatbot is usually designed around decision trees. The designer tries to predict the customer\u2019s phrasing, route the customer through a fixed path, and hope that the available menu options map well enough to the customer\u2019s real problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Agentforce should instead be designed around work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The customer has a job to be done:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Find my order.<\/li>\n\n\n\n<li>Tell me where the package is.<\/li>\n\n\n\n<li>Explain why the package is delayed.<\/li>\n\n\n\n<li>Start a return.<\/li>\n\n\n\n<li>Check whether I am eligible for a refund.<\/li>\n\n\n\n<li>Tell me when my refund will arrive.<\/li>\n\n\n\n<li>Escalate me to a human because this is not acceptable.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The human support agent also has a job to be done:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Understand the customer quickly.<\/li>\n\n\n\n<li>Know what the customer already asked.<\/li>\n\n\n\n<li>Know what the AI already answered.<\/li>\n\n\n\n<li>Understand the customer\u2019s emotional state.<\/li>\n\n\n\n<li>Respond with the right tone.<\/li>\n\n\n\n<li>Avoid repeating verification steps unnecessarily.<\/li>\n\n\n\n<li>Resolve the case.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Agentforce sits between these two jobs. The solution works when the agent respects both.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span id=\"bppb-heading-anchor-2\"><\/span><span id=\"bppb-heading-anchor-3\"><\/span>The Problem With \u201cJust Answer The Customer\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s imagine a customer starts a chat:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Where is my order?<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">A naive AI implementation might immediately search for a recent order based on the chat session, find the order, and respond:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Your order #10004567 shipped yesterday and is currently in Mumbai. The tracking number is TRK92839102.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">That sounds useful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is also exactly the kind of response that should make an architect nervous.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What if the chat was started by someone using a shared device? What if the email on the chat form was mistyped? What if the phone number belongs to a family member? What if multiple contacts share the same account? What if the order contains sensitive delivery information?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The agent has to pause before it helps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That pause is not a bad customer experience. Done correctly, it is the foundation of a trustworthy customer experience.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verifying The Customer Before Answering<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The verification rule for this solution is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If phone or email is available from the channel context, use it to identify a possible Contact.<\/li>\n\n\n\n<li>If a single matching Contact is found, greet the customer by name.<\/li>\n\n\n\n<li>If the customer is not yet verified, ask for the missing verification detail.<\/li>\n\n\n\n<li>If neither phone nor email is available, ask for both email and phone number.<\/li>\n\n\n\n<li>Do not disclose private order, return, refund, tracking, or account data until verification succeeds.<\/li>\n\n\n\n<li>If verification fails too many times, escalate to a human agent.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">That gives us a nice decision table:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Available Context<\/th><th>Agent Greeting<\/th><th>Verification Step<\/th><\/tr><\/thead><tbody><tr><td>Phone matches one Contact<\/td><td>\u201cHi Priya\u201d<\/td><td>Ask for email<\/td><\/tr><tr><td>Email matches one Contact<\/td><td>\u201cHi Priya\u201d<\/td><td>Ask for phone<\/td><\/tr><tr><td>Phone and email match same Contact<\/td><td>\u201cHi Priya\u201d<\/td><td>Mark verified<\/td><\/tr><tr><td>No phone or email<\/td><td>Generic greeting<\/td><td>Ask for email and phone<\/td><\/tr><tr><td>Multiple matches<\/td><td>Generic greeting<\/td><td>Ask for email and phone<\/td><\/tr><tr><td>Mismatch<\/td><td>Generic greeting<\/td><td>Escalate or retry<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is to avoid making the customer repeat information when the system already has enough context, while still protecting private information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Designing The Agent Around Work, Not Around Prompts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The temptation with AI projects is to start with the prompt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s backwards.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this use case, start with the concepts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Customer identity.<\/li>\n\n\n\n<li>Verification status.<\/li>\n\n\n\n<li>Order status.<\/li>\n\n\n\n<li>Tracking status.<\/li>\n\n\n\n<li>Return eligibility.<\/li>\n\n\n\n<li>Refund status.<\/li>\n\n\n\n<li>Sentiment.<\/li>\n\n\n\n<li>Escalation readiness.<\/li>\n\n\n\n<li>Human agent recommendation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once those concepts are named, the implementation becomes cleaner. Each concept maps to data, an action, a field, a subagent, or a component.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the same reason good Apex code tends to improve when we stop stuffing everything into one method. Concepts want shape. If we do not give them shape intentionally, they still show up, just scattered across flows, prompts, Apex classes, screen components, and case comments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Architecture<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s the architecture for the solution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flowchart LR\n    Customer&#91;Customer&lt;br\/&gt;Voice, Chat, Messaging] --&gt; Channel&#91;Digital Engagement \/ Voice Channel]\n\n    Channel --&gt; Context&#91;Channel Context&lt;br\/&gt;Phone, Email, Name, Session Id]\n    Context --&gt; Agent&#91;Agentforce Service Agent]\n\n    Agent --&gt; Verify&#91;Verification Subagent]\n    Agent --&gt; Order&#91;Order Status Subagent]\n    Agent --&gt; ReturnRefund&#91;Returns &amp; Refunds Subagent]\n    Agent --&gt; Escalation&#91;Escalation Summary Subagent]\n\n    Verify --&gt; A1&#91;Action: Verify Customer]\n    Order --&gt; A2&#91;Action: Get Order Updates]\n    Order --&gt; A3&#91;Action: Get Tracking Info]\n    ReturnRefund --&gt; A4&#91;Action: Check Return Eligibility]\n    ReturnRefund --&gt; A5&#91;Action: Get Refund Status]\n    Escalation --&gt; A6&#91;Action: Generate Case Brief]\n    Escalation --&gt; A7&#91;Action: Update Case Intelligence]\n\n    A1 --&gt; CRM&#91;(Salesforce CRM&lt;br\/&gt;Contact, Account, Case)]\n    A2 --&gt; OMS&#91;(Order Management&lt;br\/&gt;Order Summary \/ External OMS)]\n    A3 --&gt; Carrier&#91;(Carrier API&lt;br\/&gt;FedEx, UPS, DHL, Shiprocket)]\n    A4 --&gt; Policy&#91;(Knowledge \/ Return Policy)]\n    A5 --&gt; Payment&#91;(Payment \/ Refund System)]\n    A6 --&gt; Case&#91;(Case Object)]\n    A7 --&gt; Case\n\n    Case --&gt; LWC&#91;LWC Case Assist Card&lt;br\/&gt;Tone, Recommendation, Brief]\n    LWC --&gt; Human&#91;Human Service Agent]\n    Human --&gt; Customer\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The diagram is intentionally simple. The actual implementation might include Data Cloud, MuleSoft, Named Credentials, Platform Events, Omni-Channel, Service Cloud Voice, Messaging for In-App and Web, and external order systems. Those details matter, but the conceptual flow remains the same:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Customer enters through a channel.<\/li>\n\n\n\n<li>Agent receives the message and available context.<\/li>\n\n\n\n<li>Agent verifies the customer.<\/li>\n\n\n\n<li>Agent retrieves the right operational data.<\/li>\n\n\n\n<li>Agent responds if it can.<\/li>\n\n\n\n<li>Agent escalates if needed.<\/li>\n\n\n\n<li>Agent writes guidance to the Case.<\/li>\n\n\n\n<li>Human agent sees the LWC card and responds appropriately.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Data Model<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For this implementation, we\u2019ll assume the following Salesforce data model:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Standard Objects<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Contact<\/li>\n\n\n\n<li>Account<\/li>\n\n\n\n<li>Case<\/li>\n\n\n\n<li>Order Summary or Order<\/li>\n\n\n\n<li>Order Item Summary or Order Product<\/li>\n\n\n\n<li>Return Order, if Salesforce Order Management is used<\/li>\n\n\n\n<li>Knowledge Article, for return and refund policy content<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">External Systems<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Order Management System<\/li>\n\n\n\n<li>Shipping carrier API<\/li>\n\n\n\n<li>Payment gateway or refund processor<\/li>\n\n\n\n<li>ERP, if order fulfillment lives outside Salesforce<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Fields On Case<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the following fields on Case:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Field Label<\/th><th>API Name<\/th><th>Type<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td>Customer Tone<\/td><td>Customer_Tone__c<\/td><td>Picklist<\/td><td>Angry, Frustrated, Disappointed, Neutral, Happy, Satisfied<\/td><\/tr><tr><td>Sentiment Level<\/td><td>Sentiment_Level__c<\/td><td>Picklist<\/td><td>Red, Yellow, Green<\/td><\/tr><tr><td>Agent Recommendation<\/td><td>Agent_Recommendation__c<\/td><td>Long Text Area<\/td><td>Suggested response approach for human agent<\/td><\/tr><tr><td>Agent Brief<\/td><td>Agent_Brief__c<\/td><td>Long Text Area<\/td><td>Summary of conversation, order context, and unresolved issue<\/td><\/tr><tr><td>Verification Status<\/td><td>Verification_Status__c<\/td><td>Picklist<\/td><td>Not Started, Pending, Verified, Failed<\/td><\/tr><tr><td>Verified Contact<\/td><td>Verified_Contact__c<\/td><td>Lookup(Contact)<\/td><td>Contact verified during conversation<\/td><\/tr><tr><td>Last Verified Email<\/td><td>Last_Verified_Email__c<\/td><td>Email<\/td><td>Email used for verification<\/td><\/tr><tr><td>Last Verified Phone<\/td><td>Last_Verified_Phone__c<\/td><td>Phone<\/td><td>Phone used for verification<\/td><\/tr><tr><td>Escalation Reason<\/td><td>Escalation_Reason__c<\/td><td>Long Text Area<\/td><td>Why the agent escalated<\/td><\/tr><tr><td>Last Agent Action<\/td><td>Last_Agent_Action__c<\/td><td>Text<\/td><td>Last action executed by Agentforce<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You could put some of this data on a related custom object instead of Case. For example, <code>Agent_Assist_Insight__c<\/code> could track multiple snapshots over time. That is useful when you want history across a long case lifecycle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this blog post, I\u2019ll keep the design focused on the Case object because the user requirement is to show the brief, tone, and recommendations as an LWC card on Case.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Agentforce Subagents<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create one Agentforce Service Agent and break its responsibility into subagents.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Customer Verification Subagent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify customer identity before any private information is disclosed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You verify the customer before private information is shared.\n\nIf the channel context contains a phone number or email address, use it to identify the customer.\n\nIf a single matching Contact is found, greet the customer by first name.\n\nIf only phone is available, ask the customer to provide their email address.\n\nIf only email is available, ask the customer to provide their phone number.\n\nIf neither phone nor email is available, ask for both email and phone number.\n\nDo not reveal order, refund, return, shipment, address, payment, or account-specific information until the Verify Customer action returns verified = true.\n\nIf verification fails two times, escalate to a human agent and update the Case brief.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This subagent owns the gate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Everything else depends on it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Order Status Subagent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Answer order update and tracking questions after verification.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You answer questions about order status, shipment status, delivery estimates, delays, and tracking numbers.\n\nBefore answering, confirm that Verification Status is Verified.\n\nUse Get Order Updates for order status.\n\nUse Get Tracking Info for shipment and carrier events.\n\nIf there are multiple recent orders, ask the customer which order they mean.\n\nIf order data is unavailable, apologize briefly, explain that the order details need review, and escalate to a human agent.\n\nNever invent tracking numbers, delivery dates, refund dates, or carrier statuses.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Returns And Refunds Subagent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Answer return eligibility, return process, refund amount, and refund timing questions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You answer questions about return eligibility, return process, refund status, refund timing, and refund policy.\n\nBefore answering, confirm that Verification Status is Verified.\n\nUse Check Return Eligibility before saying whether an item can be returned.\n\nUse Get Refund Status before saying whether a refund was issued.\n\nUse Knowledge only for general policy explanations.\n\nFor account-specific refund status, use system data only.\n\nIf the customer is angry, disappointed, or mentions legal action, escalation, repeated failed attempts, missing refund, or damaged product, update the Case with a recommendation for a human agent.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. Escalation Summary Subagent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Purpose:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare the human agent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instructions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You summarize the conversation for a human support agent.\n\nWrite a concise case brief.\n\nClassify customer tone as Angry, Frustrated, Disappointed, Neutral, Happy, or Satisfied.\n\nMap the customer tone to a sentiment level:\n- Red for Angry or Frustrated\n- Yellow for Disappointed or Neutral\n- Green for Happy or Satisfied\n\nWrite a recommended response strategy for the human agent.\n\nThe recommendation should include:\n- whether the agent should apologize\n- whether the agent should acknowledge delay or inconvenience\n- what information the agent should confirm\n- the next best action\n- what not to repeat if the customer has already provided it\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is the part that changes the service experience for human agents. Instead of opening a Case and reading a long transcript, the agent sees a colored card with a brief and recommendation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Actions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Agentforce actions are the contract between the agent\u2019s reasoning and your business systems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this solution, create these actions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Action<\/th><th>Type<\/th><th>Purpose<\/th><\/tr><\/thead><tbody><tr><td>Verify Customer<\/td><td>Apex or Flow<\/td><td>Match phone and email to Contact<\/td><\/tr><tr><td>Get Order Updates<\/td><td>Apex, Flow, or API<\/td><td>Retrieve order status<\/td><\/tr><tr><td>Get Tracking Info<\/td><td>Apex or MuleSoft API<\/td><td>Retrieve shipment tracking<\/td><\/tr><tr><td>Check Return Eligibility<\/td><td>Flow or Apex<\/td><td>Determine return eligibility<\/td><\/tr><tr><td>Get Refund Status<\/td><td>Apex or API<\/td><td>Retrieve refund status<\/td><\/tr><tr><td>Generate Case Brief<\/td><td>Prompt Template or Apex<\/td><td>Summarize customer issue<\/td><\/tr><tr><td>Update Case Intelligence<\/td><td>Apex or Flow<\/td><td>Write tone, recommendation, and brief to Case<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The action descriptions matter. A vague action description gives the agent too much room to choose incorrectly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Poor description:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Gets customer information.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Better description:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Verifies whether the customer-provided email and phone number belong to a single Contact. Use this action before sharing order, shipment, return, refund, address, or payment information.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Poor description:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Gets order info.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Better description:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Retrieves order status, fulfillment status, estimated delivery date, and order summary for a verified Contact. Use only after customer verification succeeds.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The description is not documentation for humans only. It is part of how the agent decides what tool to use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Naive Approach To Customer Service Automation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s start with the kind of implementation that looks acceptable in a demo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class OrderAnswerService {\n    public static String answerOrderQuestion(String email) {\n        Contact contact = &#91;\n            SELECT Id, Name\n            FROM Contact\n            WHERE Email = :email\n            LIMIT 1\n        ];\n\n        Order latestOrder = &#91;\n            SELECT Id, Status, Tracking_Number__c\n            FROM Order\n            WHERE AccountId = :contact.AccountId\n            ORDER BY CreatedDate DESC\n            LIMIT 1\n        ];\n\n        return 'Your latest order is ' + latestOrder.Status +\n            '. Tracking number: ' + latestOrder.Tracking_Number__c;\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is useful as a warning, not as a pattern.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are several problems here:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Email alone may not be enough to verify the customer.<\/li>\n\n\n\n<li>The query assumes one matching Contact.<\/li>\n\n\n\n<li>It assumes the latest order is the order the customer means.<\/li>\n\n\n\n<li>It exposes a tracking number immediately.<\/li>\n\n\n\n<li>It has no escalation behavior.<\/li>\n\n\n\n<li>It writes nothing useful back to Case.<\/li>\n\n\n\n<li>It gives the human agent no context if the customer gets transferred.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The issue is not that the code is short. Short code is often good. The issue is that the important concepts are missing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is no verification concept. There is no ambiguity concept. There is no customer tone concept. There is no human handoff concept.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Those concepts will still exist in the real world. The customer will still be frustrated. The Contact match will still be ambiguous. The order will still be delayed. The human agent will still need a summary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The system simply will not represent those realities well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Moving Verification Into A First-Class Concept<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s give verification a shape.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A simplified Apex action could look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class VerifyCustomerAction {\n    public class Request {\n        @InvocableVariable(required=false)\n        public String email;\n\n        @InvocableVariable(required=false)\n        public String phone;\n\n        @InvocableVariable(required=false)\n        public String caseId;\n    }\n\n    public class Response {\n        @InvocableVariable\n        public Boolean verified;\n\n        @InvocableVariable\n        public String contactId;\n\n        @InvocableVariable\n        public String contactName;\n\n        @InvocableVariable\n        public String status;\n\n        @InvocableVariable\n        public String message;\n    }\n\n    @InvocableMethod(label='Verify Customer')\n    public static List&lt;Response&gt; verify(List&lt;Request&gt; requests) {\n        List&lt;Response&gt; responses = new List&lt;Response&gt;();\n\n        for (Request req : requests) {\n            Response res = new Response();\n\n            if (String.isBlank(req.email) || String.isBlank(req.phone)) {\n                res.verified = false;\n                res.status = 'Pending';\n                res.message = 'Email and phone are required before private information can be shared.';\n                responses.add(res);\n                continue;\n            }\n\n            List&lt;Contact&gt; contacts = &#91;\n                SELECT Id, Name, Email, Phone, MobilePhone\n                FROM Contact\n                WHERE Email = :req.email\n                AND (Phone = :req.phone OR MobilePhone = :req.phone)\n                LIMIT 2\n            ];\n\n            if (contacts.size() == 1) {\n                Contact matchedContact = contacts&#91;0];\n\n                res.verified = true;\n                res.contactId = matchedContact.Id;\n                res.contactName = matchedContact.Name;\n                res.status = 'Verified';\n                res.message = 'Customer verified.';\n\n                updateCaseVerification(req.caseId, matchedContact, req.email, req.phone, 'Verified');\n            } else if (contacts.isEmpty()) {\n                res.verified = false;\n                res.status = 'Failed';\n                res.message = 'No matching customer was found for the provided email and phone.';\n                updateCaseVerification(req.caseId, null, req.email, req.phone, 'Failed');\n            } else {\n                res.verified = false;\n                res.status = 'Ambiguous';\n                res.message = 'Multiple customers matched. Human review is required.';\n                updateCaseVerification(req.caseId, null, req.email, req.phone, 'Failed');\n            }\n\n            responses.add(res);\n        }\n\n        return responses;\n    }\n\n    private static void updateCaseVerification(\n        String caseId,\n        Contact contact,\n        String email,\n        String phone,\n        String status\n    ) {\n        if (String.isBlank(caseId)) {\n            return;\n        }\n\n        Case c = new Case(\n            Id = caseId,\n            Verification_Status__c = status,\n            Last_Verified_Email__c = email,\n            Last_Verified_Phone__c = phone\n        );\n\n        if (contact != null) {\n            c.Verified_Contact__c = contact.Id;\n        }\n\n        update c;\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This action does not answer the customer\u2019s question. That\u2019s the point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It answers a more important system question first:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Are we allowed to answer the customer\u2019s question?<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">That distinction is what keeps the agent safe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Order And Tracking Actions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once verification succeeds, the order subagent can retrieve order data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A simplified order status response might look like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class GetOrderUpdatesAction {\n    public class Request {\n        @InvocableVariable(required=true)\n        public String contactId;\n\n        @InvocableVariable(required=false)\n        public String orderNumber;\n    }\n\n    public class Response {\n        @InvocableVariable\n        public Boolean success;\n\n        @InvocableVariable\n        public String orderNumber;\n\n        @InvocableVariable\n        public String orderStatus;\n\n        @InvocableVariable\n        public String fulfillmentStatus;\n\n        @InvocableVariable\n        public String estimatedDeliveryDate;\n\n        @InvocableVariable\n        public String message;\n    }\n\n    @InvocableMethod(label='Get Order Updates')\n    public static List&lt;Response&gt; getUpdates(List&lt;Request&gt; requests) {\n        List&lt;Response&gt; responses = new List&lt;Response&gt;();\n\n        for (Request req : requests) {\n            Response res = new Response();\n\n            List&lt;Order&gt; orders = &#91;\n                SELECT Id, OrderNumber, Status, Fulfillment_Status__c, Estimated_Delivery_Date__c\n                FROM Order\n                WHERE AccountId IN (\n                    SELECT AccountId\n                    FROM Contact\n                    WHERE Id = :req.contactId\n                )\n                ORDER BY CreatedDate DESC\n                LIMIT 5\n            ];\n\n            if (orders.isEmpty()) {\n                res.success = false;\n                res.message = 'No recent orders were found for the verified customer.';\n            } else if (String.isBlank(req.orderNumber) &amp;&amp; orders.size() &gt; 1) {\n                res.success = false;\n                res.message = 'Multiple recent orders were found. Ask the customer which order they mean.';\n            } else {\n                Order selectedOrder = selectOrder(orders, req.orderNumber);\n\n                if (selectedOrder == null) {\n                    res.success = false;\n                    res.message = 'The requested order was not found for the verified customer.';\n                } else {\n                    res.success = true;\n                    res.orderNumber = selectedOrder.OrderNumber;\n                    res.orderStatus = selectedOrder.Status;\n                    res.fulfillmentStatus = selectedOrder.Fulfillment_Status__c;\n                    res.estimatedDeliveryDate = String.valueOf(selectedOrder.Estimated_Delivery_Date__c);\n                    res.message = 'Order details retrieved.';\n                }\n            }\n\n            responses.add(res);\n        }\n\n        return responses;\n    }\n\n    private static Order selectOrder(List&lt;Order&gt; orders, String orderNumber) {\n        if (String.isBlank(orderNumber) &amp;&amp; orders.size() == 1) {\n            return orders&#91;0];\n        }\n\n        for (Order o : orders) {\n            if (o.OrderNumber == orderNumber) {\n                return o;\n            }\n        }\n\n        return null;\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a production implementation, I would usually avoid putting external carrier logic directly inside this class. The cleaner approach is to create separate services:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>OrderLookupService<\/code><\/li>\n\n\n\n<li><code>TrackingService<\/code><\/li>\n\n\n\n<li><code>ReturnEligibilityService<\/code><\/li>\n\n\n\n<li><code>RefundStatusService<\/code><\/li>\n\n\n\n<li><code>CaseInsightService<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">That keeps each concept isolated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Case Intelligence<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now we get to the feature that helps the human agent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the conversation escalates, the agent should update the Case with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Customer tone<\/li>\n\n\n\n<li>Sentiment level<\/li>\n\n\n\n<li>Recommended response<\/li>\n\n\n\n<li>Brief summary<\/li>\n\n\n\n<li>Escalation reason<\/li>\n\n\n\n<li>Last action taken<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example Case brief:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Customer asked for the status of order #10004567. Customer was verified using email and phone. Agent retrieved tracking and found the package delayed by two days. Customer became frustrated because this is the second delay and requested a human agent.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example recommendation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Start by apologizing for the repeated delay. Do not ask the customer to repeat email or phone verification because verification is already complete. Confirm that the package is delayed by two days, explain the current carrier scan, and offer either continued tracking support or a return\/refund review if the customer no longer wants the item.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example tone:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Frustrated\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example sentiment level:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Red\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is the kind of summary that saves time in the console. The human agent can enter the conversation already knowing what happened, what not to repeat, and how carefully to phrase the next response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A simplified update action:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public with sharing class UpdateCaseIntelligenceAction {\n    public class Request {\n        @InvocableVariable(required=true)\n        public String caseId;\n\n        @InvocableVariable(required=true)\n        public String customerTone;\n\n        @InvocableVariable(required=true)\n        public String agentBrief;\n\n        @InvocableVariable(required=true)\n        public String agentRecommendation;\n\n        @InvocableVariable(required=false)\n        public String escalationReason;\n\n        @InvocableVariable(required=false)\n        public String lastAgentAction;\n    }\n\n    public class Response {\n        @InvocableVariable\n        public Boolean success;\n\n        @InvocableVariable\n        public String message;\n    }\n\n    @InvocableMethod(label='Update Case Intelligence')\n    public static List&lt;Response&gt; updateCase(List&lt;Request&gt; requests) {\n        List&lt;Response&gt; responses = new List&lt;Response&gt;();\n\n        for (Request req : requests) {\n            Response res = new Response();\n\n            Case c = new Case(\n                Id = req.caseId,\n                Customer_Tone__c = req.customerTone,\n                Sentiment_Level__c = mapToneToSentiment(req.customerTone),\n                Agent_Brief__c = req.agentBrief,\n                Agent_Recommendation__c = req.agentRecommendation,\n                Escalation_Reason__c = req.escalationReason,\n                Last_Agent_Action__c = req.lastAgentAction\n            );\n\n            update c;\n\n            res.success = true;\n            res.message = 'Case intelligence updated.';\n            responses.add(res);\n        }\n\n        return responses;\n    }\n\n    private static String mapToneToSentiment(String tone) {\n        if (tone == 'Angry' || tone == 'Frustrated') {\n            return 'Red';\n        }\n\n        if (tone == 'Disappointed' || tone == 'Neutral') {\n            return 'Yellow';\n        }\n\n        if (tone == 'Happy' || tone == 'Satisfied') {\n            return 'Green';\n        }\n\n        return 'Yellow';\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You might wonder why the sentiment mapping exists in Apex if the agent can classify the tone itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The answer is consistency.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The agent can classify the emotional tone. The system should own the mapping from tone to UI behavior.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That way, if the business later decides that \u201cNeutral\u201d should be green instead of yellow, you change deterministic logic, not a prompt.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating The Case Assist Card<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Case Assist Card is a Lightning Web Component placed on the Case record page. It reads the Case fields and displays the AI-generated guidance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The component has three jobs:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make the customer tone visible.<\/li>\n\n\n\n<li>Make the recommendation visible.<\/li>\n\n\n\n<li>Make the brief visible.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The color is not decoration. It is operational priority.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A red card tells the human agent:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Slow down. Acknowledge the customer\u2019s frustration first. Do not respond like this is a routine order update.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">A yellow card tells the human agent:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The customer is not fully satisfied. Be careful, concise, and helpful.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">A green card tells the human agent:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The customer is satisfied or calm. Continue with a standard helpful tone.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">LWC HTML<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template&gt;\n    &lt;lightning-card title=\"Agentforce Case Assist\" icon-name=\"standard:bot\"&gt;\n        &lt;div class={cardClass}&gt;\n            &lt;div class=\"header\"&gt;\n                &lt;div&gt;\n                    &lt;p class=\"label\"&gt;Customer Tone&lt;\/p&gt;\n                    &lt;p class=\"tone\"&gt;{customerTone}&lt;\/p&gt;\n                &lt;\/div&gt;\n\n                &lt;div&gt;\n                    &lt;p class=\"label\"&gt;Verification&lt;\/p&gt;\n                    &lt;p class=\"status\"&gt;{verificationStatus}&lt;\/p&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n\n            &lt;div class=\"section\"&gt;\n                &lt;p class=\"label\"&gt;Recommended Response&lt;\/p&gt;\n                &lt;p&gt;{agentRecommendation}&lt;\/p&gt;\n            &lt;\/div&gt;\n\n            &lt;div class=\"section\"&gt;\n                &lt;p class=\"label\"&gt;Case Brief&lt;\/p&gt;\n                &lt;p&gt;{agentBrief}&lt;\/p&gt;\n            &lt;\/div&gt;\n\n            &lt;template if:true={escalationReason}&gt;\n                &lt;div class=\"section\"&gt;\n                    &lt;p class=\"label\"&gt;Escalation Reason&lt;\/p&gt;\n                    &lt;p&gt;{escalationReason}&lt;\/p&gt;\n                &lt;\/div&gt;\n            &lt;\/template&gt;\n        &lt;\/div&gt;\n    &lt;\/lightning-card&gt;\n&lt;\/template&gt;\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">LWC JavaScript<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import { LightningElement, api, wire } from 'lwc';\nimport { getRecord } from 'lightning\/uiRecordApi';\n\nimport CUSTOMER_TONE from '@salesforce\/schema\/Case.Customer_Tone__c';\nimport SENTIMENT_LEVEL from '@salesforce\/schema\/Case.Sentiment_Level__c';\nimport AGENT_RECOMMENDATION from '@salesforce\/schema\/Case.Agent_Recommendation__c';\nimport AGENT_BRIEF from '@salesforce\/schema\/Case.Agent_Brief__c';\nimport VERIFICATION_STATUS from '@salesforce\/schema\/Case.Verification_Status__c';\nimport ESCALATION_REASON from '@salesforce\/schema\/Case.Escalation_Reason__c';\n\nconst FIELDS = &#91;\n    CUSTOMER_TONE,\n    SENTIMENT_LEVEL,\n    AGENT_RECOMMENDATION,\n    AGENT_BRIEF,\n    VERIFICATION_STATUS,\n    ESCALATION_REASON\n];\n\nexport default class AgentforceCaseAssistCard extends LightningElement {\n    @api recordId;\n\n    @wire(getRecord, { recordId: '$recordId', fields: FIELDS })\n    caseRecord;\n\n    get fieldValues() {\n        return this.caseRecord?.data?.fields;\n    }\n\n    get customerTone() {\n        return this.fieldValues?.Customer_Tone__c?.value || 'Not evaluated';\n    }\n\n    get sentimentLevel() {\n        return this.fieldValues?.Sentiment_Level__c?.value || 'Yellow';\n    }\n\n    get agentRecommendation() {\n        return this.fieldValues?.Agent_Recommendation__c?.value || 'No recommendation generated yet.';\n    }\n\n    get agentBrief() {\n        return this.fieldValues?.Agent_Brief__c?.value || 'No case brief generated yet.';\n    }\n\n    get verificationStatus() {\n        return this.fieldValues?.Verification_Status__c?.value || 'Not Started';\n    }\n\n    get escalationReason() {\n        return this.fieldValues?.Escalation_Reason__c?.value;\n    }\n\n    get cardClass() {\n        const sentiment = this.sentimentLevel.toLowerCase();\n\n        if (sentiment === 'red') {\n            return 'assist-card red';\n        }\n\n        if (sentiment === 'green') {\n            return 'assist-card green';\n        }\n\n        return 'assist-card yellow';\n    }\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">LWC CSS<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>.assist-card {\n    border-radius: 0.75rem;\n    padding: 1rem;\n    border-left: 0.5rem solid;\n}\n\n.assist-card.red {\n    background: #fff1f1;\n    border-left-color: #ba0517;\n}\n\n.assist-card.yellow {\n    background: #fff8e6;\n    border-left-color: #dd7a01;\n}\n\n.assist-card.green {\n    background: #eefaf1;\n    border-left-color: #2e844a;\n}\n\n.header {\n    display: flex;\n    justify-content: space-between;\n    gap: 1rem;\n    margin-bottom: 1rem;\n}\n\n.section {\n    margin-top: 1rem;\n}\n\n.label {\n    font-size: 0.75rem;\n    text-transform: uppercase;\n    color: #5c5c5c;\n    font-weight: 700;\n    margin-bottom: 0.25rem;\n}\n\n.tone,\n.status {\n    font-size: 1rem;\n    font-weight: 700;\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">LWC Meta XML<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;LightningComponentBundle xmlns=\"http:\/\/soap.sforce.com\/2006\/04\/metadata\"&gt;\n    &lt;apiVersion&gt;61.0&lt;\/apiVersion&gt;\n    &lt;isExposed&gt;true&lt;\/isExposed&gt;\n    &lt;targets&gt;\n        &lt;target&gt;lightning__RecordPage&lt;\/target&gt;\n    &lt;\/targets&gt;\n    &lt;targetConfigs&gt;\n        &lt;targetConfig targets=\"lightning__RecordPage\"&gt;\n            &lt;objects&gt;\n                &lt;object&gt;Case&lt;\/object&gt;\n            &lt;\/objects&gt;\n        &lt;\/targetConfig&gt;\n    &lt;\/targetConfigs&gt;\n&lt;\/LightningComponentBundle&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Place this component on the Case Lightning Record Page used by service agents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I usually prefer placing it near the top of the right sidebar. It should be visible without forcing the agent to scroll, but it should not replace the core case details, activity timeline, or related records.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The End-To-End Flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s walk through a real conversation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 1: Phone Number Available From Voice<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The customer calls from a known phone number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The system finds one matching Contact:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Phone: +91 98765 43210\nMatched Contact: Priya Shah\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The agent starts:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Hi Priya, I can help with your order. For security, please confirm the email address on your account before I share order details.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Priya provides the email.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Verify Customer action returns:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"verified\": true,\n  \"contactName\": \"Priya Shah\",\n  \"status\": \"Verified\"\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now the agent can answer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Thanks, Priya. Your order #10004567 has shipped and is currently in transit. The latest carrier update shows that it reached the Mumbai sorting facility today. The estimated delivery date is June 22.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">No escalation is needed. The Case can still be updated with a green sentiment if a Case exists:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Tone: Satisfied\nSentiment: Green\nBrief: Customer asked for order status and was given the current shipment update.\nRecommendation: No human action required unless the customer asks a follow-up question.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 2: Chat Without Email Or Phone<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The customer starts chat with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Where is my refund? I have been waiting for days.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">No phone or email is available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The agent responds:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>I can help check that. Before I access refund details, please provide the email address and phone number used on the order.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The customer provides both.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verification succeeds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The refund status action finds that the refund is pending because the returned item has not completed warehouse inspection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The agent responds:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Thanks for verifying your details. Your return was received, and the refund is currently waiting for warehouse inspection to complete. Once inspection is completed, the refund will be released to the original payment method.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The customer responds:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>That is not acceptable. I was told this would be done already.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now the agent should update the Case:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Tone: Frustrated\nSentiment: Red\nBrief: Customer asked about refund status. Customer was verified. Refund is pending because warehouse inspection is incomplete. Customer is frustrated because they expected the refund to be completed already.\nRecommendation: Apologize for the delay. Acknowledge that the customer was previously told the refund would be completed. Do not ask for email or phone again. Confirm whether warehouse inspection can be expedited or whether a manual refund review is available.\nEscalation Reason: Customer is frustrated about refund delay and wants human review.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The human agent opens the Case and immediately sees a red card.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is the point of the LWC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It turns conversation context into action context.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Agent Greeting Logic<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The greeting experience deserves special attention because it shapes customer trust.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use this hierarchy:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If Contact Is Found By Phone<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Hi {FirstName}, I can help with that. For security, please confirm the email address on your account.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">If Contact Is Found By Email<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Hi {FirstName}, I can help with that. For security, please confirm the phone number on your account.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">If Contact Is Found By Phone And Email<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Hi {FirstName}, I can help with that.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then continue to the relevant task.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If No Contact Is Found<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>I can help with that. Before I access order or refund details, please provide the email address and phone number used on the order.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">If Multiple Contacts Are Found<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>I need to verify a few details before accessing order information. Please provide the email address and phone number used on the order.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid saying:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>I found multiple accounts with that phone number.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That reveals too much. The customer does not need to know how many records matched.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prompt Template For Case Brief<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can create a prompt template for the escalation summary. The exact implementation depends on your org\u2019s AI setup, but the instruction should be structured.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example prompt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You are generating a service handoff summary for a human support agent.\n\nUse the conversation transcript, verified customer details, order data, refund data, and case context.\n\nReturn the following fields:\n\nCustomer Tone:\nChoose one: Angry, Frustrated, Disappointed, Neutral, Happy, Satisfied.\n\nAgent Brief:\nWrite 2 to 4 sentences. Include what the customer asked, what was verified, what data was found, what the agent already said, and what remains unresolved.\n\nAgent Recommendation:\nWrite specific guidance for the human agent. Include how to respond, what to acknowledge, what to check next, and what not to ask again.\n\nEscalation Reason:\nWrite one sentence explaining why the conversation is being escalated.\n\nRules:\n- Do not invent order, tracking, refund, or policy details.\n- Do not include sensitive payment details.\n- Do not ask the human agent to repeat completed verification.\n- Keep the recommendation operational and concise.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is one of those places where brevity is a feature. A verbose AI summary is only slightly better than no summary. A human agent needs usable guidance, not a transcript rewritten in paragraph form.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Recommended Agentforce Build Steps<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the practical build sequence.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Prepare Case Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the Case fields listed earlier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add them to the Case page layout, but do not rely on the layout alone. The LWC is the primary user experience for these fields.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Build Verification Logic<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Implement verification using Flow or Apex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use Apex if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Matching rules are complex.<\/li>\n\n\n\n<li>You need normalization for phone numbers.<\/li>\n\n\n\n<li>You need custom logging.<\/li>\n\n\n\n<li>You need to query multiple objects.<\/li>\n\n\n\n<li>You need deterministic handling for ambiguous matches.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Use Flow if:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Matching is straightforward.<\/li>\n\n\n\n<li>Admins will own future updates.<\/li>\n\n\n\n<li>You want a low-code implementation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Build Order, Tracking, Return, And Refund Actions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create actions with clear boundaries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not create one giant \u201cCustomer Service Action\u201d that does everything. That makes agent reasoning harder to test and harder to debug.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Better:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Verify Customer<\/code><\/li>\n\n\n\n<li><code>Get Recent Orders<\/code><\/li>\n\n\n\n<li><code>Get Order Status<\/code><\/li>\n\n\n\n<li><code>Get Tracking Details<\/code><\/li>\n\n\n\n<li><code>Check Return Eligibility<\/code><\/li>\n\n\n\n<li><code>Get Refund Status<\/code><\/li>\n\n\n\n<li><code>Update Case Intelligence<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Create The Agentforce Service Agent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the service agent and define its role:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>You are a customer service agent for ecommerce order support. You help verified customers with order updates, shipment tracking, returns, and refunds. You must verify the customer before sharing private information. When escalation is needed, you prepare a concise case brief and response recommendation for the human support agent.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Create Subagents<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the four subagents:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Customer Verification<\/li>\n\n\n\n<li>Order Status<\/li>\n\n\n\n<li>Returns And Refunds<\/li>\n\n\n\n<li>Escalation Summary<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Attach the relevant actions to each subagent.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Ground The Agent<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ground the agent with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Return policy knowledge articles.<\/li>\n\n\n\n<li>Refund timing policy.<\/li>\n\n\n\n<li>Shipping delay policy.<\/li>\n\n\n\n<li>Order status definitions.<\/li>\n\n\n\n<li>Internal escalation policy.<\/li>\n\n\n\n<li>Contact, Case, and Order data.<\/li>\n\n\n\n<li>External order, carrier, and refund APIs where required.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Separate general policy answers from customer-specific answers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u201cWhat is your return policy?\u201d can be answered from Knowledge.<\/li>\n\n\n\n<li>\u201cIs my order eligible for return?\u201d requires verified customer and order data.<\/li>\n\n\n\n<li>\u201cWhere is my refund?\u201d requires verified customer and refund data.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Add Guardrails<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add instructions that prevent unsafe responses:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Do not disclose order details before verification.\n\nDo not disclose tracking numbers before verification.\n\nDo not disclose refund status before verification.\n\nDo not expose full delivery addresses.\n\nDo not expose full payment details.\n\nDo not claim a refund has been issued unless refund data confirms it.\n\nDo not promise delivery by a date unless the order or carrier system provides that date.\n\nIf the customer asks for something outside your allowed scope, escalate to a human agent.\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Build And Deploy The LWC<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Deploy the LWC to the Case record page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Test the visual states:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Red card for Angry or Frustrated.<\/li>\n\n\n\n<li>Yellow card for Disappointed or Neutral.<\/li>\n\n\n\n<li>Green card for Happy or Satisfied.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 9: Connect To Channels<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Deploy the agent to the relevant channels:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Messaging for Web<\/li>\n\n\n\n<li>Messaging for In-App<\/li>\n\n\n\n<li>Experience Cloud<\/li>\n\n\n\n<li>Service Cloud Voice<\/li>\n\n\n\n<li>Partner or customer portal<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Pass available context into the agent session:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Phone number<\/li>\n\n\n\n<li>Email<\/li>\n\n\n\n<li>Contact Id, if known<\/li>\n\n\n\n<li>Case Id, if already created<\/li>\n\n\n\n<li>Messaging session Id<\/li>\n\n\n\n<li>Voice call Id<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 10: Monitor And Improve<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Track:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verification success rate.<\/li>\n\n\n\n<li>Escalation rate.<\/li>\n\n\n\n<li>Deflection rate.<\/li>\n\n\n\n<li>Average handle time after escalation.<\/li>\n\n\n\n<li>Human agent edits to AI recommendation.<\/li>\n\n\n\n<li>Sentiment distribution.<\/li>\n\n\n\n<li>Cases where the agent selected the wrong action.<\/li>\n\n\n\n<li>Cases where the LWC recommendation was ignored.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The best feedback loop is not \u201cDid the AI answer?\u201d It is \u201cDid the AI reduce the amount of work needed to resolve the customer\u2019s issue safely?\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Testing The Agent<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Testing an Agentforce implementation requires more than happy-path testing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the scenarios I would include before production.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verification Tests<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Scenario<\/th><th>Expected Result<\/th><\/tr><\/thead><tbody><tr><td>Phone available, one Contact found<\/td><td>Greet by name and ask for email<\/td><\/tr><tr><td>Email available, one Contact found<\/td><td>Greet by name and ask for phone<\/td><\/tr><tr><td>Phone and email match same Contact<\/td><td>Mark verified<\/td><\/tr><tr><td>Email and phone do not match<\/td><td>Do not disclose data<\/td><\/tr><tr><td>Multiple Contacts match<\/td><td>Ask for more detail or escalate<\/td><\/tr><tr><td>Customer refuses verification<\/td><td>Escalate<\/td><\/tr><tr><td>Customer provides order number before verification<\/td><td>Ask for verification first<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Order Tests<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Scenario<\/th><th>Expected Result<\/th><\/tr><\/thead><tbody><tr><td>One recent order<\/td><td>Provide order status<\/td><\/tr><tr><td>Multiple recent orders<\/td><td>Ask which order<\/td><\/tr><tr><td>No orders found<\/td><td>Explain and escalate if needed<\/td><\/tr><tr><td>Delayed shipment<\/td><td>Explain delay using available data<\/td><\/tr><tr><td>Tracking unavailable<\/td><td>Do not invent tracking<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Return And Refund Tests<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Scenario<\/th><th>Expected Result<\/th><\/tr><\/thead><tbody><tr><td>Return eligible<\/td><td>Explain next step<\/td><\/tr><tr><td>Return window expired<\/td><td>Explain policy and escalation option<\/td><\/tr><tr><td>Refund issued<\/td><td>Provide confirmed status<\/td><\/tr><tr><td>Refund pending<\/td><td>Explain current stage<\/td><\/tr><tr><td>Refund data unavailable<\/td><td>Escalate<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Sentiment Tests<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Customer Message<\/th><th>Expected Tone<\/th><th>Sentiment<\/th><\/tr><\/thead><tbody><tr><td>\u201cThis is ridiculous. I want someone now.\u201d<\/td><td>Angry<\/td><td>Red<\/td><\/tr><tr><td>\u201cI\u2019m frustrated. This is the second delay.\u201d<\/td><td>Frustrated<\/td><td>Red<\/td><\/tr><tr><td>\u201cThat\u2019s disappointing.\u201d<\/td><td>Disappointed<\/td><td>Yellow<\/td><\/tr><tr><td>\u201cOkay, thanks for checking.\u201d<\/td><td>Satisfied<\/td><td>Green<\/td><\/tr><tr><td>\u201cGreat, that helps.\u201d<\/td><td>Happy<\/td><td>Green<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">LWC Tests<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Case Field State<\/th><th>Expected Card<\/th><\/tr><\/thead><tbody><tr><td>Sentiment Level = Red<\/td><td>Red card<\/td><\/tr><tr><td>Sentiment Level = Yellow<\/td><td>Yellow card<\/td><\/tr><tr><td>Sentiment Level = Green<\/td><td>Green card<\/td><\/tr><tr><td>No sentiment yet<\/td><td>Yellow default<\/td><\/tr><tr><td>No recommendation yet<\/td><td>Empty-state message<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Common Implementation Mistakes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 1: Letting The Agent Verify And Answer In One Step<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Verification should happen before customer-specific answers. Combining verification and order lookup in one action makes the system harder to reason about and harder to audit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 2: Treating Knowledge As Customer Data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Knowledge is good for general policy. It is not enough for customer-specific refund status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The agent can answer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Refunds are generally processed after returned items pass inspection.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But it should not answer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Your refund will arrive tomorrow.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Unless a trusted system says so.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 3: Writing Long Case Summaries<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A long summary is another transcript. The Case brief should be short, structured, and operational.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The human agent should understand three things within seconds:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>What happened?<\/li>\n\n\n\n<li>How does the customer feel?<\/li>\n\n\n\n<li>What should I do next?<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 4: Making Color The Only Signal<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Color helps, but color alone is not enough. The card should also show the tone text: Angry, Frustrated, Disappointed, Neutral, Happy, or Satisfied.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That supports accessibility and avoids ambiguity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 5: Mapping Sentiment In The Prompt Only<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let the agent classify tone, but map tone to card color in deterministic logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prompts are good for interpretation. Code is better for policy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The interesting part of this Agentforce build is not that the agent can answer order questions. That is useful, but it is not the deeper design point.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The deeper point is that customer service automation needs memory, judgment, safety, and handoff readiness.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verification gives the agent permission to answer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Actions give the agent trusted business data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Subagents give the work shape.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Case fields give the conversation a durable home.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The LWC card gives the human agent immediate context.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The color gives the agent a visual cue before they type the next response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When these pieces are designed together, Agentforce becomes more than a front-line bot. It becomes a participant in the service process. It helps the customer when the path is safe and clear. It helps the human agent when the path needs judgment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is where the implementation starts to feel less like \u201cAI support\u201d and more like a proper service architecture.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is not to replace the human agent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is to make sure that when the human agent enters the conversation, they enter with context, empathy, and the next best action already in front of them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome! This post is about building an Agentforce Service Agent that can respond to customer questions about order updates, tracking information, returns,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,33],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-agentforce","category-salesforce"],"_links":{"self":[{"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":2,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":182,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/posts\/180\/revisions\/182"}],"wp:attachment":[{"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thebnmhub.com\/cgl\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}