Simple
How to Format Rules with a Custom-Built Solution for Basic Use Cases
When we started to introduce placeholders we defined limited sets of placeholders, but the system was just too inflexible for users. To make it more flexible, a new system was introduced, with 4.2.0. This gives access to all properties.
The syntax is very easy:
The <TYPE>
is a prefix that has been used for backwards compatibility and users may use whatever they want but the best recommendation is to use prefixes that fit the type of event, for example, content or asset. The <PROPERTY>
is the full path to the property in the event, for example:
$CONTENT_TYPE
: Created$CONTENT_SCHEMAID.NAME
: my-schema$CONTENT_DATA.CITY.en
: Munich
If possible, always use the first variant with the brackets ( { and } ).
Special Placeholders
Furthermore, there are still some special placeholders for backwards compatibility or to grant access to information that is not directly part of the event.
Event | Description | New Alternative |
---|---|---|
| The id of your app (GUID). |
|
| The name of your app. |
|
| The id of the user (or client). |
|
| The display name of the user (or client name). |
|
| The email address of the user (or client name). |
|
| The date when the event has happened (usually different from the time when the rule is executed) in the following format: | |
| The date when the event has happened (usually different from the time when the rule is executed) in the following format: |
Event | Description | New Alternative |
---|---|---|
| The name of the schema. |
|
| The name of the schema. |
|
| The URL to the content in the administration tool. | |
| The content action, e.g. CityContentCreated. |
|
Special Placeholders for Comment Events
Event | Description | New Alternative |
---|---|---|
| The id of the mentioned user. |
|
| The display name of the mentioned user. |
|
| The email address of the mentioned user. |
|
Special Placeholders for Asset Events
Event | Description |
---|---|
| The download URL of the asset. |
Filters
This simple syntax also supports a few function filters when using the new syntax:
The following table uses:
Name | Description | Example |
---|---|---|
| Converts the input to lowercase. |
=> |
| Converts the output to uppercase. |
=> |
| Escapes the input to a JSON string. |
|
| Converts the input to a slow, which can only contain a-z0-9 and |
=> |
| Removes whitespaces at the start and end of the input. |
|
| Parses the input as ISO8601 datetime string and converts it to a unix timestamp using milliseconds. |
|
| Parses the input as ISO8601 datetime string and converts it to a unix timestamp using seconds. |
|
Filters can also be combined:
Last updated