Skip to content

Surgery Partners Salesforce and Agent Studio build contract

Status: Draft | Last reviewed: 2026-10-06

Use this contract with the proposed script when building the demo. Patient facts, prices, appointments, signed instructions, and timeline events come from records. Prompts describe behavior; they do not contain a hidden copy of Elena's story.

Live-data meaning

For the demo, seed synthetic records in a Salesforce sandbox, invoke real authenticated reads and writes, and reread every consequential result. The Salesforce sandbox can host the demonstration's authoritative slot inventory and simulated provider confirmations, each labeled as demo data.

For a clinical implementation, the operating-room scheduler, EHR, payer response, signature provider, and support provider may own their respective confirmations. Salesforce stores their identifiers, provenance, and synchronized status. Creating a Salesforce Task is not evidence of an external booking, an insurer decision, clinical clearance, or an executed consent.

No org schema or license inspection was performed for this proposal. The local Takeda implementation demonstrates Person Accounts, MemberPlan, CareRequest, Cases, Tasks, and VoiceCall relationships in its own environment. Confirm the target org's available objects and permissions before implementing these mappings. Salesforce's public clinical, insurance, and social-determinants models provide additional candidates. R9

Record mapping

Object labels below are conceptual where the API name has not been verified. Names ending in __c are proposed custom objects, not claims about an installed schema.

Information Preferred existing model Proposed extension when needed
Patient and contacts Person Account, underlying Contact, authorized relationships Consent-to-contact and accessibility fields
Surgeon, facility, payer Healthcare Provider/Facility where available; Business Accounts and Contacts External system identifiers and facility timezone
Surgical episode Clinical Service Request/Care Plan where appropriate; coordinating Case SurgeryEpisode__c: procedure, side, surgeon, facility, status dimensions
Coverage MemberPlan and benefits records Verification timestamp/source; network result per billing entity
Prior authorization CareRequest if enabled and suited to the org Authorization reference, procedure/side, facility, valid dates, recorded decision
Financial analysis Existing benefits-estimation objects if suitable SurgeryEstimate__c and line items, immutable version, inclusions/exclusions
Availability and appointments Installed scheduling model, if it supports required resource constraints SurgerySlot__c, SurgeryAppointment__c, PreOpAppointment__c
Clinical tests Clinical Service Request and results/observations Ordered-test references, result/clinical-review statuses
Medication list Medication Statement/Medication Request or equivalent clinical objects MedicationReview__c for patient report, discrepancies, last dose, reviewer
Preparation instructions EHR-linked clinical document or approved instruction model PreOpInstruction__c: clinician, version, effective time, explicit cutoff timestamps
Forms and signature evidence Installed consent/signature objects; Files for completed copies SurgeryConsentReceipt__c, document version/hash, envelope ID, signer, status
Transport and support Care Barrier/Determinant plus intervention Tasks where available RecoverySupportBooking__c: provider, escort role, scope, duration, receipt
Calls and follow-up VoiceCall, Task, Case, related secure summaries Episode lookup and consistent interaction correlation ID
Reminders Existing outbound workflow plus durable scheduling record SurgeryReminder__c: due time, booking revision, attempts, outcome, cancellation
Nurse decision and advice Clinical documentation integration and interaction Task Reviewed note, source order IDs, advice delivered, unresolved owner/due time

Use a surgical-episode Case as the stable coordination parent if the target model needs one. Give the initial scheduling call and reminder separate interaction records linked to that parent. The nurse continuation belongs to the reminder interaction. The timeline should combine those links with the existing consultation, insurance, and pre-op records.

Persist raw clinical documents in their authorized system of record. Salesforce Files can retain permitted copies and signature evidence, with access controls suited to the deployment.

Keep distinct states

Dimension Example statuses Evidence required
Identity Unverified, verified, expired Trusted authentication event bound to this patient and call
Financial Unverified, estimate ready, acknowledged, review needed Valid source findings plus exact acknowledged estimate version
Scheduling Offered, held, booked, changed, canceled Slot/resource booking receipt
Registration Draft, submitted, complete Required fields saved and validated
Consent Prepared, patient signed, clinician step pending, complete, withdrawn Facility-specific required signatures and current documents
Pre-op Ordered, scheduled, attended, results pending, reviewed Order, appointment, result, and clinician-review records
Support Needed, requested, confirmed, changed, unavailable Provider acceptance and discharge/home-care scope
Clinical preparation Review pending, instructions approved, new question, follow-up required Current clinician-authored instructions and assessment
Interaction AI active, transferred, nurse active, completed, interrupted Telephony and reviewed call outcome

Do not collapse these into a single green “Ready for surgery” badge. The first call can finish with scheduling and registration complete while future testing and clinical review remain pending.

Proposed tool contracts

These are functions to implement or bind, not existing tool names discovered in Agent Studio.

