Use Functions in Rules

Functions make rules more powerful. For example, use functions to apply rules iteratively to arrays or to make rules conditional on the content of a string or an array. CRM Analytics Templates supports string, array, and json functions as well as static math and sfdc_fma functions.

Use the "Rules.CurrentNode" property in conjunction with functions. It contains the last results of the JSON 'path' argument supplied in the action of your rule.

Use the EL Expression Language to invoke custom functions with an expression. Functions can appear in the static text of an EL expression, for example:

See the sections that follows for complete information about each function type.

  • string Functions

    Use string functions in rules to manipulate text strings in asset JSON at runtime.

  • array Functions

    Use array functions in rules to manipulate arrays in asset JSON at runtime.

  • json Functions

    Use json functions in rules to manipulate JSON at runtime. For example, find all the JSON paths in a dashboard that have a link widget and update the links at runtime.

  • Static Functions

    Static functions have specialized use in template rules.