1

We have a custom button that uses the console integration toolkit's sforce.console.chat.getDetailsByPrimaryTabId method to determine if the button is being clicked in the context of a chat, or not.

    chat.getDetailsByPrimaryTabId(response.id, function(chatSummary) {
      console.log('Got a Response!')
      if (!chatSummary.success)
        sforce.console.openSubtab(...) // Go Here
      else
        sforce.console.openSubtab(...) // Go There
     })

For profiles associated with Live Agent (or technically Omni-Channel), it works great and the callback does one thing when the current primary tab is a chat, and something else when it isn't.

But for profiles not associated with presence statuses or service channels, routing configurations, etc (e.g. System Admin), the getDetailsByPrimaryTabId never executes the callback. In fact this seems to be true of every other method in sforce.console.chat object. None of them actually seem to finish executing.

The object itself, sforce.console.chat, is defined.

Is there any way of determining if the current user is capable of chat while avoiding the use of sforce.console.chat callbacks? Then I can modify the above code to avoid the callback request altogether and just "Go There" immediately.

Thanks,

  • hi Mike, I am trying to use the same method when the chat is accepted I am trying to fetch the value sent by addcustomdtail from the primary tab, Can you help me as in how can I use sforce.console.chat.getDetailsByPrimaryTabId? thank you I really appreciate your help – apple123 Mar 2 '17 at 15:02

Your Answer

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

Browse other questions tagged or ask your own question.