Scenario 5: Business Automation Loop
Publisher: Activator | Consumer: Activator
Business context
A retail company tracks customer spending across all stores. When a customer crosses a loyalty milestone (say, $5,000 in cumulative spend), three things need to happen: marketing sends a personalized reward, the analytics team logs the milestone in Eventhouse, and the CRM is updated with the customer's new loyalty tier.
The challenge is that each team owns a different system and works on a different schedule. If all three are wired into the same Activator rule, any change by one team risks breaking the others. The teams end up coordinating every update instead of working independently.
The problem without Business Events: The only option is a single Activator rule that calls the Power Automate reward flow, writes to Eventhouse, and updates the CRM, all from the same place. When marketing wants to change the reward template, someone has to open the rule. When analytics wants to add a field to the Eventhouse table, someone has to open the rule. One misconfiguration and the milestone goes undetected for every team at once.
The solution with Business Events:
Activator detects the milestone and publishes a single Retail.Customer.MilestoneReached event. Each team sets up their own subscription. Marketing, analytics, and CRM each receive the same event and act on it independently. The detection logic stays untouched no matter how many teams subscribe or what they do with the event.
Architecture
flowchart LR
subgraph Eventhouse
KQL[KQL Query\nCumulative spend\nper customer]
end
subgraph Activator Publisher
RULE1{Condition:\ntotal_spend > threshold}
end
subgraph Real-Time Hub
BE([Retail.Customer.MilestoneReached\nBusiness Event])
end
subgraph Consumers
PA[Activator → Power Automate\nReward notification]
EH[(Eventhouse\nMilestone history)]
CRM[Activator → Power Automate\nCRM tier update]
end
KQL -->|Monitor| RULE1
RULE1 -->|Publish event| BE
BE --> PA
BE --> EH
BE --> CRM
Step 1: Create the Business Event
Before configuring Activator, define the Business Event in Real-Time Hub.
- Go to Real-Time Hub → Business Events → Create.
- Create or select an Event Schema Set. Use
RetailCustomersas the schema set name. - Name the event
Retail.Customer.MilestoneReached. -
In the schema editor, paste the following JSON:
{ "type": "record", "name": "Retail.Customer.MilestoneReached", "fields": [ { "name": "customer_id", "type": "string", "doc": "Unique identifier of the customer" }, { "name": "customer_name", "type": "string", "doc": "Full name of the customer" }, { "name": "milestone_tier", "type": "string", "doc": "Loyalty tier reached: silver, gold, or platinum" }, { "name": "total_spend", "type": "float", "doc": "Cumulative spend amount that triggered this milestone" }, { "name": "store_id", "type": "string", "doc": "Identifier of the store where the milestone was reached" }, { "name": "detected_at", "type": "string", "doc": "Timestamp when the milestone was detected, ISO 8601 format" } ] } -
Select Create.
Step 2: Publisher - Activator
Activator monitors a KQL query that computes cumulative customer spend. When the condition is met, it publishes the Business Event. There is no code to write.
Create the Activator rule
- In your Fabric workspace, open your KQL Queryset that queries the customer transaction table in your Eventhouse.
-
Write or select a query that returns cumulative spend per customer, for example:
-
Select Set alert from the KQL Queryset toolbar.
- In the Activator rule pane, configure the condition:
- Monitor: select the query result field
total_spend - Condition:
Becomes greater than - Value:
5000
- Monitor: select the query result field
Configure the publish action
- In the Action section, select Publish a business event.
- For Business event, select
Retail.Customer.MilestoneReached. -
Map each schema field to the corresponding query result column or a static value:
Schema field Source customer_idcustomer_idcolumncustomer_namecustomer_namecolumnmilestone_tierStatic value: goldtotal_spendtotal_spendcolumnstore_idstore_idcolumndetected_atDynamic: current timestamp -
Select Save to activate the rule.
For full details on using Activator as a Business Events publisher, see the Activator publisher documentation.
Step 3: Consumer 1 - Marketing reward (Activator → Power Automate)
- In Real-Time Hub, locate
Retail.Customer.MilestoneReachedunder your schema set. - Select Set alert.
- Name the rule
Loyalty Milestone - Reward. - In the Monitor section, set Source to Business events and connect to
Retail.Customer.MilestoneReached. - Set Condition to
On each event. - In the Action section, select Power Automate and connect the flow that sends the reward notification.
- Add
customer_id,customer_name, andmilestone_tieras context fields. - Select Save.
Step 4: Consumer 2 - Analytics (Eventhouse)
The Eventhouse consumer is enabled at Business Event creation time.
- In Real-Time Hub, open
Retail.Customer.MilestoneReached. - Select Analyze in Eventhouse.
- Choose a destination KQL database and table name, for example
loyalty_milestones. - Select Save.
All published events will be written to this table automatically.
Step 5: Consumer 3 - CRM tier update (Activator → Power Automate)
Repeat the same steps as Consumer 1 with a different Power Automate flow:
- In Real-Time Hub, locate
Retail.Customer.MilestoneReached. - Select Set alert.
- Name the rule
Loyalty Milestone - CRM Update. - Set Condition to
On each event. - Connect the Power Automate flow that updates the customer's loyalty tier in the CRM.
- Add
customer_idandmilestone_tieras context fields. - Select Save.
Step 6: End-to-end test
Trigger the flow manually by running the KQL query with a customer that meets the threshold. Then:
- In Real-Time Hub, select
Retail.Customer.MilestoneReached. - Go to the Publisher tab and confirm that your Activator rule is listed as an active publisher.
- Go to the Data preview tab and verify that a matching event record appears.
- Confirm that the marketing Power Automate flow fires and the reward notification is sent.
- Confirm that the
loyalty_milestonestable in Eventhouse has a new row. - Confirm that the CRM Power Automate flow fires and the tier is updated.
Why this matters
Each team controls their own subscription. Marketing can update the reward flow without involving analytics or CRM. Analytics can change the destination table without touching the detection rule. Adding a new team — a customer success manager who wants a Teams notification, for example — means creating one new subscription, nothing else.