You are here:
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. |
-
Clone and activate the flow template.
- From Setup, enter Flows in the Quick Find box, then select Flows.
- Click Schedule Service Appointments for Actionable Events from the list view.
- Click Save As New Flow.
- Enter the label and API name.
- Click Save.
-
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.
-
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.
- Activate the flow.
-
Clone and activate the orchestration template.
- From the App Launcher, find and select Actionable Event Orchestration.
- Select the Service Appointment for Faults record.
- Click Clone.
- For Execution Procedure Name, select the cloned and activated version of the Schedule Service Appointments for Actionable Events flow.
- For Event Type, select Service Appointment.
-
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.
-
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.
- Change other details as required.
- Save your changes.
- To activate the orchestration, select Active.
-
Refresh the decision table.
- From Setup, enter Decision in the Quick Find box, then select Decision Tables.
- Click Filter and Match Actionable Event Orchestrations from the list view.
- Click Refresh.
Flow Inputs and Outputs
| Variable | Direction | Description |
|---|---|---|
| Context ID | Input | The ID of the context definition record associated with the incoming event. |
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. |
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>"
}
]
}
]
}
