Uredi

Consume business events from Activator

This article describes how to set alerts on business events in Real-Time hub.

  1. Sign in to Microsoft Fabric.

  2. If you see Power BI at the bottom-left of the page, switch to the Fabric workload by selecting Power BI and then selecting Fabric.

    Screenshot that shows how to switch to the Fabric workload.

  3. Select Real-Time on the left navigation bar.

    Screenshot that shows the Real-Time option on the left navigation bar in Microsoft Fabric.

Launch the Set alert page

Follow the steps in one of the following sections. Each section opens a side panel where you can configure the following options:

  • Events you want to monitor.
  • Conditions you want to look for in the events.
  • Action you want Activator to take.

Using the events list

  1. In Real-Time hub, select Business events.

  2. If you don't have any business events, see the Create event schema sets article to create event schema sets first. After you have event schema sets, you can select business events under the event schema sets to set alerts on.

  3. Move the mouse over your target Business events, and do one of the following steps:

    • Select the Set alert button.
    • Select ellipsis (...), and select Set alert.

    Screenshot of the set alert options for the business event.

Using the event detail page

  1. Select the target business event from the list.

  2. On the detail page, select Set alert button in the upper toolbar.

Screenshot of the Set alert button in the upper toolbar.

Details section

On the Add rule page, in the Details section, enter a name for the rule in the Rule name field.

Screenshot of the set alert Name field.

Monitor section

On the Set alert page, follow these steps:

  1. In the Monitor section, add business events to your rule or configure filters. To do this, select Business events in the Source field.

  2. In the Connect data source wizard, complete these steps:

    1. For Business events, select the business events to change the selected business event types that you want to monitor. You can select up to 25 business events under the same event schema set.

    2. This step is optional. To see the schemas for event types, select View schemas. If you select it, browse through schemas for the events, and then navigate back to previous page by selecting the backward arrow button at the top.

    3. Add filters to set the filter conditions by selecting fields to watch and the alert value. To add a filter:

      1. Select + Filter.
      2. Select a field.
      3. Select an operator.
      4. Select one or more values to match.
      5. Select Next at the bottom of the page.
      6. On the Review + connect page, review the settings, and select Save.

Screenshot of the set alert Monitor section.

Condition section

In the Condition section, select On each event for the Check option.

Screenshot of the set alert Condition section.

Action section

In the Action section, select one of the following actions:

Email

To configure the alert to send an email when the condition is met, follow these steps:

  1. For Select action, select Send email.

  2. For To, enter the email address of the receiver or use the drop-down list to select a property whose value is an email address.

  3. For Subject, enter a subject for the email.

  4. For Headline, enter a headline for the email.

  5. For Notes, enter notes for the emails.

    Note

    When entering subject, headline, or notes, you can refer to properties in the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

  6. For Context, select values from the drop-down list that you want to include in the context.

Screenshot of the set Action with the email option selected.

Teams message

To configure the alert to send a Teams message to an individual or a group chat or a channel when the condition is met, follow these steps:

  1. For Select action, select Teams -> Message to individuals or Group chat message, or Channel post.

  2. Follow one of these steps depending on the option you selected in the previous step:

    • If you selected the Message to individuals option, enter email addresses of receivers or use the drop-down list to select a property whose value is an email address. When the condition is met, a Teams message is sent to specified individuals.

    • If you selected the Group chat message option, select a group chat from the drop-down list. When the condition is met, a message is posted to the group chat.

    • If you selected the Channel post option, select a team and a channel. When the condition is met, a message is posted in the channel.

  3. For Headline, enter a headline for the Teams message.

  4. For Notes, enter notes for the Teams message.

    Note

    When entering headline or notes, you can refer to properties in the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

    When entering headline or notes, you can refer to properties in the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

  5. For Context, select values from the drop-down list that you want to include in the context.

Screenshot of the set Action with the Teams option selected.

Run Fabric activities

To configure the alert to launch a Fabric pipeline, dataflow (preview), notebook, or Spark job when the condition is met, follow these steps:

Screenshot of the Fabric activities in the Actions dropdown menu.

  1. For Select action, select the appropriate Fabric item type within the "Run Fabric Activities" section.

  2. On Select Fabric item to run, select the Fabric item from the list.

  3. For the Pipeline, Dataflow, Notebook, and Spark job types, select Add parameter and specify the name of the parameter for the Fabric item and a value for it. You can add more than one parameter.

If you selected Run function option, follow these steps:

  1. For Function, select a function from the list.

  2. For parameters to the function, specify values for each of the parameters defined for the function as shown in the following example:

You can use properties from the data by typing @ or by selecting the button next to the text boxes. For example, @BikepointID.

Custom action

To configure the alert to call a custom action when the condition is met, follow these steps:

Screenshot of the custom action setup in the Actions dropdown menu.

  1. For Select action, select Create custom action.

  2. As mentioned in the Action section, create the rule first, and then complete the custom action setup by following steps from Trigger custom actions (Power Automate flows).

  3. After you create the custom action, in the Definition pane of the rule, select the custom action from the Action drop-down list.

Save location section

In the Save location section, for Workspace, select the workspace where you want to create the Fabric activator item or select an existing workspace. If you're creating a new activator item, enter a name for the activator item.

Screenshot of the save location section.

Create a rule

  1. Select Create at the bottom of the page to create the rule.

  2. You see the Alert created page with a link to open the rule in the Activator user interface in a separate tab. Select Done to close the Alert created page.

  3. You see a page with the activator item created by the Add rule wizard. If you are on the Business events page, select your business event to see this page.

  4. Move the mouse over the Activator item, and select Open.

  5. You see the Activator item in the Fabric Activator editor user interface. Select the rule if it's not already selected. You can update the rule in this user interface. For example, update the subject, headline, or change the action from email to Teams message.