Flow Action: Save Appointment

Use the Save Appointment action to create and modify appointments.

Required Editions

Available in: Lightning Experience.
Available in: Enterprise and Unlimited Editions
Input Value Description Data Type
Lead

The ID of the lead record created for an unauthenticated (guest) customer appointment.

Using this attribute for authenticated customers can result in unexpected behavior.

Lead
Optional Service Resource Ids List

Used if multiresource scheduling is disabled.

A comma-separated list of IDs of optional service resources. Salesforce Scheduler considers optional service resources as available for other appointments.

Example: 0HnRM0000004RWy0AM,0HnRM0000004S6A0AU

String
Selected Timezone

The user-selected time zone. This value is stored in internal logs and is used to debug issues. For valid time zone formats, see Supported Time Zones.

Example: America/Los_Angeles

String
Service Appointment Fields

The values of the service appointment attributes.

To generate a value to pass to Service Appointment Fields:

  1. Use the Review Service Appointment component to generate the Additional Field Values attribute.
  2. Pass the Additional Field Values attribute value to Service Appointment Fields.

For information about JSON fields, see the Create a Custom Review Service Appointment Screen section in Considerations for Creating a Custom Review Service Appointment Screen.

Note
Note Predefined flows use the ServiceAppointmentFields flow variable in:
  • Additional Field Values in the Review Service Appointment component
  • Service Appointment Fields in the Save Appointment action
String
Service Resources

Used if multiresource scheduling is enabled.

A string representation of a JSON object that contains information such as:

  • URL of the service resource user profile image
  • Service territory member ID
  • Indication of whether a service resource is active
  • Resource type
  • Service resource user record ID
  • Service resource ID
  • Service resource name
  • Attendance type

In predefined flows, this value is automatically created by the Timeslot screen and sent as output. The value is then passed to the review screen as input.

If you want to create a JSON object without using the timeslot screen, provide these details:

  • AttendanceType
  • Name
  • Id (Service Resource ID)
  • Resource type

AttendanceType supports three values: Primary, Required, and Optional.

If you want to use multiresource scheduling and make some of the resources optional, set the AttendanceType attribute.

Note
Note Salesforce Scheduler considers optional service resources as available for other appointments.

Example:

[{"UserPhoto":"https://mycumulusbank.file.force.com/profilephoto/005/F","ServiceTerritoryMemberId":"0Hu5i000000LE8WCAW","IsActive":true,"ResourceType":"T","RelatedRecordId":"0055i000002AhHvAAK","Id":"0Hn5i000000PPCYCA4","Name":"Ben Smith","sobjectType":"ServiceResource","AttendanceType":"Primary"},{"UserPhoto":"","ServiceTerritoryMemberId":"0Hu5i000000Li1vCAC","IsActive":true,"ResourceType":"S","Id":"0Hn5i000000PT1RCAW","RelatedRecordId":null,"Name":"(Room) Taj Mahal","sobjectType":"ServiceResource","AttendanceType":"Optional"}]
String
Work Type

Used only in modify appointment flows.

The work type of the service appointment.

To populate this field:

  1. Create a work type record with these values:
    • Resource type: variable
    • Data type: record
    • Object: WorkType
  2. Add a getRecord action, and then use the response to populate this value.
Work Type
Inbound Appointment Flow A Boolean value that indicates whether the calling flow is an inbound new appointment flow. String
Outbound Community Flow A Boolean value that indicates whether the calling flow is for Experience Cloud site visitors. String
Modify Appointment URL The URL to use to modify an appointment that an unauthenticated (guest) user creates. String
Create Appointment URL The URL to use to launch the flow to create an unauthenticated (guest) appointment. String
Modify Appointment Email Template The developer name of the template for the confirmation email to notify a customer that their appointment has been modified. If you don’t specify a template name, no email is sent when an appointment is modified. String
Create Appointment Email Template The developer name of the template for the confirmation email to notify a customer that their appointment has been created. If you don’t specify a template name, no email is sent when an appointment is created. String
Service Appointment Token An encrypted token to identify the associated service appointment. String
Modify Appointment A Boolean value that indicates whether the user wants to reschedule the service appointment. The default value is false, and indicates that the user wants to cancel the service appointment. Boolean
Email Template for Modified Authenticated Appointments The developer name of the email template used to send authenticated users an email after a paid appointment has been modified. If you don’t specify a template name, no email is sent when an appointment is modified. String
Email Template for Modified Guest Appointments The developer name of the email template used to send guest users an email after a paid appointment has been modified. If you don’t specify a template name, no email is sent when an appointment is modified. String
Output Value Description Data Type
Error Message Any error message that’s generated when saving an appointment. String
Service Appointment ID The ID of the service appointment that’s created or modified. String
Are Payments Applicable Indicates whether Payments is enabled in Salesforce Scheduler and if any payments apply to the selected service territories and work types. This value is always false for group service appointments. Boolean