refreshAppointment
This interface fetches the latest state of a single appointment from the CRM. It is called when a user opens an appointment detail view or manually refreshes an appointment to pick up changes made directly in the CRM.
Input parameters
| Parameter | Description |
|---|---|
user |
An object describing the Chrome extension user associated with the action that triggered this interface. |
authHeader |
The HTTP Authorization header to be transmitted with the API request to the target CRM. |
appointmentId |
The CRM ID of the appointment to retrieve. |
Return value(s)
An object with the following property:
| Parameter | Description |
|---|---|
appointment |
The current appointment object from the CRM. |
If the appointment cannot be found, return:
| Parameter | Description |
|---|---|
successful |
false |
returnMessage |
An object with message, messageType, and ttl. |
Example
return {
appointment: {
id: "12345",
thirdPartyAppointmentId: "12345",
title: "Intake call with Jane Smith",
description: "Initial consultation",
startTimeUtc: "2024-03-15T14:00:00.000Z",
durationMinutes: 60,
status: "scheduled",
contactId: "67890",
attendees: [{ id: 67890, name: "Jane Smith", type: "Contact" }]
}
};
Reference
ttl: 5000
}
};
}
const existing = await getCalendarEntryById({ user, authHeader, appointmentId });
if (!existing) {
return {
successful: false,
returnMessage: {
message: 'Appointment not found in Clio.',
messageType: 'warning',
ttl: 5000
}