Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Flows for Appointment Emails with Calendar Invites in Intelligent Appointment Management

          Create Flows for Appointment Emails with Calendar Invites in Intelligent Appointment Management

          Create a record-triggered flow that automatically sends patients an email after their appointment is booked or canceled. Appointment confirmations include a calendar file (.ics). Enable email tracking to verify that appointment emails, which include personal health information about a patient, reach the intended recipient.

          Required Editions

          Available in: Lightning Experience

          Available in: Enterprise and Unlimited Editions with Health Cloud

          User Permissions Needed
          To open, edit, or create a flow in Flow Builder: Manage Flow
          To create or change public email template folders: Manage Public Classic Email Templates

          Appointments can originate from various records such as accounts, tasks, or clinical service requests. If you have a custom flow for managing appointments, include a Decision element that evaluates the parent ID of the appointment. For example, identify record IDs that start with 001 as accounts, and record IDs that start with 0jy as clinical service requests. Create separate flow paths based on the outcome of the decision. If the parent record is a clinical service request, create a separate path to get the IDs of the clinical service records and then assign those IDs to the Recipients variable.

          1. If you haven’t already done so, create an email template for appointment confirmations and an email template for appointment cancellations. See Create an Email Template for Appointment Confirmations and Create an Email Template for Appointment Cancellations.
          2. Determine the IDs of your email templates for appointment confirmations and cancellations.
            1. From Setup, in the Quick Find Box, enter Classic Email Templates, and then select Classic Email Templates.
            2. Click the name of the template.
            3. In the URL address bar for your template, find the 15 character string of numbers and capital letters that starts with 00X. Make note of this ID so that you can add it to the flow.
              Email template ID highlighted in the address bar
          3. If a No-Reply email isn’t set up for your org, create one.
            1. From Setup, in the Quick Find Box, enter Organization-Wide Addresses, and then select Organization-Wide Addresses.
            2. Under Default No-Reply Address, click Add in the Organization-Wide Email Addresses for User Selection and Default No-Reply Use section.
            3. Enter a display name. The display name is what a customer sees as the email’s Sender Name.
            4. Enter your No-Reply email address.
            5. Select Default No-Reply Address as the purpose.
            6. Save your work.
              Note
              Note An email is sent to the organization-wide email address. Follow the steps in the email to verify your org’s default No-Reply address.
          4. Create a record-triggered flow for appointment confirmations.
            1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
            2. Click New Flow.
            3. Click Start from Scratch, and then click Next.
            4. Select Record-Triggered Flow, then click Create.
            5. For Object, select Service Appointment.
              Note
              Note The API Name is ServiceAppointment, the label is Appointment.
            6. Set the flow to trigger when a record is updated.
            7. For the entry conditions, select All Conditions Are Met (AND).
            8. Enter these conditions:
              Field Operator Value
              SchedStartTime Is Null $GlobalConstant.False
              ContactId Is Null $GlobalConstant.False
              StatusCategory Equals Scheduled
            9. For When to Run the Flow for Updated Records, select Every time a record is updated and meets the condition requirements.
            10. Optimize the flow for Actions and Related Records.
            11. Select Include a Run Asynchronously path to access an external system after the original transaction for the triggering record is successfully committed.
          5. Save the flow.
          6. Enter a Flow Label.
          7. Save the flow again.
          8. Add an assignment element to the flow to set the recipients of the email.
            1. Add an element by clicking Plus sign icon in Flow Builder.
            2. Click Assignment.
            3. Add a Label. We suggest Add Recipients.
            4. Keep the default API Name.
            5. For Set Variable Values, click the Variable input text box and select New Resource.
            6. For Resource Type, select Variable.
            7. For API Name, enter Recipients.
            8. For Data Type, select Text.
            9. Select Allow multiple values (collection).
            10. Click Done.
            11. For Operator, select Add.
            12. For Value, select {!Record.Account.PersonContactID}, and that shows as ($Record > Account ID > Contact ID).
          9. Add an assignment element to the flow for related records.
            1. Add an element by clicking Plus sign icon in Flow Builder.
            2. Click Assignment.
            3. Add a label. We suggest Add Related Records.
            4. Keep the default API Name.
            5. For Set Variable Values, click the Variable input text box, and select New Resource.
            6. For Resource Type, select Variable.
            7. For API Name, enter Related Records.
            8. For Data Type, select Text.
            9. Select Allow multiple values (collection).
            10. Click Done.
            11. For Operator, select Add.
            12. For Value, select {!Record.ID}, and that shows as ($Record > Service Appointment ID).
          10. Add an action to the flow to send the email.
            1. Add an element by clicking Plus sign icon in Flow Builder.
            2. Select Action.
            3. In the Action Search box, enter Send Message, and then select Send Channel Message.
            4. Add a label. We suggest Send Message.
            5. Keep the default API Name.
            6. For Engagement Channel, enter Email.
            7. For Template ID, enter the 15-digit ID you noted from the URL of your email template for appointment confirmations.
            8. or Message Type Handler, enter Appointment Confirmation.
            9. For Recipient IDs, select the Recipients collection variable that you created.
            10. For Related Record IDs, click Include.
            11. For Related Record IDs, select the Related Records collection variable that you created.
              Note
              Note We suggest that you handle basic failures by creating a fault path in your flow. The Send Channel Message action has two output parameters that you can check. It has a success parameter and also outputs a list of failedRecipients.
          11. Save your changes.
          12. Activate the flow.
          13. Repeat these steps to create and activate a flow for appointment cancellations. For this flow:
            1. Use the ID of your email template for appointment cancellations.
            2. For the entry conditions, select All Conditions Are Met (AND).
            3. Enter these conditions:
              Field Operator Value
              SchedStartTime Is Null $GlobalConstant.False
              ContactId Is Null $GlobalConstant.False
              StatusCategory Equals Canceled
            4. For Message Type Handler, enter Appointment Confirmation. This is the correct value even though the flow is for appointment cancellations.
          14. In Object Manager, verify that the Email field is on the Person Account page layout. If necessary, add this field to the layout.
            To ensure that appointments are booked successfully, make sure all patients have an email address associated with them.
          15. Enable email tracking. See Enable Email Tracking for All Customers Opening Email from Your Company.

          Now your patients get an automated email alerting them when their appointment has been booked or canceled.

           
          Loading
          Salesforce Help | Article