APIs & Integrations

Mark1
Mitwirkender/Mitwirkende

Chat Javascript API - How to tell if agent online?

lösung

Hi,

 

I want to show certain content based on the availaibility of the Chat Agent i.e. if online show content A if offline show content B.

 

I can't see anything in the API so just seeing if anyone has any suggesions?

 

Cheers,

Mark

0 Upvotes
1 Akzeptierte Lösung
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

Chat Javascript API - How to tell if agent online?

lösung

That makes sense, Mark.

 

Unfortunately, I can't think of any workarounds for that use case with the available methods.

The product team certainly wants to make the Conversations JavaScript API more robust and useful, though, so I recommend upvoting and commenting on this feature request. I just threw an upvote on there myself.

Isaac Takushi

Associate Certification Manager

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
3 Antworten
IsaacTakushi
HubSpot Employee
HubSpot Employee

Chat Javascript API - How to tell if agent online?

lösung

Hi, @Mark1.

 

As you noted, the Conversations JavaScript API currently doesn't contain methods relating to agent status or activity. We'll have to think creatively.

 

If you set the chat launcher to hide when all agents are away (see screenshot below) then the widget.status will be false and you can use JavaScript to hide or reveal different content. Would something like that work?

 

Hide chat launcher.jpg

Isaac Takushi

Associate Certification Manager
0 Upvotes
Mark1
Mitwirkender/Mitwirkende

Chat Javascript API - How to tell if agent online?

lösung

Thanks for you response. It would technically work however we still want Chat to be available to visitors even if all Agents are offline (so we can capture offline messages for follow up later). Any other Ideas?

0 Upvotes
IsaacTakushi
Lösung
HubSpot Employee
HubSpot Employee

Chat Javascript API - How to tell if agent online?

lösung

That makes sense, Mark.

 

Unfortunately, I can't think of any workarounds for that use case with the available methods.

The product team certainly wants to make the Conversations JavaScript API more robust and useful, though, so I recommend upvoting and commenting on this feature request. I just threw an upvote on there myself.

Isaac Takushi

Associate Certification Manager
0 Upvotes