top of page
Search

Connect Alexa with Dynamics 365 FO

  • Writer: Mariano Martinez Melo
    Mariano Martinez Melo
  • Jun 21, 2023
  • 1 min read

Alexa took control of Consejos Dynamics. This post shows how to connect from Alexa to Dynamics 365 via Power Automate. Do not miss the video!



These are the codes that you can copy and use.


AlexaSchemaRequest:

You can go to this link on jeff hollan's Github where the schema is, or copy it from this code:


{"properties":{"request":{"properties":{"inDialog":{"type":"boolean"},"intent":{"properties":{"name":{"type":"string","x-ms-summary":"Intent Name"}},"type":"object"},"locale":{"type":"string"},"requestId":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"}},"type":"object"},"session":{"properties":{"application":{"properties":{"applicationId":{"type":"string"}},"type":"object"},"attributes":{"properties":{},"type":"object"},"new":{"type":"boolean"},"sessionId":{"type":"string"},"user":{"properties":{"userId":{"type":"string"}},"type":"object"}},"type":"object"},"version":{"type":"string"}},"type":"object"}

Odata filter for entity:


The information in docs for Odata can be seen at this link.

Here is the code for the filter that I use in the entity:


UserId eq '*USER*' and Status eq Microsoft.Dynamics.DataEntities.WorkflowWorkItemStatus'Pending'

Replace *USER* with their Dynamics user.


In this case I am using an Enum to filter the data. If you want to filter by an enum (for example, a status of notifications or purchase orders...) you have to add the following text string, replacing the brackets with the necessary data:


Microsoft . Dynamics . DataEntities . [ Entity Name ] . [ Entity Field ] '[Value]'

Expression to convert the date in the Select step:


formatDateTime(if(equals(item()?['dueDateTime'],null),'2022-01-01T10:00:00Z',item()?['dueDateTime']),'MMMM/yy','es')

Reply to Alexa:


{
 "response": {
   "outputSpeech": {
     "text": "This are your tasks:@{body('Unirse')} ",
     "type": "PlainText"
    }
   },
   "version":"1.0"
 }
 
 
 

Comments


bottom of page