image for site

Using chat:connected Callback in Web Widget (Classic)

Learn how to use the chat:connected callback in Web Widget (Classic) for one-time commands and when to use chat:departmentStatus for repeated tasks.

Can I use the chat:connected callback for multiple commands in Web Widget (Classic)?

Thechat:connectedcallback in Web Widget (Classic) is best used for commands you only wish to execute once. This is ideal for initial setup tasks that should not be repeated every time the widget reconnects.

If you have commands that need to be executed multiple times, such as whenever a department's status changes, consider using thechat:departmentStatuscallback instead. This approach ensures that your widget's behavior is consistent and only executes commands when necessary.


More related questions

How can I modify the Web Widget (Classic) behavior using JavaScript APIs?

You can modify the Web Widget (Classic) behavior using JavaScript APIs by applying specific workflows at different times. Some workflows should be executed when a department's status changes, while others should be run when the widget first…

When should I apply widget settings in Web Widget (Classic) API workflows?

The timing of applying widget settings in Web Widget (Classic) API workflows is crucial. Some settings should be applied when a department's status changes, while others should be applied when the widget first connects or reconnects. For instance,…

How can I handle department status changes in Web Widget (Classic)?

Handling department status changes in Web Widget (Classic) can be managed using thechat:departmentStatuscallback. This allows you to apply specific settings based on the department's availability. For example, if a department named 'CRM' is…

Is it necessary to hide the Web Widget (Classic) on page load?

Hiding the Web Widget (Classic) on page load is not strictly necessary, but it can be part of your workflow if desired. The initial steps of hiding the widget and then showing it when an unread message appears can be omitted without affecting the…

Interested indeflectingover 70% of your Zendesk support tickets?

Our AI customer support agent is here to help. Trained on all your help docs, installed directly into your Zendesk account, it can be used to automate customer replies for tickets or live chat. Learn more below.
Zendesk logo

Zendesk Support Tickets

Receive new tickets by email or a support form? This integration is for you.
My AskAI integrated within Zendesk to deflect support tickets
Learn about our Zendesk ticket integration
Zendesk logo

Zendesk Messaging (live chat)

Using Zendesk's Messaging widget on your site for live chat? This integration is for you.
My AskAI integrated within Zendesk to deflect customer support live chat conversations
Learn about our Zendesk Messaging integration

Join1,000+ companies reducing their support costs and freeing up support agents for more important work

Vestd company logo — Customer of My AskAI's AI customer support agents
Genesis company logo — Customer of My AskAI's AI customer support agents
Zinc company logo — Customer of My AskAI's AI customer support agents
Customer.io company logo — Customer of My AskAI's AI customer support agents
Zeffy company logo — Customer of My AskAI's AI customer support agents
NHS company logo — Customer of My AskAI's AI customer support agents
Kontakt.io company logo — Customer of My AskAI's AI customer support agents

Reduce support costs.Spend more time on customer success.

Our AI customer support agents are already used by 👇
Companies using AI assistants on their websites