Smart Email intake.
Step 5 - Extend Automatically create Case flow with AI Builder models

Smart Email intake.
Step 5 - Extend Automatically create Case flow with AI Builder models

Now we can extend the standard out-of-the-box flow to analyze the content. We need to detect the Language of the Email content.

  1. Open Customer Service Hub app and select Service Management.
  2. Select Automatic record creation and update rules in Case Settings. The Record Creation and Update Rules page is displayed.
  3. Select “Support Email to Case” and open it.
  4. On the Basic tab, in Step two select “In Configure in Power Automate”, select open in Power Automate.
  5. Add the following additional variables steps
  6. Step Initialize variable AI Builder Language Initialize variable AI Builder Language Confidence Score Initialize variable AI Builder Category Tag
    Name ai_builder _language ai_builder _language _confidence_score ai_builder _language _category_tag
    Type String String String
    Value en 0 none

    See results

  7. Add a Flow Scope step and name it “Analyze Email using AI Builder models”
  8. Add a “Html to text” to convert the Email HTML content to plain text and name it “Convert email to plain text by inputting 'Description' dynamic content”
  9. Add “Description” column to the content field
  10. Add a Flow Scope step and name it “AI Builder Language Detection”
  11. Add a AI Builder Step “Detect the language being used in text” and name it “Detect the language being used in text”
  12. Add the result of the Html to text conversion to the Text of the AI Builder step
  13. Add a Flow Step “Set variable” and name it “Set variable AI Builder Language”. Choose the “ai_builder_language” variable for Name and for Value “Language” result from the AI Builder.
  14. Add a Condition step to evaluate the detected language confidence score is a valid result between 0 and 1.
  15. Add in “If yes” a new Flow step Set variable and name it “Set variable AI Builder Language Confidence Score”
  16. For Name choose the variable “ai_builder_language_confidence_score” and for Value add the AI Builder Confidence Score result. See result
  17. Add a Flow Scope step and name it “AI Builder Case Category Classification Detection”. Leave it empty as a placeholder. We will come back to extend this part after we’ve created and trained the AI Builder category classification models.
  18. Select the Dataverse Step “Create a record (don't rename this step)” and update the Description equal to result of the Html to text conversion, Language equal to ai_builder_language variable and Language Score equal to ai_builder_language_confidence_score. See result
  19. Select “Save” to update the flow with all your changes.
  20. Go back to the “Record Creation and Update Rule Item”
  21. Select Save & Close. The condition builder is closed.
  22. In Step three: additional actions to take after matching with a condition, select an option based on your requirement for Automatically reply to email.
  23. If you select Yes, select an email template in the Select email template list box.

Now we’ve created the rule set and are ready to test it. Send some example mail to the Email address and analyze the result in “Customer Service Hub” – “Cases” – “Active Case Analytics”.

Steps by step guide
  1. Create a solution “Case Management”
  2. Create a Automatically create Case records from Email ruleset
  3. Create instant flow “TranslateCasesToTargetLanguage”
  4. AI Builder category classification custom model
  5. Extend Automatically create Case flow with AI Builder models
  6. Configure Unified Routing based on Category Tags to Agents

7. Jan 2023

References

  • Language detection prebuilt AI model - AI Builder | Microsoft Learn