Loading
Salesforce now sends email only from verified domains. Read More
Get Started with Communications, Media, and Energy & Utilities (CME)...
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
          Automatic State Model Transitions

          Automatic State Model Transitions

          In Spring '20 and later releases, you can automate state transitions in your State Model. This makes manually clicking on a state to advance to it unnecessary, although it's still an option.

          For example, if you are using the Report Card State Model, you can schedule the Completed to Passed transition so that grade notifications are sent to all students at a specific time.

          You can invoke the automated transition from an OmniScript, an Integration Procedure, a Vlocity Card, an Apex class, and so on. Note that you don't invoke the automation from within the State Model itself. The State Model user interface operates on individual base object records, while the automation operates on multiple records at once.

          For example, to invoke the Completed to Passed transition in the Report Card State Model from an OmniScript or Integration Procedure, set the following properties in a Remote Action:

          Property

          Value

          Remote Class

          InsScheduledAutomatedTransitionService

          Remote Method

          scheduleAutomatedTransition

          Send JSON Path

          RAInput

          Provide input to the Remote Action in the following format:

          {
              "RAInput": {
                  "objectName": "vlocity_ins__Report_Card__c",
                  "fieldName": "vlocity_ins__States__c",
                  "fromState": "Completed",
                  "toState": "Passed",
                  "typeName": "vlocity_ins__Type__c",
                  "typeValue": "Student",
                  "schedule": {
                      "pattern": "WEEKLY",
                      "dayOfTheWeek": "FRI",
                      "startTime": "14:00"
                  }
              }
          }

          These input values specify that grade notifications are sent on Friday at 2 pm.

          Important
          Important

          The input in this topic uses the namespace vlocity_ins for custom objects and fields. If your org has a different namespace, vlocity_cmt or vlocity_ps, use that instead.

          If a State Model has a Type Field Name and a Type Field Value, you must specify typeName and typeValue parameters when invoking an automated transition. This prevents state transitions in base object records of the wrong type from occurring.

           
          Loading
          Salesforce Help | Article