{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "Multilingual Email Operations",
    "subtitle": "Salesforce owns the customer channel and durable case record; Agent Studio supplies the AI workflow and assist experience",
    "output": "docs/02-architecture/salesforce-email-agent-studio.html",
    "visual_preset": "signal-flow",
    "animation": "none",
    "quality_profile": "showcase",
    "viewBox": [1740, 820]
  },
  "components": [
    {
      "id": "sender",
      "type": "external",
      "label": "Customer",
      "sublabel": "email + attachments",
      "pos": [36, 238],
      "size": [142, 68]
    },
    {
      "id": "sf_ingress",
      "type": "cloud",
      "label": "Inbound Email",
      "sublabel": "Salesforce Email-to-Case",
      "tag": "Salesforce",
      "pos": [248, 238],
      "size": [166, 68]
    },
    {
      "id": "sf_case",
      "type": "database",
      "label": "Case Communications",
      "sublabel": "Case • EmailMessage • files",
      "tag": "system of record",
      "pos": [484, 238],
      "size": [184, 68]
    },
    {
      "id": "agent_studio",
      "type": "backend",
      "label": "Agent Studio",
      "sublabel": "AI workflows • translation • attachment analysis • policy decisions • response drafting • Agent Assist catalogs and rail",
      "tag": "one managed AI boundary",
      "pos": [528, 468],
      "size": [548, 168]
    },
    {
      "id": "sf_ai_records",
      "type": "database",
      "label": "Durable AI Results",
      "sublabel": "translations • routing • evidence • decisions • draft",
      "tag": "Salesforce records",
      "pos": [760, 238],
      "size": [202, 68]
    },
    {
      "id": "sf_workspace",
      "type": "frontend",
      "label": "Agent Workspace",
      "sublabel": "timeline • assist rail • review draft",
      "tag": "Embecta Case page",
      "pos": [1040, 238],
      "size": [190, 68]
    },
    {
      "id": "sf_egress",
      "type": "cloud",
      "label": "Outbound Email",
      "sublabel": "localized Salesforce reply",
      "tag": "Salesforce",
      "pos": [1310, 238],
      "size": [166, 68]
    },
    {
      "id": "recipient",
      "type": "external",
      "label": "Customer",
      "sublabel": "receives reply in their language",
      "pos": [1546, 238],
      "size": [158, 68]
    }
  ],
  "boundaries": [
    {
      "kind": "region",
      "label": "Salesforce — email channel, case data, automation, and agent workspace",
      "wraps": [
        "sf_ingress",
        "sf_case",
        "sf_ai_records",
        "sf_workspace",
        "sf_egress"
      ],
      "pad": 28
    }
  ],
  "connections": [
    {
      "id": "customer_email",
      "from": "sender",
      "to": "sf_ingress",
      "variant": "emphasis"
    },
    {
      "id": "create_case",
      "from": "sf_ingress",
      "to": "sf_case",
      "variant": "emphasis"
    },
    {
      "id": "invoke_workflow",
      "from": "sf_case",
      "to": "agent_studio",
      "label": "invoke email workflow",
      "variant": "security",
      "fromSide": "bottom",
      "toSide": "top"
    },
    {
      "id": "persist_results",
      "from": "agent_studio",
      "to": "sf_ai_records",
      "label": "persist governed results",
      "variant": "security",
      "fromSide": "top",
      "toSide": "bottom"
    },
    {
      "id": "load_context",
      "from": "sf_ai_records",
      "to": "sf_workspace",
      "variant": "default"
    },
    {
      "id": "approve_response",
      "from": "sf_workspace",
      "to": "agent_studio",
      "label": "approve response",
      "variant": "dashed",
      "fromSide": "bottom",
      "toSide": "top"
    },
    {
      "id": "localized_reply",
      "from": "agent_studio",
      "to": "sf_egress",
      "label": "auto or approved localized reply",
      "variant": "emphasis"
    },
    {
      "id": "send_reply",
      "from": "sf_egress",
      "to": "recipient",
      "variant": "emphasis"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Inbound",
      "items": [
        "Salesforce creates the Case, communication, and attachment records",
        "Salesforce invokes Agent Studio with the durable record context"
      ]
    },
    {
      "dot": "violet",
      "title": "AI decision",
      "items": [
        "Agent Studio translates, analyzes attachments, classifies, routes, and drafts once",
        "Tier 1 can respond automatically; Tier 2 and Tier 3 remain reviewable"
      ]
    },
    {
      "dot": "emerald",
      "title": "Agent and customer experience",
      "items": [
        "The Case page reads long-lived results into the timeline and Agent Assist rail",
        "Approved English responses are translated before Salesforce sends the localized email"
      ]
    }
  ]
}
