> For the complete documentation index, see [llms.txt](https://docs.ownchat.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ownchat.app/bot/connections/zoho-bookings/fetch-appointment.md).

# Fetch Appointment

The Fetch Appointment action allows chatbot builders to retrieve booked appointment details dynamically from a connected Zoho Bookings account inside Ownchat.

This connection action helps businesses automate appointment management workflows by filtering and retrieving bookings based on:

* Service ID
* Staff ID
* Date filters
* Appointment status
* Customer phone numbers

The walkthrough demonstrates configuring Zoho Bookings connections, mapping service and staff variables, applying appointment filters, storing API responses, and publishing the workflow.

{% embed url="<https://app.supademo.com/demo/cmnd03lf61dvzxtgubm7ewhj0?utm_source=link>" %}

## When to Use Fetch Appointment &#x20;

Use the Fetch Appointment action when your chatbot needs to retrieve appointment information from Zoho Bookings.

### Common Use Cases &#x20;

* Appointment history retrieval
* Upcoming booking verification
* Cancelled appointment tracking
* Customer booking lookup
* Staff schedule management
* Booking support automation

#### Example Interaction &#x20;

Bot: 📅 Here are your recent appointments from the last 30 days.

The chatbot dynamically retrieves booking details from Zoho Bookings.

## Prerequisites &#x20;

Before configuring the Fetch Appointment action:

* Zoho Bookings integration must already be connected.
* Service and staff information should already exist.
* Previous booking workflows should already be configured.

The walkthrough demonstrates using variables retrieved from earlier booking actions such as:

* services
* staff\_id

## How to Add Fetch Appointment &#x20;

Follow these steps to add the Fetch Appointment action to your bot workflow.

1. Open Bot Builder
2. Drag the Success node from the previous booking action
3. Open the Connections tab
4. Select Zoho Bookings
5. Click Fetch Appointment
6. Configure booking filters and variables
7. Configure response variables
8. Click Create
9. Click Publish to deploy the workflow

The walkthrough demonstrates connecting the Success path to the Fetch Appointment workflow.

## Connecting the Workflow Node &#x20;

To connect the Fetch Appointment action:

1. Drag the Success output dot
2. Connect it to the next workflow action

The walkthrough specifically notes:

Drag and drop the success dot to connect it to the next action, Fetch Appointment.

## Accessing the Connections Section &#x20;

To access Zoho Bookings integrations:

1. Open the action selection panel
2. Click the Connections tab<br>

{% embed url="<https://app.supademo.com/demo/cmpdr6wq000z9yx0jsf0t9ktq?utm_source=link>" %}

The walkthrough demonstrates opening the Connections section from the bot workflow builder.

## Selecting Fetch Appointment &#x20;

Inside the Zoho Bookings integration:

1. Locate Fetch Appointment
2. Click the action to open the configuration dialog

The walkthrough demonstrates opening the Fetch Appointments form successfully.

## Fetch Appointment Configuration &#x20;

When configuring the Fetch Appointment action, several fields must be completed.

## Action Name &#x20;

The Action Name identifies the booking retrieval workflow inside the bot builder.

This name is visible only within the workflow editor.<br>

{% embed url="<https://app.supademo.com/demo/cmpdr8gle01btz90j2613sf7m?utm_source=link>" %}

#### Example &#x20;

Fetch Customer Appointments\
Retrieve Booking History\
Appointment Lookup

The walkthrough demonstrates renaming the action to:

Fetch bookings

before saving the configuration.

## Select Connection &#x20;

The Select Connection field allows you to choose the connected Zoho Bookings integration.<br>

{% embed url="<https://app.supademo.com/demo/cmpdra4ym01knvx0jvmdi4fxe?utm_source=link>" %}

To configure:

1. Open the dropdown menu
2. Select the required connection

The walkthrough specifically selects:

test\_zoho\_bookings

from the available connection list.

Other available connections shown include:

Janaki Bookings

## Service ID &#x20;

The Service ID field specifies the appointment service for retrieving bookings.

To configure:

1. Enter the service ID manually\
   or
2. Insert a dynamic variable

The walkthrough specifically demonstrates using a dynamic variable for the service ID.

### Adding Service ID Variable &#x20;

To dynamically insert the Service ID:

1. Click Add Variable

{% embed url="<https://app.supademo.com/demo/cmpdrbmvi00ij2n0jz87mms9v?utm_source=link>" %}

2. Search for the required variable
3. Select the variable

The walkthrough specifically selects:

services

from the available variables list.<br>

{% embed url="<https://app.supademo.com/demo/cmpdrdbby01bxz90j3gd9n9m2?utm_source=link>" %}

Final example:

{{variables.services}}

## Staff ID &#x20;

The Staff ID field specifies the staff member associated with the appointments.

To configure:

1. Enter the staff ID manually\
   or
2. Insert a dynamic variable

The walkthrough demonstrates configuring the Staff ID dynamically.

### Adding Staff ID Variable &#x20;

To dynamically insert the Staff ID:

1. Click Add Variable<br>

{% embed url="<https://app.supademo.com/demo/cmpdreekg01krvx0jj0lrkxts?utm_source=link>" %}

2. Select the required variable

The walkthrough specifically selects:

staff\_id

from the variable list.

Final example:

{{variables.staff\_id}}

{% embed url="<https://app.supademo.com/demo/cmpdrfkhy00zryx0jh62clxwr?utm_source=link>" %}

## Filter &#x20;

The Filter field defines the date range used to retrieve appointments.

Available options shown include:

* Last 30 days
* Last 60 days
* Custom

The walkthrough specifically selects:

Last 30 days

to retrieve appointments from the previous month.<br>

{% embed url="<https://app.supademo.com/demo/cmpdrgu4o00jl2n0j72oiouc7?utm_source=link>" %}

## Status &#x20;

The Status field filters appointments based on booking status.

{% embed url="<https://app.supademo.com/demo/cmpdrj6wy01ccz90j9zqrnwhw?utm_source=link>" %}

Available options shown include:

* Upcoming
* Cancel
* Payment Failure

The walkthrough specifically selects:

Cancel

from the appointment status dropdown.

{% embed url="<https://app.supademo.com/demo/cmpdrmxw701l2vx0jk6j1vbfo?utm_source=link>" %}

## Customer Phone Number &#x20;

The Customer Phone Number field maps customer phone details for appointment retrieval.

To configure:

1. Click Add Variable

{% embed url="<https://app.supademo.com/demo/cmpdrnyiy01l4vx0j8mfobvee?utm_source=link>" %}

2. Search for the customer phone field
3. Select the phone variable

The walkthrough specifically selects:

phone

from customer fields.

Example variable usage:

{{customer.phone}}<br>

{% embed url="<https://app.supademo.com/demo/cmpdrpdwi01l6vx0jtkjt47u9?utm_source=link>" %}

## Store Response in the Variable &#x20;

The Store Response in the Variable field specifies where the appointment response data should be stored.

To configure:

1. Select an existing variable\
   or
2. Create a new variable

The walkthrough demonstrates creating:

fetch\_booking

as the appointment response variable.

{% embed url="<https://app.supademo.com/demo/cmpdrqs7b000g0v0j2kciha22?utm_source=link>" %}

## Creating a New Variable &#x20;

If the required variable does not exist:

1. Click Create New Variable
2. Enter the variable name
3. Save the variable configuration

#### Example &#x20;

fetch\_booking

The walkthrough demonstrates creating the response variable before finalizing the workflow.

## Creating the Fetch Appointment Action &#x20;

After configuring all settings:

1. Review the booking filters and variable mappings
2. Click the Create button

{% embed url="<https://app.supademo.com/demo/cmpdrsezj01l8vx0ja3kqpqxx?utm_source=link>" %}

The Fetch Appointment node will now appear in the workflow canvas.

## Workflow Behavior &#x20;

Once triggered, the Fetch Appointment action:

* Connects with Zoho Bookings
* Retrieves appointment data dynamically
* Supports filtering by date and status
* Uses service and staff-based lookup
* Stores appointment response data automatically

The walkthrough demonstrates retrieving cancelled appointments from the last 30 days successfully.

## Example Workflow &#x20;

#### Example Chatbot Workflow &#x20;

Book An Appointment\
&#x20;       ↓\
Fetch Appointment\
&#x20;       ↓\
Retrieve Booking History\
&#x20;       ↓\
Display Customer Appointments

#### Example Interaction &#x20;

Bot: 📅 Here are your cancelled appointments from the last 30 days.

The chatbot dynamically retrieves filtered booking data from Zoho Bookings.

## Publishing the Bot Changes &#x20;

After configuring the Fetch Appointment workflow:

1. Review all workflow connections
2. Click the Publish button
3. Deploy the updated chatbot workflow to production

{% embed url="<https://app.supademo.com/demo/cmpdrtgos000o0v0jwjmmiq3k?utm_source=link>" %}

The walkthrough concludes by publishing the configured appointment retrieval workflow successfully.

## Best Practices &#x20;

Follow these recommendations when using Fetch Appointment.

### Use dynamic variables for service and staff mapping &#x20;

Reuse data collected from earlier booking workflows.

### Apply appropriate filters &#x20;

Use filters such as Last 30 days or Custom for accurate results.

### Filter by status carefully &#x20;

Retrieve only the required appointment types.

### Store response data properly &#x20;

Use meaningful variable names for booking response storage.

### Test booking retrieval flows before publishing &#x20;

Verify that appointment data loads correctly from Zoho Bookings.

## Summary &#x20;

The Fetch Appointment action allows chatbot builders to retrieve appointment data dynamically from Zoho Bookings inside OwnChat workflows.

With Fetch Appointment, you can:

* Retrieve customer appointment data dynamically
* Filter appointments by date and status
* Use service and staff-based lookup
* Map customer phone data
* Store booking responses automatically
* Build appointment management workflows

This connection action helps businesses create advanced appointment retrieval automation and intelligent scheduling workflows within Ownhat.
