Configure email AI analysis
To configure email AI analysis, go to .
Add an integration with the following details:
-
Channel Type: Email
-
Endpoint URL:
Use the URL for your region:
- Europe: https://cc-workflows-eu-c1.cc.sinch.com/prod/email-analysis
- North America: https://cc-workflows-na-w2.cc.sinch.com/prod/email-analysis
- Australia: https://cc-workflows-au-s2.cc.sinch.com/prod/email-analysis
-
Conversation Direction: Inbound
-
Ordinal: Enter an order number for this integration. For more information about this field, see the Event-driven integrations document.
-
Event: Received
-
JSON for Configuration: This is the format of the JSON definition. For more details on which parts of this you'll need to edit, see below.
{ "request": { "method": "POST", "authentication": { "type": "oauth", "secrets_ref": "orchestration-layer" }, "headers": { "x-cmi-api-key": "{secrets.ri-apikey}", "x-cmi-password": "{secrets.cmi-email-analysis-user}" }, "body": { "cmi_url": "https://8h6b51di7x.execute-api.eu-central-1.amazonaws.com/acme/cmi", "cmi_user": "analysis.user", "contact_id": "{contact.id}", "from": "{contact.source}", "body": "{contact.email.body}", "subject": "{contact.email.subject}", "to": "{contact.email.to}", "cc": "{contact.email.cc}", "created": "{contact.created}" } } }
from, to, and cc fields are optional to include.
An email is analyzed if either subject or body is found. The analysis only covers text content, attachments aren't included in the analysis.
Accessing Contact Management Interface (CMI)
You'll need to access CMI to save the AI analysis.
Edit the following parameters in the JSON request body:
-
cmi_url: Replace the URL (https://8h6b51di7x.execute-api.eu-central-1.amazonaws.com/acme/cmi) with the public address of your Contact Management Interface (CMI)
-
cmi_user: Replace the user (analysis.user) with the logon name of your CMI user that has the settings and rights listed at Configure users, credentials, and rights.
If you didn't use the same names for your secrets as in our example, edit the name in the JSON header:
-
x-cmi-api-key: Replace ri-apikey with the name of the secret added for your CMI's API key in Secrets manager
-
x-cmi-password: Replace cmi-email-analysis-user with the name of the secret added for your CMI's password in Secrets manager
Customizing the AI analysis
You can customize the AI analysis to suit your needs by specifying the prompt in the customAiInstructions field. This makes it possible, for example, to:
-
Add a new field to the AI analysis called Email reason and derive the reason from the email with a short explanatory description.
-
Highlight any billing issues in the summary.
-
Censor personally identifiable information (PII).
To customize the analysis, give your instructions to the AI in the customAiInstructions field:
"customAiInstructions": "Add a new field: Email reason. It should contain 1-2 sentences on why the customer emailed."
"customAiInstructions": "Anonymize all sensitive and personally identifiable information (PII) from Summary."
Keep these parts as they are in the example JSON
-
Reference to secret orchestration-layer in the authentication: the secret to access the AI orchestration layer.
-
Parameter contact_id: to identify the conversation for the analysis.
