Skip to content

Pharma multilingual email demo

Status: Built and verified in Vanguard and the devsdo Salesforce sandbox. Last reviewed: 2026-08-10

This demo shows one multilingual email intake process for AP, chargebacks, customer service, and pricing. A message sent to medtech@trueserve.ai reaches Salesforce Email-to-Case and the TrueServe workflow with its attachments intact. The workflow selects the MedTech record type, marks the Case Working, translates the inbound content, extracts attachments, classifies and routes the request, persists its evidence and decisions in Salesforce, and either responds automatically or moves the Case to Escalated with a reviewable reply.

Delivered journeys

Journey Fixture Expected outcome Verified Case
D1 — AP Helpdesk Japanese supplier statement with three invoices Tier 2; three invoice decisions; consolidated English and Japanese drafts 00020414 / 500DW00000HJ5tkYAD
C1 — Chargebacks German €40,120 debit note with 12 lines Tier 2; nine credit, two reject, one review; each line has a citation 00020454 / 500DW00000HJ7SLYA1
E1 — Customer Service French order-status request Tier 1; French reply sent; Case closed 00020417 / 500DW00000HJ5u4YAD
E1 — Pricing Portuguese forward-quarter price request Tier 2; four decisions; approval-gated Portuguese draft 00020420 / 500DW00000HJ5uJYAT

The generated fixtures and rehearsal commands live in demo/pharma-email.

Implemented intake spine

SES receipt
  -> encrypted raw-message S3 object
  -> idempotent email coordinator
       -> Salesforce Email-to-Case forward
       -> content-addressed attachment storage
       -> correlated email.received event
  -> Email Operations - Multilingual Intake
       -> exact Salesforce EmailMessage join
       -> OCR each attachment
       -> one multilingual policy analysis
       -> durable analysis, evidence, and line decisions in Salesforce
       -> Tier 1: send localized response and close
       -> Tier 2: show stored recommendation and prepared reply for approval
       -> Tier 3: route for specialist review

The coordinator uses the SES delivery identifier as the Salesforce EmailMessage.MessageIdentifier join key. Its deterministic event id, DynamoDB lease/ledger, and content-addressed attachments make AWS retries safe. Delivery-status reports and automatic replies are suppressed before either Salesforce forwarding or workflow publication, preventing response loops.

The published workflow is seeded by 138_pharma_email_operations.sql. Critical Salesforce joins, writes, and nested For Each failures fail the workflow instead of reporting a false success.

Salesforce experience

The Embecta Case page uses the published embecta-support Agent Assist profile in Host Record mode. Its Email Copilot catalog contains:

  • Email overview with stacked, wrapping details
  • Research with Integrated System Details tiles
  • Expandable Evidence tiles
  • Reply recommendation

TrueServe_Context_Email_Operations reads TrueServe_Email_Analysis__c and TrueServe_Email_Decision__c; opening or refreshing a Case never invokes the model. The Communications timeline owns the original and translated email view. Selecting the reply action opens a Lightning modal with one editable English response and a note that it will be translated into the customer language. Translate & send durably queues the tenant translate-and-deliver workflow and closes the modal. The recommendation becomes a background progress card, then disappears automatically after the sent EmailMessage is committed and the newest relevant email becomes outbound.

The existing PagerDuty translation adapter remains as the fallback for Cases that do not yet have a durable TrueServe email analysis.

  1. Send the Japanese D1 email and attachment. Open the resulting Case and show the Communications translation, the three invoice outcomes, evidence, and the reply recommendation.
  2. Select Review draft, edit the single English response if desired, then select Translate & send. Show the translated sent EmailMessage and the recommendation disappearing.
  3. Send the German C1 debit note. Use the stacked Research tiles as the hero moment: 12 independently persisted, cited outcomes without a squeezed table.
  4. Send the French and Portuguese E1 messages. Contrast the automatically closed French Case with the approval-gated Portuguese Case.
  5. Close on one intake address, taxonomy, policy engine, and Salesforce rail across four languages and four operational routes.

Verification evidence

  • A live medtech@trueserve.ai C1 run created Case 00020484 / 500DW00000HJ836YAD, selected the MedTech record type, changed from Working to Escalated, cleared the unrelated healthcare fields, and persisted 12 decisions plus two evidence sources.
  • Japanese D1 workflow completed with three persisted decisions.
  • German C1 workflow completed with exactly 12 persisted decisions. The current Case exposes the 23 Email Copilot Flow outputs used by the four-card Host Record rail: overview, disposition, evidence, and approval-gated reply.
  • French E1 produced an outbound EmailMessage, populated the DCC language/translated fields, and closed its Case.
  • Portuguese E1 remained in Awaiting review with four decisions.
  • The human approval backend translated the approved English response, delivered it to the Amazon SES mailbox simulator, created a sent EmailMessage with both approved and translated bodies, stored the external delivery id, and changed the analysis to Sent.
  • A post-deployment French run used public Case Number 00020427 in both drafts and the subject without exposing the internal Case record id.
  • A real delivery-status report was ingested as suppressed and produced neither a Case forward nor a workflow event.

Demo safeguards

  • Use a mailbox you control or the SES mailbox simulator for approved sends. The fixture sender addresses under .example cannot receive mail and intentionally bounce.
  • Use a new S3 key for each rehearsal. Reusing a key exercises idempotency and does not create another Case.
  • Do not delete failed rehearsal Cases during the demo. Filter by the verified Case ids above or create fresh messages.
  • Confirm the Salesforce integration user is active and unfrozen before the run.

Source map