Use Case - Collecting Data from Customers in an Automated IVR without Agents

Setup an automated IVR for collecting and validating customer data without requiring interaction with an agent.

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

 

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

  1. Log into your Azure Storage Account
  2. Create a table with PartitionKey byCustromerId and Meterdata column. 

Configuration in Nimbus

  1. Create 3 new Parameters which will be used in the workflow. 
  2. MeterReading = (default 0)
  3. MeterReadingCustomerId = Default Blank
  4. 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:

  • Prompt Text = Welcome to the meter data collection service.

 

Add a "Collect Information" activity to the workflow.

Collect Information:

  • Prompt text = Please enter your 5-digit CustomerId
  • Parameter To Save = MeterReadingCustomerId
  • Max DTMF digits = 5

 

Add another " Collect Information" activity to the workflow.

Connect the "Input Received" output from the previous activity to it.

Collect Information:

  • Prompt = Please enter the value of your energy counter
  • Parameter to Save = MeterReading
  • Max DTMF digits = 6

 

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:

  • Prompt Text = Please hold the line while the system verifies the meter data...

 

Add a "Check Parameter" activity

Connect the previous "Announcement" to it.

Check parameter:

  • Parameter Type = Custom
  • Custom Type = Custom Context Parameter Predefined
  • Parameter Name = MeterreadingsValidity

Connect the isValid output to an Announcement activity and finish it.

Announcement:

  • Prompt Text = Meter data has successfully been registered. Thank you.

Create the Power Automate Flow

Overview

 
 
Description
Settings
Element
To trigger the flow begin with "GetOnUpdatedTasks" from the Nimbus Connector

GetOnUpdatedTasks:

  • Service Item = Your service
  • SesseionEvent Item = Parameter Updated

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":

  • Name = UpdatedParameterName
  • Type = String
  • Value = triggerOutputs()?['body/UpdatedParameterName']

Second "Initialize Variable":

  • Name = UpdatedParameterValue
  • Type = String
  • Value = triggerOutputs()?['body/UpdatedParameter Value ']

Third "Initialize Variable":

  • Name = CustomerId
  • Type = String
  • Value = int(triggerOutputs()?['body/customContextParameters/MeterReadingCustomerId'])

Fourth "Initialize Variable":

  • Name = MeterReadingsValidity
  • Type = String
  • Value = isNotValid

 

Add a "Condition" element to the flow. We only want to go further in the flow if MeterReading was updated.

Condition:

  • variables('UpdatedParameterName') is equal to MeterReading

 

 

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 = 

CODE
{"PartitionKey": "byCustomerId",
                                                                "RowKey": "@{variables('CustomerId')}",
                                                                "MeterData": "@{variables('UpdatedParameterValue')}"
                                                                }

... and set the variable to isValid

SetVariable:

  • Name = MeterReadingsValidity
  • Value = isValid

 

 

 

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')

Table of Contents