- 16 Oct 2024
- 1 Minute to read
- Print
- DarkLight
How to Update Case Owner with the User that Answers the Call
- Updated on 16 Oct 2024
- 1 Minute to read
- Print
- DarkLight
If you want to update the case owner to be the user that answered the call (in the call queue), you will need to use the Data Analytics policy. This policy is able to update records related to calls once the call has finished. This is necessary because the user who answers the call is only known, after the call has taken place.
Creating the new Data Analytics Policy:
Navigate to the Routing Policy tab
Create a new policy
Select Type = Data Analytics, give your policy a name and then click ‘Done’.
Now click ‘Save’ in the top right of the screen.
From the ‘From Policy’ container, click and drag the red dot to add a new action container
Add a ‘Query Object’ app:
Name this item: Query Connected User
Result Set: QueryConnectedUser
Trigger When: uncheck ‘Records found’, check ‘Records not found’ and ‘Error returned’
Record Type: Natterbox User
Filter Results:
Note: this is where, after the call, we find the user who answered the call.Field= Email Address
Operator: ‘=’
Value = $(ConnectedEmailAddress)
Note: you can add this from the macro icon (phone with arrow), it refers to the email address of the user who answered the call
Return fields: Salesforce User
Now, add a new ‘Update a Record’ app into the same action container (below the ‘Query Object’ app)
Name this item: Update Case Owner
Result Set: UpdateCase
Trigger When: leave as ‘Record updated’ checked
Record Type: Case
Record ID: $(SForce_CreateCase.Id)
Note: this is the macro for the case you created or queried. In this example I have created a case and used the Result Set: CreateCase)Set Fields Values:
Field: Owner Id
Value: $(SForce_QueryConnectedUser.nbavs__User__c)
Note: this is the macro set above in the ‘Query Object’ app (Result Set: QueryConnectedUser).
Save!
Amending your existing Call Policy:
Navigate to your call policy (where the inbound number > call queue journey is)
Between the case being queried or created and the call queue, break the connector (double click the grey line).
Add in a new container and choose ‘To Policy’.
Select the ‘Data Analytics’ app
Name this item: Update Case Owner (we recommend this being the same name as the data analytics policy)
Select Policy to run when this call completes: Update Case Owner (name of policy)
Connect the new container to the previous connector it was connected to.
Save!