Tutorial 1 Hello World - Building custom insights for Dynamics 365 Sales
You'll need either a trial environment or a sandbox environment with Sales Insights to complete these tutorials.
Objective
To create a "hello world" insight that displays every morning on your dashboard.
Step 1: Create a trigger to start the flow
Set a trigger that runs every morning at 8 am.
In the search, enter Recurrence. From the search results, under the Triggers option, select Recurrence.
You'll see the below trigger. Enter Interval as 1 and select Frequency as Day. Setting interval and frequency values ensures that the trigger will run once in day.
The other columns can be set according to your requirement. In this example, we're setting At these hours as 8, as we want the trigger to run every morning at 8 AM.
Step 2: Add an action to the flow
In the box that says Search connectors and actions, type "Sales insights" or "Assistant" and select the Dynamics 365 Sales Insights connector. Under actions, choose Create card for assistant.
If you have not made a connection with the Dynamics 365 Sales Insights connector, use your Dynamics 365 account to Sign in.
Once you sign in, the below screen is displayed, where you define the columns required to create a card.
Parameter | Description |
---|---|
Environment | The Dynamics 365 org in which we want to create the card. We can choose your org from the drop-down provided. |
Card name | The name of that card that will be shown on the top of the card. It should be a string with no special characters/dynamic content. |
Card header | The title of the card that appears in the card header just below the card name. |
Card text | The description to be shown in the body of the card. |
Button type | The type of action performed when the button on the card is clicked. It can be either Open URL or Open table. (default is Open URL) |
Button URL/record ID | If the button type selected above is Open URL, then enter the URL to be opened. If the button type is Open table, then enter the record ID of the table to be opened. In this case, it's Open URL, so we have entered a URL in this column. |
Step 3: Enter the information for the insight
The other columns are optional and left blank for this flow.
In the above image, Card text has been populated with some text and an expression. The expression is formatDateTime(utcNow(), 'D') which gets the current date in the format: Thursday, October 17, 2019.
Step 4: Save the flow
Select Save on the Create card for assistant screen.
Step 5: Test the flow
Testing ensures that the insight is configured properly. To test, select Test on the top-right corner and follow the instructions.
Now, you can see a card on your Dynamics 365 dashboard every morning at 8 am. The following image is an example of how the insight will display.
You'll also see the card type in the Studio configuration:
Need help? Reach out to us via our community forums.