Tutorial 2 - Sample insight for each user in the org

Completed

You need either a trial environment or a sandbox environment with Sales Insights to complete these tutorials.

Objective

To create a "hello world" insight that shows up each morning on the dashboard for all users in your organization.

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.

Recurrence search results showing Recurrence Schedule on the Triggers tab.

You see the below trigger. Enter Interval as 1 and select Frequency as Day, to ensure 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.

Recurrence settings with Interval set to 1 and Frequency set to Day. Preview runs at 8:00 every day.

Step 2: Get all users in the organization

Add an action to the flow to get the list of users from the Dynamics 365 organization.

Search and select Microsoft Dataverse connector. Under Actions, choose List records.

Search results for Dataverse show Create a new record, Get record, Update a record, List records, and Delete a record.

The below screen is where you can enter the required information for retrieving the users from your organization.

List records dialog with the Environment set to assistantstudio and the Table Name set to Users.

  • Environment: Select your organization from the drop-down.

  • Table Name: Select Users from the table drop-down.

Step 3: Create the insights card

Now, add the same action from "Tutorial 1: Hello World", but this time with some additional columns.

Create card for assistant with all required columns filled and advanced options showing.

  • Button table: If the Button type is selected as Open table, then choose the table type from the drop-down.

  • Display table: Choose the table type from the drop-down that uses the table's form for the card display.

  • Display record ID: The record ID of the table corresponding to the table type selected in the Display table column.

  • Show for: The record ID/userId of the user who should see this card on their Dynamics 365 dashboard.

  • Show from: The start time from when the card should be displayed (default is immediately after the creation).

  • Show until: The expiry time of the card after it has been displayed (default is 24 hours after the creation).

To display this card for all the users, we populate the Show for column.

Select the Show for column and a dialog pops up. Select an output of a previous action. In this case, the List records action of Common Data Service connector.

Show for column selected and Dynamic content dialog showing list records.

From the dynamic content search box, search and select User (Unique identifier for the user): Once that is done, it creates an Apply to each statement that means that for each of the users returned from the List records, a card is created:

Apply to each dialog containing the Create card for assistant.

Step 4: Click save and test

Now, all users will now see this card on their dashboard.

Need help? Reach out to us via our community forums.