Consider, we are a property management company. We have the following use cases:
When a NEW customer calls,
- ... the new contact needs to be created in Hubspot
- ... any agent can respond to the call
- ... the agent needs to complete the contact form of the customer
When a KNOWN customer calls,
- ... and the customer has a property viewing booked, they wants to speak to the person they will meet at the property.
- ... and the customer has no active tasks in the CRM, any agency agent can respond.
- ... the CRM contact page of the customer needs to pop-up when the call gets distributed to the agent.
PRECONDITIONS
- You require service owner rights to create the flow.
- Ensure to set-up the following caller identification power automate flow: Use Case - Looking up caller information in HubSpot. This flow can run in parallel and ensures that your caller information is readily at hand.
- Note: You can create a developer instance for HubSpot on HubSpot Developer Site.
💡 For visualization we use Hubspot as example CRM. You can of course substitute this lookup with any other CRM of your own preference.
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. |
Build the caller identification power automate flow
Build the flow as described in Use Case - Looking up caller information in HubSpot
Extend the Nimbus configuration
First, we need to create two new Parameters in Nimbus:
- Parameter 1: Name= PreferredAgent; Value=Empty
- Parameter 2: Name= hasbookings; Value=false
Then we change the existing workflow to the following:
Workflow Overview
Description |
Screenshot |
---|---|
The "Check Parameter" activity verifies if the customer has an active property viewing booked in the CRM using the hasBookings parameter that will be set by the power Automate flow.
|
|
The "Transfer" activity will transfer to the preferred agent if the customer has an active property viewing booked in the CRM:
|
Prepare the adaptive cards
The following table summarizes the scenarios and the different Adaptive Cards to send.
Call | Scenario | Workflow action | Adaptive Card |
---|---|---|---|
Incoming call
new customer |
A new customer calls.
|
Enqueue call
|
We want the contact to be created automatically and send an adaptive card to the teams channel of the service with the following content:
|
Show Json of this Card
| |||
Incoming call
known customer |
A known customer calls
|
Transfer to the agent from the booking in Hubspot.
|
We want to inform the team and send an adaptive card to the teams channel of the service with the following content:
|
Show Json of this Card
| |||
Incoming call
known customer |
The customer has no active tasks in the CRM, any agency agent can respond
|
Enqueue call
|
|
Show Json of this Card
|
Extend the Power Automate flow
Now it's time to
Here is an overviw of the whole flow
Description |
Settings |
Element |
---|---|---|
Add two additional "Initialize Variable" element to the flow for the booking parameter and the adaptive card content.
|
|
|
Instead of the UpdateTask add a "Condition" to the flow to check if the Contact Search returned a value.
|
|
|
At the end of the flow, add a "Post adaptive card in a chat or channel" element to the flow.
|
|
|
IF NO branch - Check if Contact is known in Hupspot
Overview of the branch
Add a "HTTPElement" to the flow and rename it to "Create Contact". Fill out the item as shown below. The body part consists of
Parameters:
Body:
|
|
Add a "set variable" element to the flow and add the content and set the adaptive card content to the values from step 3. |
IF YES branch - Check if Contact is known in Hubspot
Overview of the branch
Add a "HTTPElement" to the flow and rename it to "Task Search". Fill out the item as shown below. The body part consists of
Parameters:
Body:
|
|
Store the results of the task sewarch in a "Compose" element |
|
Add a "Condition" to the flow to check if the Task Search returned a value. |
|
Move the existing "UpdateTask" Nimbus element to branch and update the items with the result from the Compose object accordingly. Parameters
|
IF NO branch - Check if Customer has booking
Add a "set variable" element to the flow and add the content and set the adaptive card content to the values from step 3.
Click here to expand...
IF YES branch - Check if Customer has booking
Click here to expand…
Set the variable hasBookings to true
|
|
Add a "HTTPElement" to the flow and rename it to "Search Agent of the booking". Fill out the item as shown below. Parameters:
|
|
Add a "set variable" element to the flow and add the content and set the adaptive card content to the values from step 3.
|