---
schema_version: "1"
id: b8b8354abe70ff512f225bcbcd22cb439af06c0d0dd4fa7f9d8b5b45af8882b4
title: "Adaptive Response Format: Time Picker"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_response_ref_time_picker.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_response_ref_time_picker.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c6040a41f297c80fee779aaf82de678fc3c3d8527bd24db9d845e2ee3b699343
description: A time picker response is a list of available time slots. Currently, time picker response is available for Agentforce Service Agent only.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Adaptive Response Format: Time Picker

A time picker response is a list of available time slots. Currently, time picker response is available for Agentforce Service Agent only.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with Foundations, or <strong>Agentforce 1</strong> or <strong>Einstein 1</strong> Editions</td></tr></tbody></table>

## Adaptive Response Format Details

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col style="width:24.509803921568626%"> <col style="width:75.49019607843137%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="text-align:left;vertical-align:top;">Mapped messaging component</td><td class="slds-cell-wrap" style="text-align:left;vertical-align:top;">Time selector</td></tr><tr class=""><td class="slds-cell-wrap" style="text-align:left;vertical-align:top;">Supported channels</td><td class="slds-cell-wrap" style="text-align:left;vertical-align:top;">Enhanced Apple Messages for Business</td></tr></tbody></table>

## Considerations

- You can't customize the mapped messaging component in Messaging Component Builder.
- The time picker response supports the Time Selector messaging component format for enhanced Apple Messages for Business channels. On Enhanced Chat channels, time slots appear as buttons.

To use the time picker format in agent responses, create a custom agent action that returns the required information. For a sample reference action, see the example Apex class.

Time Slots

A list of available time slots.

Message

Optional. Text sent immediately before the time picker. For example, "Here are the available time slots."

Reply

Optional. Text sent after the customer selects a time slot. For example, "Thank you for selecting your preferred time slot."

Location Name

Optional. Name of the location associated with the time slots. For example, "Main Office."

Latitude

Optional. Latitude of the location.

Longitude

Optional. Longitude of the location.

Radius

Optional. Radius of the location area in meters.

The Location Name, Latitude, and Longitude fields must be included together.

This Apex class retrieves available time slots for a specified day. It returns the time slots as a list.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_example.png)

Example

```java
public class TimePickerResponse {

    @InvocableVariable(label='Time Slots')
    public List<String> timeSlots;

    @InvocableVariable(label='Message')
    public String message;

    public TimePickerResponse() {
        this.message = 'Here are the available time slots:';
        this.timeSlots = new List<String>();
    }

    @InvocableMethod(
        label='Get Time Slots by Day Name'
        description='Returns time slots as plain text based on the specified days.'
    )
    public static List<List<String>> getAvailableTimesForDay(List<String> dayNames) {

        List<List<String>> allAvailableTimes = new List<List<String>>();

        for (String dayName : dayNames) {

            List<String> availableTimes = new List<String>();
            String normalizedDay = dayName.trim().toLowerCase();

            switch on normalizedDay {
                when 'monday' {
                    availableTimes.add('9:00 AM - 10:00 AM');
                    availableTimes.add('12:00 PM - 1:00 PM');
                    availableTimes.add('3:00 PM - 4:00 PM');
                }
                when 'tuesday' {
                    availableTimes.add('10:00 AM - 11:00 AM');
                    availableTimes.add('1:00 PM - 2:00 PM');
                    availableTimes.add('4:00 PM - 5:00 PM');
                }
                when 'wednesday' {
                    availableTimes.add('9:30 AM - 10:30 AM');
                    availableTimes.add('12:30 PM - 1:30 PM');
                    availableTimes.add('3:30 PM - 4:30 PM');
                }
                when 'thursday' {
                    availableTimes.add('8:00 AM - 9:00 AM');
                    availableTimes.add('11:00 AM - 12:00 PM');
                    availableTimes.add('2:00 PM - 3:00 PM');
                }
                when 'friday' {
                    availableTimes.add('9:00 AM - 10:00 AM');
                    availableTimes.add('11:30 AM - 12:30 PM');
                    availableTimes.add('2:00 PM - 3:00 PM');
                }
                when 'saturday' {
                    availableTimes.add('10:00 AM - 11:00 AM');
                    availableTimes.add('12:00 PM - 1:00 PM');
                    availableTimes.add('2:00 PM - 3:00 PM');
                }
                when 'sunday' {
                    availableTimes.add('11:00 AM - 12:00 PM');
                    availableTimes.add('1:00 PM - 2:00 PM');
                    availableTimes.add('3:00 PM - 4:00 PM');
                }
            }
            allAvailableTimes.add(availableTimes);
        }

        return allAvailableTimes;
    }
}
   
```