Loading
Prepare for Email to Become the Default Login ExperienceRead More
Set Up the Create Records For Asset Registration Event Orchestration

Set Up the Create Records For Asset Registration Event Orchestration

When a connected vehicle is onboarded to Salesforce, businesses can automatically create key records—including web and phone service entitlements, milestones, and warranties for the vehicle and its child assets. The Create Records for Asset Registration template streamlines first-time registration by leveraging predefined configurations like context definitions, mappings, and flow templates. When a telematics event, such as a customer using a vehicle for the first time, occurs, the system captures input attributes and instantly generates essential records without requiring users to build complex business logic from scratch.

Required Editions

Available in: Enterprise, Unlimited, and Developer Editions
User Permissions Needed
To use the orchestration:

Design Actionable Event Orchestration Processes

AND

Manage Flow

To manage the Asset Warranty, Asset Milestone, and Entitlement records: Read, Create access on Asset Warranty, Asset Milestone, and Entitlement.
  1. Create an Apex class.
    1. From Setup, enter Apex in the Quick Find box, then select Apex Classes.
    2. Click New.
    3. Enter details that represents the context definition ID and tags to be queried by the flow.

      Here's an example of what the Apex class looks like for QueryContextTags.

      public class QueryContextTags {
          @InvocableMethod(label='QueryContextTags' description='Query Tags via apex')
          public static List<ContextResponse> queryTags(List<ContextRequest> requestList) {
              Context.IndustriesContext industriesContexts = new Context.IndustriesContext();
              Map<String, Object> input = new Map<String, Object>();
              List<String> tag = new List<String>();
              tag.add(requestList[0].tagName);
              input.put('contextId', requestList[0].contextId);
              input.put('tags', tag);
              Map<String, Object> output =  new Map<String, Object>();
              List<ContextResponse> responseList = new List<ContextResponse>();
              ContextResponse response = new ContextResponse();
            
                  output =industriesContexts.queryTags(input); 
                  System.debug('--QueryTags--output----'+output);  
                  Map<String, Object> queryresult = (Map<String, Object>)output.get('queryResult');
                  List<Object> contextTagDataRepresentations= (List<Object>)queryresult.get(requestList[0].tagName);
                  Map<String,Object> contextTagDataRepresentation = (Map<String,Object>)contextTagDataRepresentations.get(0);
                  response.dataPath = (List<String>)contextTagDataRepresentation.get('dataPath');
                  response.tagValue = (String) contextTagDataRepresentation.get('tagValue');
                  System.debug('--QueryTags--dataPath----'+contextTagDataRepresentation.get('dataPath'));
                  System.debug('--QueryTags--tagValue----'+contextTagDataRepresentation.get('tagValue'));   
                  responseList.add(response);
                         
              return responseList;      
          }
         
          public class ContextRequest{
              @InvocableVariable(required=true)
              public String contextId;
             
              @InvocableVariable(required=true)
              public String tagName;
          }
         
          public class ContextResponse{
              @InvocableVariable(required=true)
              public List<String> dataPath;
             
              @InvocableVariable(required=true)
              public String tagValue;
          }
      
      }
    4. Save the QueryContextTags apex class.
  2. Clone and activate the flow template.
    1. From Setup, enter Flows in the Quick Find box, then select Flows.
    2. Click Create Records for Asset Registration from the list view.
    3. Click Save As New Flow.
    4. Enter the label and API name.
    5. Click Save.
    6. Modify the elements and resources as required.
      For example, you can change the email subject and body that's shared with users to list the records that are created by this flow, and the list of records that the flow failed to create.
    7. Activate the flow.
  3. Clone and activate the orchestration template.
    1. From the App Launcher, find and select Actionable Event Orchestration.
    2. Note
      Note This is an installed template record that's automaticaly available in the org if you have the required permissions.
      Select the Create Records for Asset Registration record.
    3. Click Clone.
    4. For Execution Procedure Name, select the cloned and activated version of the Create Records for Asset Registration flow.
    5. For Event Type, select Create Asset Registration Records.
    6. For Context Definition name, make sure you select AssetRegistrationCreateRecordDetails.
      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 AssetRgstrCreateRecordsMap.
      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.
  4. 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.

An event is triggered by the external telematics system where the details match the attributes of the AssetRegistrationCreateRecordDetails context definition.

{
  "sourceSystemIdentifier": "V003003",
  "type": "Create Asset Registration Records",
  "eventData": {
    "Asset": [
      {
        "UniqueIdentifier": "02ixx0000004HKwAAM",
        "WarrantyStartDate": "2025-12-17",
        "MilestoneName": "Milestone-ABC",
        "MilestoneStage": "Active",
        "MilestoneDate": "2025-10-10",
        "MilestoneUsageType": "Automotive",
        "MilestoneType": "Order Received",
        "EntitlementName": "Entitlement-ABC"
      }
    ]
  }
}

Here the UniqueIdentifier must match the record ID of the parent asset that's related to a vehicle record. You can also share additional details such as entitlement date, warranty description, and more.

These records are automatically created by the orchestration.

  • An asset warranty record is created for the vehicle with required information such as start date, asset ID, and warranty term ID populated.
  • An asset warranty record is created for the child assets of the vehicle with required information such as start date, asset ID, and warranty term ID populated.
  • An asset milestone record is created for the vehicle with required information such as milestone name, milestone date, milestone type, stage, usage type, asset ID, and vehicle ID populated.
  • An entitlement record is created for the asset with required information such as account ID, entitlement name, asset ID, and type as Phone Support populated.
  • An entitlement record is created for the asset with required information such as account ID, entitlement name, asset ID, and type as Web Support populated.
 
Loading
Salesforce Help | Article