> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# AI SMS Support in Dynamics 365

> Route inbound SMS conversations from OpenCX into Dynamics 365 Omnichannel for Customer Service as live work items.

SMS handoffs flow through <Tooltip tip="Dynamics 365 Omnichannel for Customer Service — a real-time agent workspace where live work items appear as chats.">Omnichannel for Customer Service</Tooltip> as `oc_liveworkitem` records. Reps handle them as chats in the **Omnichannel Agent** app, not as incidents.

## Pre-requisites

<Warning>
  **Connect SMS in OpenCX first.** Dynamics handoff has nothing to route until an SMS number is live — see [Connect SMS](/sms/connect-sms).
</Warning>

* **SMS number connected** — see [Connect SMS](/sms/connect-sms).
* **Dynamics 365 credentials saved** — see [Connect to OpenCX](/integrations/dynamics-365/connect).

## How conversations land in Dynamics 365

```mermaid theme={"dark"}
flowchart LR
  A[Customer texts your number] --> B[AI answers]
  B --> C{AI can resolve?}
  C -- Yes --> D[Conversation closes]
  C -- No --> E[Handoff triggers]
  E --> F[oc_liveworkitem created]
  F --> G[Rep picks up in Omnichannel Agent]
```

## Setting up

<Steps>
  <Step title="Confirm the SMS number is live">
    Text your OpenCX SMS number and confirm the AI responds. If not, revisit [Connect SMS](/sms/connect-sms).
  </Step>

  <Step title="Confirm Dynamics is connected">
    The **Dynamics 365** card on your [Settings → Integrations](https://platform.open.cx/settings/integrations) should show **Active**.
  </Step>

  <Step title="Point the workstream to your SMS rep queue">
    Copy the workstream GUID from **Omnichannel admin center → Workstreams** for the team that should handle SMS, and paste it into `default_queue_id` in the OpenCX Dynamics settings.
  </Step>

  <Step title="Trigger a test handoff">
    Text your SMS number with *"Can I talk to an agent?"*. The live work item should arrive in the **Omnichannel Agent** app.
  </Step>
</Steps>

## What the rep sees

* A **live SMS chat** in the Omnichannel Agent app — not an incident.
* The AI's session summary as the conversation subject.
* `sessionId` and `channel: sms` in the work item's context variables.
* The customer's phone number on the work item (email is usually empty for SMS sessions).
* OpenCX records `dynamics365_chat_id` on the OpenCX session for audit.

## Channel-specific details

<AccordionGroup>
  <Accordion title="Contact lookup is email-first — SMS sessions land without a linked contact by default" icon="address-card">
    OpenCX looks up `emailaddress1` when linking a contact. SMS sessions usually have no email, so the live work item often arrives unlinked. Collect an email in the AI flow before handoff if you want contact linkage on the Dynamics side.
  </Accordion>

  <Accordion title="US numbers require 10DLC or toll-free registration" icon="flag">
    If your SMS number is in the US, carriers enforce **10DLC** or toll-free verification before delivery. This is an OpenCX-side requirement — see [SMS Compliance](/sms/compliance). Dynamics doesn't replace the need.
  </Accordion>

  <Accordion title="Segment length and MMS" icon="message">
    Long SMS messages get split into 160-character segments (70 for non-GSM). MMS (images, longer text) is supported on US long codes and toll-free but not all short codes — confirm your number type.
  </Accordion>

  <Accordion title="Rep replies in Omnichannel don't sync back to OpenCX today" icon="triangle-exclamation">
    Reps continue the conversation inside Dynamics. Messages they send don't back-sync into the OpenCX session.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI SMS Support" icon="comment-sms" href="/sms/introduction">
    Connect a number, configure the AI agent.
  </Card>

  <Card title="SMS Compliance" icon="flag" href="/sms/compliance">
    10DLC and toll-free registration for US numbers.
  </Card>

  <Card title="Conversations in Dynamics 365" icon="diagram-project" href="/integrations/dynamics-365/conversations">
    Routing rules, live work item payload, observability.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/dynamics-365/troubleshooting">
    Live work item never appears, unlinked contact on SMS.
  </Card>
</CardGroup>
