If you wish to update the case owner to reflect the user who answered the call within the call queue, it is necessary to utilize the Data Analytics policy. This policy facilitates the updating of records associated with calls once the call has concluded. This step is essential, as the identity of the user who answers the call becomes known only after the call has taken place. This process can be applied to new cases created within the routing policy or to existing cases identified by the routing policy.
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!