• Sarel ROETS
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi all,

I'm working with the Lighting API for Omni-Channel specified here: https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_omnichannel_methods.htm

Basically I'm building a custom app (not sure if the correct terminology here is "custom app") that should be accessible in the bottom bar of a console app in Lighting adding it as a "Utility Item" in the wizard when creating the console app.

I'm trying to change the service presence status for an agent using the API above from this "custom app" code when certain external events happen.

What I did so far and couldn't make it work was creating this "custom app" as a Visual Force page using a Lightning component as explained in here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm

With only one button that calls the logout functionality explained here: https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_logout.htm

This should basically change the present status of the agent from Available to Offline. But every time I'm clicking the button nothing happens and I get  the following error in the Chrome console:

Error: Omni-Channel is not available.

Then I tested the exactly the same Lightning component wihtout any changes but this time loaded as a custom tab inside the console app, and this time the button worked, the presence status changed to Offline and in the Chrome console I can see the message "Logout successful".

The problem here is that the client requires this "custom app" to be embedded as a utility item in the bottom bar as explained first.

My question is, first if it's possible to make the Omni-Channel API work inside a utility item in a console app.

And if it is, I would like to know what I'm doing wrong and what should I do to fix it. Hope my explanation is clear.

Thanks!