Business Hours for Android

If you've set up business hours in Salesforce, use the retrieveBusinessHours method to check for business hours and handle things accordingly. For instance, you can hide the chat button outside of business hours. When using the UI SDK, customers see a banner in the chat window when it's outside of business hours.

To configure business hours for your deployment, see Set Business Hours in Messaging for In-App and Web.

This feature requires version 1.3.0 or later of the Messaging for In-App SDK.

This article applies to the following implementations:


Retrieve the business hours from the core client object using the retrieveBusinessHours method, and then determine how to proceed based on that information. This method returns the business hours over the next 24 hours. You can use the helper method isWithinBusinessHours to determine whether a time is within business hours; specifying no argument uses the current time.

This sample requires the configuration object that you created when setting up the UI SDK or the Core SDK. See Build a UI SDK App or Build a Core SDK App for more information.