Views:

 Overview

Using AI to help analyze emails can make the processing of enquires very efficient. Microsoft Dataverse provides AI functions that can be easily used within the North52 business rules engine to automate this processing. In this article we show how the Dataverse AI Functions AIClassify, AISentiment, AISummarize and AIReply can be used within North52 decision tables. You can find out more about the Dataverse functions on the Microsoft Learn article.

Rules for Processing Emails with AI

Rule #Description
1When an email is added to the AI Processing Queue strip the HTML from the email body
2

Analyze the email using Dataverse AI Functions and Create a Case:

AIClassify: Classify into "Problem", ""Question", “Request”

AISentiment: Determine Sentiment and set Priority:

  • Postive - High priority
  • Neutral - Normal priority
  • Negative - High priority

AISummarize: Summarize the email - add to description

3Using AIReply create a draft email reply and set regarding the Case

 

North52 Decision Suite Solution

The North52 Decision Suite solution works like this:

  • A Formula is set up on the Queue Item table which:
    • Identifies an Email added to the AI Processing Queue
    • Extracts the text from the Email
    • Analyzes the content using Dataverse AI Functions and creates a Case
    • Creates a draft email reply using AIReply function

 

Set up Formula

  • Open the North52 App
  • Navigate to Business Process Activities > Formulas
  • Create a new formula, setting the following values in the Formula Guide:
    • Source Entity set to Queue Item
    • Set Formula Type to Save - Perform Action
    • Select the Decision Table editor
    • Click Create
  • Change the Name of the formula to Process Email Using AI when added to Queue
  • Expand Deployment Settings
    • Change the Pipleline Stage to Post-Operation (Asynchronous)
  • Click Save

Validation Sheet

This  decision table sheet checks to make sure the queue item is for an email and is assigned to the AI Processing queue. If the conditions match then the email body is stripped of HTML ready to send to AI for processing.

If the conditions do not match, then no further processing is done and all Decision Table logic is exited.

Analyse Email and Create Case Sheet

This  decision table sheet uses the Dataverse AI functions AIClassify, AISentiment, AISummarize to provide values for which to create a case.

The following snippets show how to use the AI functions within North52.

AIClassify

GetActionOutputParameter(
 ExecuteAction('AIClassify', '', '', SetAttributeAction('Text','String',{Get Text from Email}), SetAttributeAction('Categories','String[]','["Problem", "Question", "Request"]')),
 ‘Classification’
)

AISentiment

GetActionOutputParameter(
 ExecuteAction('AISentiment', '', '', SetAttributeAction('Text','String',{Get Text from Email})),
 ‘AnalyzedSentiment’
)

AISummarize

GetActionOutputParameter(
 ExecuteAction('AISummarize', '', '', SetAttributeAction('Text','String',{Get Text from Email})),
 ‘SummarizedText’
)

Create Draft Email Reply Sheet

This decision table sheet uses the AIReply function to generate a draft reply and create an email. A user can then review the email before sending.

AIReply

GetActionOutputParameter(
 ExecuteAction('AIReply', '', '', SetAttributeAction('Text','String',{Get Text from Email})),
 ‘PreparedResponse’
)

Testing

Negative Email

The following shows a negative email which is added to the AI Processing queue.

Email

Case Created

Reply Email Created

Positive Email

The following shows a positive email which is added to the AI Processing queue.

Email

Case Created

Reply Email Created