TemplateRequirementEvaluation

Use this node to evaluate template requirements in the org before the app is created.

Asset Type Name for Rules 

Not supported

Example Definition in chain.json 

1{
2  "name": "perform_readiness_checks",
3  "label": "Performs Readiness Checks",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "readiness_check1": {
9        "graphNodeType": {
10          "name": "OrgPreferenceReadiness"
11        },
12        "parameters": {
13          "name": "OrgPrefCheck",
14          "preferenceNames": ["${Variables.preferenceToCheck1}", "${Variables.preferenceToCheck2}"]
15        },
16        "sources": [],
17        "runAs": "CurrentUser"
18      },
19      "template_requirement": {
20        "graphNodeType": {
21          "name": "TemplateRequirementEvaluation"
22        },
23        "parameters": {
24          "condition": "${Readiness['OrgPrefCheck'][Variables.preferenceToCheck1]}",
25          "expression": "${Readiness['OrgPrefCheck'][Variables.preferenceToCheck2] == Variables.expectedValue}",
26          "successMessage": "Congratulations! The expected org preference [${Variables.preferenceToCheck2}] value matches!",
27          "failMessage": "Expected preference [${Variables.preferenceToCheck2}] value does not match. Expected: ${Variables.expectedValue}, Actual: ${Readiness['OrgPrefCheck'][Variables.preferenceToCheck2]}"
28        },
29        "sources": ["readiness_check1"],
30        "runAs": "CurrentUser"
31      }
32    }
33  }
34}

Parameters 

ParameterDefinition
expression(Required) A valid EL expression that must evaluate to either true or false. The expression usually references readiness definition entries by name, but it can also reference variable values, rule constants, or supported template EL functions.
successMessage(Optional) The message to return to the client when the requirement expression evaluates to true. EL expressions can be referenced to create dynamic messaging.
failMessage(Optional) The message to return to the client when the requirement expression evaluates to false. EL expressions can be referenced to create dynamic messaging.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to run this template requirement evaluation task or not.

Set runAs to CurrentUser so that this node runs with the permissions of the user installing the app. If you omit runAs, the node runs as AutoProc, a system user.

Note

App Context Values 

Nothing added to App Context.

On Failure 

If this task fails, it returns a FAIL_TERMINAL status. The chain stops and no downstream nodes run.

See Also