I have a Custom Object + Approval Process assigned to a Queue- that I would like to be assigned as a Work-Item via Omni-Channel router. I have configured the necessary configurations (I think), however, when I log in as one of my Queue members and set their Presence Status to an "Available" state, they do not receive a new "Work Item".
Maybe I'm just misunderstanding Approval Process relationships to Work Items in Omni-Channel Routing on a Queue: I assume that if an agent is a member of a Queue, and that Queue is assigned as an Approver in an Approval Process, then when a new record is assigned to that queue, the member is notified that that approval is a work item for them by Omni-Channel Router?
Here is my setup to see where I am missing something:
New Custom Object = Credit_Request__c
, with a custom field Type__c
with picklist value Wireless
and Non-Wireless
.
I have created a Queue for these Custom Objects:
I have an Approval Process
for Credit_Request__c
:
I have added a trigger to submit the record for Approval as soon as it's inserted:
trigger CreditRequestTrigger on Credit_Request__c (after insert) {
List<Approval.ProcessSubmitRequest> requestList = new List<Approval.ProcessSubmitRequest>();
List<Approval.ProcessResult> resultList = new List<Approval.ProcessResult>();
try{
for(Credit_Request__c creditRequest: Trigger.new){
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setComments('Submitting request for approval.');
req.setObjectId(creditRequest.id);
requestList.add(req);
}
resultList = Approval.process(requestList);
}catch(Exception e){
System.debug('error when submitting for approval: ' + e);
for(Approval.ProcessResult result : resultList){
if(result.getErrors().size() > 0){
// creditRequestMap.get(result.getEntityId()).addError('There was a problem submitting for approval');
}
}
}
}
Additionally, I have created a Service Channel
associated with the Custom Object:
Routing Configuration:
And Presence Status- which I have made available to the profile of my Queue Member:
And those presence statuses are associated with the appropriate channel:
I then create a record with my user (Manually inserting from Dev. Console), and I don't see any errors with the Approval Process trigger running.
However when I log in as a Queue Member and set my presence status as "Available" I do NOT see any work items?