Methods for Chat Visitors

There are a few methods available that you can use to customize the visitor experience for Chat in a custom Visualforce chat window. These methods apply to Salesforce Classic only.

The legacy chat product is in maintenance-only mode, and we won’t continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with Messaging for In-App and Web. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time.

Important

  • chasitor.addCustomEventListener()

    Registers a function to call when a custom event is received in the chat window. Available in API version 29.0 or later.

  • chasitor.getCustomEvents()

    Retrieves a list of custom events that have been received in this chat window during this chat session. Available in API version 29.0 or later.

  • chasitor.sendCustomEvent()

    Sends a custom event to the agent console of the agent who is currently chatting with a customer. Available in API version 29.0 or later.