1

Is there a way where I can do a few actions when an Agent accepts a case via 'Omni-Channel'.

For example

  • I want to update the status of the case automatically to 'In Progress'.
  • I want to insert the date/time in a custom case field on when the case was accepted

Any thoughts? Thank you.

0

You will have to listen to the event

sforce.console.ConsoleEvent.PRESENCE.WORK_ACCEPTED

And trigger the action you want to perform. This event is fired when a user accepts a work assignment, or when a work assignment is automatically accepted.

Which tools are you using? Visualforce, external component, ...?

  • I need to use the standard Omni-Channel footer widget in the Console. How would I listen to this event you would have mentioned? – Roshan Sahatiya Jan 11 '17 at 16:04
  • You can create a new console app, for example. – Javi Jan 11 '17 at 16:10
  • Creating a new console with the standard omni widget? Where would I then write the java script to to perform the actions while listening to the event you mentioned. Am I missing something basic? – Roshan Sahatiya Jan 11 '17 at 16:16
  • Without knowing any other better approach, I would suggest to create a new console App (widget) that loads a VisualForce page. From this VF Page you can implement the listener. – Javi Jan 11 '17 at 16:22
  • Is there a way to hide the new custom widget from the users of console as this widget is just going to have the JS code for the eventlisteners.. – SFDC Learner Apr 3 '17 at 9:21
0

You can develop a trigger on "AgentWork" object and implement the logic whatever you need. For each and every case that was assigned to the service agent by Omni will create a new AgentWork record (Triigers are disabled by Salesforce on AgentWork record creation) in the back end. When the agent accepts the case in Omni Channel, the AgentWork record will be updated with status "Opened" and triggers will be fired in this scenario.

trigger AgentWorkTrigger on AgentWork (after update) {
  ......   
}

Please check the below URL on how to write a test class for this trigger. https://developer.salesforce.com/forums/?id=906F00000005KVYIA2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.