Email Processing
UCS enables email processing in contact center mode, meaning multiple email mailboxes are handled by agents, including support for skills, language proficiencies, CRM communication tracking, etc.
Architecture
| Object | Description |
|---|---|
| E-mail queue | Email processing takes place in one or more queues. |
| E-mail source | Retrieves emails from a mailbox and delivers them to a queue. |
| E-mail sender | Handles sending replies to emails. |
Receiving Emails
Each E-mail source fetches exactly one mailbox using the IMAP or POP3 protocol and delivers emails to exactly one queue.
Google OAuth
The preferred method for authenticating to a mailbox is via the OAuth mechanism (IMAP XOAuth). Authorizing access to the mailbox is performed through UCS itself, by signing in with the corresponding Google account. Configuration is done in the Google Cloud Console:
- APIs & Services
- Add a new project using the Add Project button
- Select Overview in the left menu and on the displayed page click Configure
- App name: UCS IMAP and SMTP XOAUTH
- User support email: it@company.com
- Audience: Internal
- Contact Information: it@company.com
- Complete the setup by clicking the Create button
- Select Clients in the left menu
- Click + Create client in the top menu
- Application type: Web application
- Name: UCS
- Authorized JavaScript origins: https://ucs.company.com (note: must not end with a trailing slash)
- Authorized redirect URIs: https://ucs.company.com/login/oauth2/google
- Save the Client ID and Client secret from the OAuth client created dialog.
- In the Data Access section, click the Add or remove scopes button
- Select Manually add scopes: https://mail.google.com/ (then click Add to table and then Update)
Then proceed to the UCS administration:
- Select ☰ System → SSO providers.
- Click + add SSO provider and enter the parameters:
- Type: Google OAuth
- Client ID: 123456789-copiedClientId.apps.googleusercontent.com
- Client secret: GABCDEF-copiedClientSecretFromGoogleCloudConsole
- Scope: https://mail.google.com/
- Click Insert.
- In the list of SSO providers, click 🔑 and sign in with the email mailbox user account.
- Note the Google OAuth provider ID (it is displayed in the dialog title when editing).
- Navigate to ☰ Messaging → Email sources.
- Click + add email source and enter the parameters:
- Server type: IMAP
- Server address: imap.gmail.com
- Service port: 993
- Use SSL connection: ☑
- Username: mailbox.email@company.com
- Password: http://127.0.0.1:8080/api/v1.0/auth/token/2 (replace the trailing digit 2 with the Google OAuth SSO provider ID).
- Click Insert.
If you need to monitor multiple mailboxes, you must create multiple Google OAuth SSO providers that share the same Client ID and Client secret (only one OAuth project will exist in Google). In UCS, a separate Google OAuth SSO provider will be created for each mailbox, and the 🔑 sign-in will be performed for that specific mailbox.
Sending Emails
For sending emails from a given address, one E-mail sender is created, which can be used across multiple queues.
Google OAuth
The preferred method for authenticating the email sender is via the OAuth mechanism (SMTP XOAuth). You can reuse an existing Google E-mail source or add one using the same procedure.
- Navigate to ☰ Messaging → Email senders.
- Click + add email sender and enter the parameters:
- Server type: STARTTLS
- Server address: smtp.gmail.com
- Service port: 587
- Sender username: mailbox.email@company.com
- Sender password: http://127.0.0.1:8080/api/v1.0/auth/token/2 (replace the trailing digit 2 with the Google OAuth SSO provider ID).
- Sender e-mail address: mailbox.email@company.com
- Click Insert.