Loading
Feature degradation | Gmail Email delivery failureRead More
Connected Assets
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
          Schedule Service Appointments for Actionable Events Orchestration

          Schedule Service Appointments for Actionable Events Orchestration

          The Schedule Service Appointments for Actionable Events flow automates the scheduling of Service Appointments when an Actionable Event, such as a diagnostic fault or a maintenance alert, is triggered by a connected asset. This flow uses the FaultEventScheduleAppointmentDetails__stdctx context definition to extract the event data, the asset identifier, and the event's geographic location, before locating the nearest service territories based on the geographic proximity. It then invokes an orchestration action to book the service appointment.

          Required Editions

          Available in: Lightning Experience
          Available in: Automotive Cloud and Manufacturing Cloud. View edition availability.
          User Permissions Needed
          To use the orchestration:

          Design Actionable Event Orchestration Processes

          AND

          Manage Flow

          To manage the Service Appointment record: Read, Create access on Service Appointment.
          1. Clone and activate the flow template.
            1. From Setup, enter Flows in the Quick Find box, then select Flows.
            2. Click Schedule Service Appointments for Actionable Events from the list view.
            3. Click Save As New Flow.
            4. Enter the label and API name.
            5. Click Save.
            6. For the WORK_TYPE_GROUP_NAME constant, change the value to the work type group for which you want to schedule appointments.
              Make sure the name matches the name of a Work Type Group record in your org.
            7. Modify other elements and resources as required.
              For example, you can change the default latitude and longitude limit from 20 miles radius to a limit of your choice.
            8. Activate the flow.
          2. Clone and activate the orchestration template.
            1. From the App Launcher, find and select Actionable Event Orchestration.
            2. Select the Service Appointment for Faults record.
            3. Click Clone.
            4. For Execution Procedure Name, select the cloned and activated version of the Schedule Service Appointments for Actionable Events flow.
            5. For Event Type, select Service Appointment.
            6. For Context Definition name, make sure you select FaultEventScheduleAppointmentDetails.
              You can either use the context definition as is or use a new version of this definition.
            7. For Context Mapping name, make sure you select FaultEventScheduleApptMapping.
              You can either use the context mapping as is or use a new version of this mapping.
            8. Change other details as required.
            9. Save your changes.
            10. To activate the orchestration, select Active.
          3. Refresh the decision table.
            1. From Setup, enter Decision in the Quick Find box, then select Decision Tables.
            2. Click Filter and Match Actionable Event Orchestrations from the list view.
            3. Click Refresh.

          Flow Inputs and Outputs

          Variable Direction Description
          Context ID Input The ID of the context definition record associated with the incoming event.
          Note
          Note The flow does not show the created Service Appointment ID as an output variable. The appointment is created internally by the scheduleSvcApptActnblEvntOrch action.

          Payload Field Reference

          Field Required Description
          Source System Identifier Yes The unique identifier of the external system sending the event, such as a telematics or an Internet of Things (IoT) platform.
          Type Yes The developer name of the actionable event type configured in the Service Appointment for Faults actionable event orchestration record.
          Subtype No The developer name of the actionable event subtype configured in the Service Appointment for Faults actionable event orchestration record.
          Event Data Yes The structured event data, provided as a JSON-encoded string. This serialized string contains the attributes required to hydrate the context definition instance, which is then passed to the execution procedure based on the configured input mapping.

          Event Data Field Reference

          Field Required Description
          Asset Unique Identifier Yes The asset's record ID or serial number, used by the scheduling action to identify the asset that requires service.
          Business Object Type No The object type, such as Asset, used by the context definition mapping.
          Event Location Yes The asset's current geographical coordinates.
          Event Location Longitude Yes The longitude of the asset's location.
          Event Location Latitude Yes The latitude of the asset's location.
          Note
          Note The Longitude and Latitude fields must be provided as decimal degree strings. The flow converts them to numbers internally using the VALUE() formula function.

          Review the structural example for the payload template.

          {
            "sourceSystemIdentifier": "<your-system-identifier>",
            "type": "Service_Appointment",
            "subtype": "<aeo-event-sub-type>",
            "eventData": "<stringified-JSON-of-the-structure-below>"
          }

          Review the structural example for the event data template.

          {
            "Event": [
              {
                "assetUniqueIdentifier": "<asset-salesforce-id-or-serial-number>",
                "businessObjectType": "Asset",
                "eventLocation": [
                  {
                    "businessObjectType": "eventLocation",
                    "longitude": "<decimal-longitude>",
                    "latitude": "<decimal-latitude>"
                  }
                ]
              }
            ]
          }
           
          Loading
          Salesforce Help | Article