Skip to content

Channels and the inbox

Conversations holds every channel a contact reaches the business on: texts and calls, email, WhatsApp, Facebook Messenger, Instagram DMs, live chat and LinkedIn. A conversation’s channel says which, and a reply with POST /api/v1/conversations/{id}/messages goes back on it. Every channel’s incoming message fires the crm.message.received webhook with its channel.

channel Comes in through address is
sms The workspace’s Twilio numbers The number
email Email Routing on a sending domain The address it was sent to
whatsapp WhatsApp senders on the workspace’s Twilio account The sender’s number
messenger A Facebook Page connected on Meta’s page in Settings › Integrations The Page’s id
instagram That Page’s Instagram professional account The Instagram account’s id
chat The live chat widget The site’s id, or embed
linkedin A member’s LinkedIn account, connected through Unipile The account’s id (uac_…)

Anyone can write any address in an email’s From line. An email is filed with the contact who has its From address only when Email Routing’s checks show the address is the sender’s own: its domain passed DMARC, or SPF or DKIM passed for that domain. Mail from the big providers, and from any domain that sends properly, passes.

An email that doesn’t is still taken, but in a thread of its own, with a contact of its own that has no email address, and a note at the top saying why. It doesn’t join the real contact’s threads or timeline, close their follow-ups, or start automations for them, and no after-hours reply goes out. Later unvouched-for mail from the same address joins that thread. To reply there, add the address to that contact once you’ve checked who it is; from then on it’s a contact like any other, and unvouched-for mail from the address starts a new one.

Connect Twilio with its Auth Token, then add a WhatsApp sender (a number registered with WhatsApp in the Twilio Console) on Twilio’s page in Settings › Integrations, which points its messages at the workspace.

WhatsApp lets a business write freely only within 24 hours of the contact’s last message; a conversation’s lastInboundAt says when that was. Outside the window, and for a first message, a message goes as a template WhatsApp approved:

  1. GET /api/v1/messaging/whatsapp/templates lists the account’s approved templates, each with its body ({{1}} for each variable) and its variables.
  2. Send it with every variable filled in: in a conversation with template on POST /api/v1/conversations/{id}/messages, or to a contact with POST /api/v1/messaging/whatsapp/templates/send (or channel: "whatsapp" and template on POST /api/v1/conversations).
Terminal window
curl -X POST https://digize.com/api/v1/conversations/conv_01JF3Z8Q4R6M2W9T5V7X1Y3B4C/messages \
-H "x-api-key: $DIGIZE_API_KEY" \
-H "content-type: application/json" \
-d '{"template":{"sid":"HXb5b62575e6e4ff6129ad7c8efe1f983e","variables":{"1":"Ana","2":"4821"}}}'

The message keeps the template’s text with the variables filled in as its body, and the template in template. Free text outside the window is refused with invalid and details.reason: "template_required". A WhatsApp message carries one picture or file, uploaded as for picture messages, and counts as one text on the texts meter. seenAt is set when WhatsApp reports it read.

Connect Meta on its page in Settings › Integrations allowing messages, then take a Page’s Messenger conversations, and its Instagram account’s DMs, into Conversations there. Only a person can start these: a conversation begins when someone writes to the Page or the account.

A reply goes as the Page. Within 24 hours of the person’s last message it goes as Meta’s standard reply; from then until seven days on, as a person’s answer (Meta’s human agent tag); after that Meta takes none, and sending is refused with invalid and details.reason: "window_closed". Replies sent from Meta’s own inbox show in the conversation too, and seenAt is set when Meta reports them read.

Each member who connects their LinkedIn account in Outreach › Settings › Accounts brings their LinkedIn messages into Conversations, one conversation per account and contact, assigned to the account’s owner. externalId is Unipile’s chat id.

  • What comes in. A contact’s message, and the member’s own messages sent from LinkedIn itself, which show as theirs. Group chats stay out. By default only people already in the CRM come in (prospects, anyone matched by their LinkedIn profile); PATCH /api/v1/outreach/compliance with messagesFrom: "everyone" takes everyone, each new person made a contact, and needs settings:write. A file someone sends shows as a line saying so; open LinkedIn to see it.
  • Who writes from it. A LinkedIn conversation goes from the account it’s on: its owner, members they share the account with, and those with settings:write may send in it. Others are refused with forbidden, and an account that needs reconnecting with unavailable.
  • How it goes. A reply, or a first message with POST /api/v1/conversations (channel: "linkedin", and accountId to pick the account), goes at once through the account’s pacing queue, counted against its daily messages. It’s pending until LinkedIn takes it, then sent; LinkedIn refuses a first message to someone who isn’t a 1st-degree connection, and the message is failed with why. Text only for now.

GET /api/v1/messaging/channels says under linkedin which accounts there are, their status, and usable, whether the caller may write from each.

POST /api/v1/conversations/{id}/notes adds a note to a conversation: a message with kind: "note" that the contact never sees, which doesn’t move the conversation up the inbox or count as an answer. Each member in mentions, by user id, is notified, by email and push as their own Mentions switches in Settings › Profile say.

Assignment rules in CRM › Settings › Assignment and SLA decide who a conversation the contact started goes to. The first enabled rule that matches wins; each looks at the channel, the number, address, Page, Instagram account or site it came in on, and words in its first message, and hands it to chosen members or a team, taking turns or to whoever has the fewest open conversations. A conversation no rule matches goes by CRM settings’ round-robin, as before. The member it goes to is notified.

With the SLA on, a contact’s message that nobody has answered gets a due time (sla.dueAt), optionally counted from when business hours start. A warning goes to whoever the conversation is assigned to (or the owners and admins) the chosen minutes before it’s due, and a breach notification, by email too, once it’s past due, to them and the owners and admins. A member’s reply, or closing the conversation, ends it; sla.state is waiting, warned or breached meanwhile.

Every channel’s incoming message emits message.received with its channel (on LinkedIn with accountId and chatId too, and the trigger’s item has message.accountId), and a visitor’s first live chat message emits chat.started with conversationId, contactId and siteId (null on the embedded widget).