Choose where an address delivers its mail

At the end of this guide each of your addresses delivers to the right place: tickets, the shared inbox, or one person's inbox.

The three places mail can land

TicketsShared inboxPersonal inbox
Use it forCustomer supportTeam mail that is not a support request: partners, suppliers, billingOne member's own mail
Who sees itEvery memberEvery memberOnly its owner
A thread is calledA ticketA conversationA conversation
Statusopen, in_progress, pending, closedopen, closedopen, closed
Priority and SLAYesNoNo
Address settingpurpose: ticketpurpose: inbox, no user_idpurpose: inbox with a user_id

All three share the workspace's tags, contacts, drafts, summaries and internal notes. The tickets guide covers the ticket fields.

How an address gets its purpose

Every address in a workspace has a purpose. New mail to the address goes where the purpose says. A reply to an existing thread always goes back to that thread, whatever the address is set to now.

An address is personal when it has purpose inbox and a user_id: the member whose inbox it is. An address with a user_id must keep purpose inbox.

What you need first

Steps

  1. List your addresses. In the dashboard open Settings → Emails. Each address shows its purpose as Ticket, Shared or Inbox. Over the API, add ?purpose=inbox or ?purpose=ticket to filter:

    curl -H "Authorization: Bearer YOUR_TOKEN" \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/emails
  2. Make an address a shared inbox. In the dashboard, edit the address and choose Shared. Over the API:

    curl -X PUT \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "purpose": "inbox", "user_id": null }' \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/emails/EMAIL_ID
  3. Or give it to one person. Choose Inbox and pick the member. Over the API, send the member's user id:

    curl -X PUT \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "purpose": "inbox", "user_id": 12 }' \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/emails/EMAIL_ID
  4. Or turn it back into a ticket address. Clear the owner in the same request:

    curl -X PUT \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "purpose": "ticket", "user_id": null }' \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/emails/EMAIL_ID
  5. Switch off what the workspace does not use. In Settings → General an owner can turn Tickets, Shared Inbox and Personal Inbox on or off. At least one stays on. Requests to a switched-off part answer 403.

    curl -X PUT \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{ "tickets_enabled": true, "shared_inbox_enabled": true, "personal_inbox_enabled": false }' \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID
  6. Start a thread yourself. Mail does not have to come in first. This sends a new email from the shared inbox; POST …/personal-inbox takes the same fields and sends from your own inbox.

    curl -X POST \
      -H "Authorization: Bearer YOUR_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "to": "[email protected]",
        "subject": "Invoice for October",
        "body": "Hi Sam, the October invoice is attached to this thread.",
        "workspace_email": "[email protected]"
      }' \
      https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/conversations

    A shared conversation can only be sent from a shared address, and a personal one only from its owner's own address.

Check that it worked

Send a test email to the address from outside PimiDesk. It shows up under Tickets, Shared Inbox or Inbox in the sidebar, usually within a minute. Over the API:

# Shared inbox
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/conversations

# Your own personal inbox
curl -H "Authorization: Bearer YOUR_TOKEN" \
  https://desk-api.pimi.io/api/v1/workspaces/WORKSPACE_ID/personal-inbox

Good to know

What goes wrong

What you seeWhy
Mail to a new shared address still opens ticketsThe address still has purpose ticket. Check it in step 1.
422 on changing the purposeThe address has an owner. Send "user_id": null in the same request.
403 "feature is not enabled"That part is switched off for the workspace (step 5).
403 on starting a threadThe workspace is on trial. A trial workspace can reply to people who wrote in, and cannot start a thread.
A reply lands in the old place after a purpose changeExpected. Replies follow their thread; only new mail follows the new purpose.

Next