Justin logo
All Projects
HandoffAI interface and Salesforce Opportunity handoff workspace
HandoffAI interface and Salesforce Opportunity handoff workspace
Case Study
SalesforceAgentforceApexLightning Web ComponentsEnterprise WorkflowHuman-in-the-Loop

HandoffAI

2026 · Product Builder

Salesforce-native Agentforce workflow that turns Opportunity context into a structured, reviewable handoff for Customer Success, onboarding, and implementation.

Reached technical workflow validation in Agentforce Builder: preview-then-save, structured persistence, and safe failure handling all passed acceptance testing. Production-user and customer-impact data have not yet been collected.

AgentforceApexLightning Web ComponentsSalesforce DXCustom Objects
Year/2026
Role/Product Builder
Focus/Agentforce · Apex · Lightning Web Components · Salesforce DX
01
Overview

HandoffAI is a Salesforce-native handoff workflow for revenue teams transferring a customer from Sales to Customer Success, onboarding, or implementation. It reads live Opportunity and Account information, organizes the available context into six structured sections, identifies missing information, and returns a preview through Agentforce or an Opportunity-page Lightning Web Component. Both surfaces share one backend: Agentforce handles conversational generation and approval, while the Lightning Web Component handles record-page editing, saving, history, and review.

Key Product Decision

HandoffAI could have automatically generated and saved a handoff as soon as a user requested one. I chose to separate generation from persistence: every request defaults to preview, and a record is created only after the user explicitly asks to save it. Customer context can be incomplete or inaccurate, and a generated handoff may influence onboarding or implementation — a faster workflow is not useful if employees cannot trust what it writes into Salesforce.

01

Product Thesis

A sales handoff is not just a summary. It is the point where responsibility and customer context move between teams, so the product needs to preserve what is known, expose what is missing, and create an accountable record the receiving team can retrieve later.

02

Product Bet

A structured first draft, paired with explicit review and approval, can improve handoff consistency without asking sales representatives to rewrite information that already exists in Salesforce.

02
Problem

When a deal moves from Sales to Customer Success, onboarding, or implementation, the receiving team often starts with incomplete context. Information is distributed across Opportunity fields, Account fields, notes, emails, and the sales representative’s personal knowledge, so the receiving team has to reconstruct the customer story while trying to start the relationship well. The problem was never generating a paragraph faster — it was creating a handoff process employees would trust enough to use.

Sales representatives prepare handoffs differently, producing inconsistent quality across the organization.

Customer Success and implementation teams repeat discovery because previous conversations were not transferred clearly.

Missing stakeholders, requirements, commitments, or timeline risks are discovered only after the transition.

Chat-generated summaries disappear unless stored as a governed Salesforce record, and uncontrolled automation could alter CRM data before anyone reviews it.

03
Users

HandoffAI is built for B2B organizations where one team sells the customer and another team onboards, implements, or manages the relationship. When a customer is moving from Sales to another team, the job is to use the information already available in Salesforce to prepare a consistent handoff, show what is missing, and let the user approve the result before it becomes a permanent record.

01

Operators & Recipients

Account executives and sales representatives prepare the handoff. Customer Success managers, onboarding specialists, and implementation consultants use it to understand the customer, current stage, risks, and what to confirm next. Revenue Operations, Sales Operations, and Salesforce administrators need a governable process that respects permissions.

02

Job To Be Done

When a customer is moving from Sales to another team, use the information already available in Salesforce to prepare a consistent handoff, show me what is missing, and let me approve the result before it becomes a permanent record.

04
Solution

HandoffAI turns live Opportunity and Account data into six structured sections — Customer Overview, Current Stage, Missing Information, Suggested Next Action, Risks, and Questions to Ask — generated by one shared Salesforce service behind both a conversational Agentforce workflow and an Opportunity-page Lightning Web Component.

01

Six Structured Sections

Customer Overview, Current Stage, Missing Information, Suggested Next Action, Risks, and Questions to Ask — the same structure powers both product surfaces.

02

Agentforce: Preview → Save

"Prepare a handoff" generates a preview and saves nothing. Only an explicit "Save this handoff" request creates one Sales_Handoff__c record and returns its ID — the Opportunity and Account stay unchanged either way.

03

Lightning Workspace

Generate, edit, validate, and save a handoff directly from the Opportunity record page. View the latest handoff, expand older history, copy the output, or mark it as reviewed.

HandoffAI interface

HandoffAI Agentforce and Lightning workspace

05
Impact

Reached technical workflow validation in Agentforce Builder: preview-then-save, structured persistence, and safe failure handling all passed acceptance testing. Production-user and customer-impact data have not yet been collected.

HandoffAI has reached technical workflow validation, not customer-impact validation — it has not yet been tested with production customers or enough target users to claim operational improvements. In the live Agentforce Builder workflow, preview ran with saving disabled, all six structured sections returned correctly, no record was created during preview, and an explicit save request created exactly one Sales_Handoff__c record with a returned Salesforce ID. The source Opportunity remained unchanged throughout, and an invalid Opportunity ID produced a safe failure instead of exposing internal details.

01

Demonstrated Workflow Outcome

The intended Sales Handoff subagent was selected, the custom action launched successfully, preview ran with saving disabled, all six sections returned, no record was created during preview, and an explicit save created exactly one record with a returned ID while the source Opportunity stayed unchanged.

02

Engineering Validation

Apex and Lightning tests passed at the latest checkpoint, covering preview-versus-save behavior, structured persistence, large invocable batches, restricted-user access, invalid records, safe exception translation, record-navigation race conditions, and immediate history refresh.

06
Technical Build
AgentforceApexLightning Web ComponentsSalesforce DXCustom ObjectsJest

The Agentforce action and Lightning Web Component share one Apex service, HandoffService, so business logic never diverges between interfaces. The six structured fields are the source of truth, and Apex composes the full readable handoff from them rather than parsing headings out of one text block. Content is currently generated through deterministic Salesforce logic — Agentforce provides the conversational layer that interprets the request, selects the Sales Handoff subagent, and distinguishes preview from explicit save — so Generated_By_AI__c remains false in this version.

01

Shared Service Architecture

Agentforce → GenerateSalesHandoffAction → HandoffService, and Lightning Web Component → HandoffController → HandoffService. The invocable action supports bulk requests without issuing one query or DML operation per record.

02

Secure, Fault-Tolerant Runtime

Sharing enforcement, user-mode queries and DML, field-access filtering, and a narrowly scoped permission set keep Opportunity and Account access read-only with no broad admin requirement. Invalid or inaccessible records return a safe message instead of a stack trace or fabricated content, and the Lightning component resets its state when the user navigates between Opportunities so one record’s handoff never leaks into another.

07
Reflection

The most important work was not adding a model. It was defining what the agent could read, what it could write, when it needed confirmation, how it handled incomplete source data, and how its output became an accountable system record. The result is less autonomous than the broadest possible version, but more defensible as a real enterprise workflow.

01

What I Cut

Automatic Opportunity or stage updates, task creation, Slack and email distribution, external generative AI, activity-history ingestion, multi-object support, packaging and marketplace publication, and production analytics — each would have expanded the surface area without proving the central workflow.

02

What Remained

The smallest complete trust loop: read permitted CRM context, generate six structured sections, expose missing information, let the user review, require explicit save authorization, and store a reusable Salesforce record.

03

What's Next

Natural-language Opportunity lookup with disambiguation when names collide, a separate SaveApprovedSalesHandoff action that saves exactly the sections a user reviewed and edited, better navigation to the saved record, clean packaging and installation guidance, and validation with target users.