Tool family Inputs and result Important behavior
get_surgery_context Host-bound patient/episode identity; returns structured records, versions, provenance No patient PHI returned to the voice prompt before authentication
get_insurance_summary Episode and current estimate version Distinguish eligibility, network, authorization, estimate, and final adjudication
acknowledge_estimate Exact version and explicit patient action Preserve prior versions; reacknowledge material changes
find_surgery_slots Procedure, surgeon, facility, clinical window, patient constraints Only return feasible resource combinations
hold_surgery_slot / confirm_surgery_booking Slot ID, revision, authorization window, idempotency key Atomic hold/confirmation; return expiry or confirmed receipt
prepare_registration_packet Episode and facility templates Validate side/surgeon/procedure and prior consent-discussion prerequisites
open_signature_session / get_signature_receipt Bound signer and document versions Use provider-confirmed completion; preserve pending/error outcomes
book_preop_visit Existing orders, surgery date, allowed interval Book 14–28 days before in this scenario; check actual order validity
find_recovery_support / confirm_recovery_support Accessibility, discharge needs, consent, quote Separate transport, escort, personal care, and clinical home health
publish_patient_plan Persisted plan revision and approved recipient Generate secure view; do not expose internal nurse-only reasoning
schedule_preop_reminder Booking revision, facility timezone, preferred contact window Recheck current surgery status before dispatch; cancel stale jobs
get_current_preop_instructions Episode, surgery revision, clinician-approved effective version Return explicit times and source; missing/conflicting instructions require review
request_clinical_handoff Accepted transfer plus verified call/episode context Transfer only to configured clinical destinations; preserve failed-transfer status
save_nurse_review Nurse-confirmed fields, source orders, advice, follow-up Nurse authorizes clinical documentation; preserve discrepancies and audit trail
finish_interaction Actual call outcome and receipts Close the interaction, not the future surgical episode

Consequence-bearing operations return requested, pending, confirmed, or failed, together with the authoritative record ID, version, and receipt when available. A voice agent may promise completion only after confirmed and successful readback.

Use stable idempotency keys for bookings, signatures, reminders, and support reservations. Reconcile a timeout by reading the outcome before retrying a mutation. Synchronize external transactions with explicit compensation or follow-up; do not assume Salesforce and a provider share a database transaction.

Events and component data

Patient-facing events should carry record references and display projections, scoped to the authenticated session. Components report explicit user actions; the server checks identity, ownership, version, and action prerequisites.

Component Reads Writes or events
Cost summary Current estimate, line items, source date estimate.acknowledged with version
Surgery date Returned available slots slot.selected; server confirms booking
Registration Current demographics and document checklist Reviewed field edits, explicit submit
Consent packet Authorized full documents and signing session Provider receipt; never a client-only “signed” flag
Pre-op appointment Ordered services and actual slots Appointment confirmation
Recovery support Approved providers, availability, quote Price/service acceptance and confirmed booking
Preparation checklist Current clinician-approved instructions Acknowledgment and teach-back completion
Medication question Patient's submitted question Patient-reported information pending nurse reconciliation
Nurse evidence rail Current patient/episode context plus approved knowledge Draft guidance and review prompts; no direct patient publication
Nurse-reviewed advice Saved, reviewed clinical communication Secure patient-plan update

Re-read Salesforce on context refresh. Follow the existing Takeda context.ready / context.updated pattern and native central LWCs with Agent Assist in the rail. Context supplied by the browser never replaces trusted patient/session identity. See Takeda context behavior.

Clinical evidence and Copilot behavior

The Copilot separates:

  1. Patient report: what Elena says, when she says it, and whether it conflicts with the record.
  2. Existing instructions: the named clinician's current signed order for this patient and procedure.
  3. Supporting reference: approved facility policy, medication labeling, and relevant professional guidance.
  4. Human decision: what the nurse confirms or what requires the surgeon, anesthesia team, or prescriber.

Cards show these labels, source dates, and document links. A confidence percentage is not a substitute for provenance.

Use the medication label to distinguish Tylenol PM from plain acetaminophen. Surface the existing acetaminophen dose and daily limits from the clinical plan without generating a new regimen. Check for other acetaminophen-containing products and sedative exposure.

For semaglutide, ask about indication, dose, frequency, last dose, recent escalation, and gastrointestinal symptoms. The rehearsed response requires a current individual anesthesia plan that permits continuation and unchanged patient circumstances. New symptoms, conflicting directions, or a missing plan prompt clinical review.

Do not expose an unrestricted “drug interaction checker” as a prescriber. If broader interaction checking is later added, select a maintained clinical knowledge service, capture severity and source, and preserve clinician review.

Reminder scheduling and changes

Create the reminder when the surgery booking is confirmed. This fixture schedules it for November 17 at 9 a.m., two days before the November 19 procedure.

