Skip to main content

Decide When and How to Present the Chat Button

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain why you’d want to add business hours to your Messaging for In-App and Web deployment.
  • Identify the building blocks and end result of adding business hours to your deployment.
  • Explain the benefits of the Show/Hide API.

By default, when you add a Messaging for In-App and Web deployment to a page on your website or mobile app, the chat button shows up each time you load the page. This is ideal for a 24-hour contact center or a business with contact centers in different time zones around the world. Let’s explore the business reasons for hiding the chat button.

Scenario 1: Your Agents Aren’t Available 24/7

Adding business hours to your messaging deployment allows you to prevent customers from initiating messaging sessions when agents aren’t working.

The end-user experience of attempting to message outside of business hours depends on the deployment’s location: In-App or Web.

  • Messaging for In-App: The end-user sees a banner across the top of the messaging window letting them know that new conversations aren’t currently available. Your app developers still need to use the API to completely prevent them from being initiated.
  • Messaging for Web: The chat button is hidden outside of business hours.

Messaging for In-App and Web takes the standard Service Cloud business hours feature and applies it to your deployment. Setup takes place in two places.

The building blocks of creating business hours for your Messaging for Web deployment include creating business hours on the business hours setup page, then adding the business hours record to your deployment on the Embedded Service Deployment Settings Setup page.

First, you create business hours in the Business Hours setup page. Then you head over to the Deployment Settings setup page and associate the business hours record with your deployment.

For step-by-step instructions, check out Set Business Hours in Messaging for In-App and Web.

Scenario 2: You Want to Hide the Chat Button on Certain Web Pages

While Messaging for In-App developers have full control over customizing the SDK, Messaging for Web developers rely on the API for extra bells and whistles. Our Show/Hide API lets Messaging for Web developers hide the chat button on certain web pages. Let’s look at a few examples for why you’d want to do this.

Example 1: Hide the Default Chat Button, So You Can Introduce a Custom Chat Button

Ursa Major Solar Company runs a multi-channel contact center. The company wants to centralize these customer support options in a single subdomain of its website, which it calls the Contact Us page. Ursa Major wants each contact option—messaging, phone, or email—to be listed across the center of the page with a button that launches the channel. As a result, Ursa Major doesn’t want the chat button in its usual lower right corner of the web page.

Ursa Major Solar’s website with the chat button hidden from the lower right corner of the page.

Using our Show/Hide API, Ursa Major is able to hide the chat button from the lower right corner of its website. Ursa Major can then add a custom chat button to the center of its web page. For its mobile app, developers have full control over customizing the SDK’s button location.

Example 2: Allow Subdomain Session Continuity While Preventing New Chats on the Same Pages

Once a messaging conversation starts on Ursa Major’s Contact Us page, its customers can enjoy subdomain session continuity. That means a customer can navigate around Ursa Major’s website without losing the open conversation window. Ursa Major’s web developers created this experience by adding its domain and subdomains to Trusted Domains for Inline Frames.

However, Ursa Major wants its customers to initiate new support requests on the Contact Us page. This allows them to inform customers of the variety of support channels that they offer. Using the Show/Hide API, Ursa Major’s web developers can hide the chat button on pages where existing conversations are allowed to continue. This prevents new chats from being initiated on those pages.

Learn more about showing or hiding the chat button in Messaging for Web.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