In this Use Case, Clients want to report their energy usage to their energy provider. They want to call an IVR and send the meter data directly through the call to the linked system. No interaction with an Agent is necessary to do so.
- Customers calling the "Meter readings IVR" need to enter their customer ID and the value of the meter counter. The data gets validated against a database. The customer ID must be an existing entry and the meter data for that customer needs to be greater than last time.
- If the data is valid, the meter reading gets inserted to an Azure Table Storage with the new timestamp.
- If the data is not valid, nothing gets updated in the DB and the IVR asks again for input.
💡 The validation takes place within the Power Automate flow. A parameter "MeterReadingValidity" will be updated accordingly and indicates if either the data has successfully been updated or not. We check on that flag within the callflow logic and reroute either back to the input or to the termination announcement.
PRECONDITIONS
- You require service owner rights to to create the service workflow and the power automate flow.
- A storage account in Azure has been created. 🔍 See https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal
- A Nimbus service is set up and ready to receive calls.
Show Icon Legend
💡 = A hint to signal learnings, improvements or useful information in context. | 🔍 = Info points out essential notes or related page in context. |
☝ = Notifies you about fallacies and tricky parts that help avoid problems. | 🤔 = Asks and answers common questions and troubleshooting points. |
❌ = Warns you of actions with irreversible / data-destructive consequence. | ✅ = Intructs you to perform a certain (prerequired) action to complete a related step. |
Create the Azure Table storage
- Log into your Azure Storage Account
- Create a table with PartitionKey = byCustromerId and Meterdata column.
Configuration in Nimbus
- Create 3 new Parameters which will be used in the workflow.
- MeterReading = (default 0)
- MeterReadingCustomerId = Default Blank
- MeterReadingValidity = Check flag for valid customer MeterReading entry.
Create the workflow
Overview
We describe only the positiv path:
Description |
Settings |
Activity |
---|---|---|
Start the workflow with an "Announcement" |
Announcement:
|
|
Add a "Collect Information" activity to the workflow. |
Collect Information:
|
|
Add another " Collect Information" activity to the workflow. Connect the "Input Received" output from the previous activity to it. |
Collect Information:
|
|
Add an "Announcement" activity Connect the "Input Received" output from the previous activity to it. 💡 This announcement gives your flow the necessary time to check back with a response. |
Announcement:
|
|
Add a "Check Parameter" activity Connect the previous "Announcement" to it. |
Check parameter:
|
|
Connect the isValid output to an Announcement activity and finish it. |
Announcement:
|
Create the Power Automate Flow
Overview
Description |
Settings |
Element |
---|---|---|
To trigger the flow begin with "GetOnUpdatedTasks" from the Nimbus Connector |
GetOnUpdatedTasks:
|
|
Add 4 "Initialize Variable" elements to the flow. We need to check on the UpdatedParameterName to make sure that we trigger the flow at the right moment. |
First "Initialize Variable":
Second "Initialize Variable":
Third "Initialize Variable":
Fourth "Initialize Variable":
|
|
Add a "Condition" element to the flow. We only want to go further in the flow if MeterReading was updated. |
Condition:
|
|
In the YES branch, Add a "Get Entity" element to the flow. Select your azure table instance and filter by customer ID. |
Get Entity: PartitionKey = byCustomerId RowKey = variables('CustomerId') |
|
Add a "Condition" element to the flow. We only want to go further in the flow if Get entity returned an entry for the given CustomerId. The entry shows at least 0. |
Condition: int(outputs( 'Get_entity' )?[ 'body/MeterData' ]) is greater than or equal 0 |
|
Now we need to validate the new meter data against the existing entry. In the YES branch, Add a "Condition" element to the flow. |
Condition: int(outputs( 'Get_entity' )?[ 'body/MeterData' ]) is less than or equal int(variables( 'UpdatedParameterValue' ))
|
|
In the YES branch, Delete the old entry first... |
Delete Entity: PartitionKey = byCustomerId RowKey = variables('CustomerId') |
|
... then insert the new "entity" values ... |
Insert Entity: entity =
|
|
... and set the variable to isValid |
SetVariable:
|
|
At the end of the flow, update the Nimbus task in any (either) case result. |
UpdateTask: RequestId = triggerOutputs()?['body/requestId'] CustomContextParameters: Name = MeterReadingsValidity Value = variables('MeterReadingsValidity') |