Before dispatch:

  • Re-read the appointment and cancellation status.
  • Check the reminder's booking revision and patient contact preferences.
  • Load the latest clinical instructions and outstanding reviews.
  • Honor the patient's contact window and facility timezone.
  • Suppress duplicate attempts and reschedule according to a bounded retry policy.

A surgery change invalidates the old reminder and may invalidate fasting cutoffs, pre-op test timing, authorization, transport, and caregiver coverage. Route those dependencies through revalidation. Do not shift clinical cutoff times by arithmetic unless the approved order explicitly permits that mechanism.

Wrong-party and voicemail branches disclose no procedure, medication, or billing information. A declined digital link offers an accessible alternative; the automated agent must not mark unsigned forms complete. A patient who asks for a person can leave the autonomous path.

Initial Studio authoring briefs

Scheduling Voice Agent: You are a disclosed automated scheduling assistant for the configured facility. After trusted authentication, guide the patient through recorded insurance findings, explicit estimate acknowledgment, feasible surgery dates, approved registration/signature steps, ordered pre-op visits, confirmed support services, and preparation. Offer one date at a time and adapt to constraints. Speak only confirmed outcomes. Refer clinical questions to the care team. Finish with teach-back and a persisted plan.

Reminder Voice Agent: You contact a patient two days before a booked procedure. Authenticate this call, retrieve the current booking and clinician-approved instructions, review exact local arrival and fasting times, verify support, and ask about medicine or health changes. Do not change a regimen or clear the patient for anesthesia. Transfer clinical questions with consent and full context.

Pre-op Copilot: Assist a qualified nurse during the reminder continuation. Use the verified episode context and transcript to identify the question, collect missing facts, compare reports with current orders, retrieve approved evidence, and suggest concise patient-friendly language. Mark missing or conflicting evidence. Draft a note and teach-back check. Publish advice or save clinical decisions only through the nurse's reviewed action.

Author prompts without patient names, dates, prices, or hardcoded medical decisions. Inject these through runtime record context. Store clinical references in a versioned, reviewable knowledge collection.

Build sequence

  1. Confirm sandbox, schema, licenses, telephony route, authentication, and synthetic-data scope.
  2. Seed the episode, insurance findings, constrained slots, consultation evidence, medicines, and support-service fixtures.
  3. Implement read/write tools and verify record-level authorization, receipts, and retry behavior.
  4. Generate the three agents and the patient/nurse component catalogs.
  5. Build the Salesforce patient workspace using the existing native-LWC and Copilot-rail composition.
  6. Connect a signature sandbox, outbound/reminder workflow, and clinical transfer queue.
  7. Rehearse the first call; verify every consequential record.
  8. Advance fixture records through completed pre-op review; rehearse the reminder and nurse continuation.
  9. Test changed data and exception branches before presenting.

The full digital-signature integration, constrained surgical scheduling, support-provider booking, and reminder orchestration need verification or implementation. The inspected repo documents reusable authentication, multimodality, handoff, and Salesforce/Copilot patterns; it does not establish that these new domain integrations already exist.

Acceptance evidence

Test Required outcome
Wrong party or failed authentication No PHI or patient-specific component; no unauthorized mutation
Successful first call Signed eligible forms, confirmed surgery/pre-op/support, scheduled reminder, zero live handoffs
Two declined dates Appropriate subsequent offers; no duplicate bookings or leftover holds
Slot taken during review Fresh availability offered; no false “booked” statement
Expired authorization or estimate changed Visible review/reacknowledgment; no unsupported coverage guarantee
Consent question or missing clinician discussion Procedural consent remains pending and clinical follow-up is created
Signature/provider timeout Pending state and reconciled result; no fabricated receipt
Transport without a responsible adult Support remains incomplete
Pre-op appointment outside allowed window New feasible appointment or explicit unresolved task
Changed surgery date/time Stale reminder canceled; related instructions and reservations revalidated
Completed reminder authentication Only this call's trusted grant unlocks patient details
“Tylenol PM” question Ingredient distinction, required checks, nurse-confirmed advice, no invented dose
Stable GLP-1 with current plan Nurse validates unchanged facts and explains recorded plan
GLP-1 escalation or symptoms Anesthesia review; no autonomous clearance or blanket hold instruction
New anticoagulant or insulin question Qualified clinical review; no improvised stop/restart schedule
Clinical queue unavailable Honest transfer failure and owned follow-up; no generic reassurance
Missing or conflicting instructions No made-up fasting times or medication directions
Changed patient/price/appointment fixture Spoken answers and both UIs change from Salesforce data
Readback after both calls Timeline, documents, appointment links, advice, and actual outcomes agree

Measure task completion, correct escalation, data fidelity, duplicate-write prevention, patient repetition, and nurse review time. Treat reduced cancellations or improved clinical outcomes as hypotheses until measured.

See also