In Moveworks’ real-world scenarios, DSL examples are integral to streamlining processes within the Moveworks platform. These DSL examples are designed to help you write rules quicker and ultimately improve your user experience and productivity.
If, for some reason, you do not want to render a list of forms from being fillable in chat, you can use the Override fillable forms to deflect to ITSM control under Forms > Skill Settings and supplying a list of forms as shown below.
In this case, we are identifying the list of ServiceNow forms (i.e. catalog items or record producers) by their ServiceNow sys_id.
When setting up user identity for Active Directory, you’ll notice that fields are not straightforward field: value. The fields will return as a list element [], so you need to use index accessors where 0 is the first element in the list.
Let’s say we want to retrieve the userPrincipalName of the user.
userPrincipalName fieldWe usually create whitelists for users that want to test a certain skill or sometimes remove access to a list of people. We would want to evaluate all users in lowercase since sometimes emails or other attributes may contain capital letters. A way to lowercase an element is by using the .$LOWERCASE() formatter but it’s not scalable if you have a list of hundreds of users. Here’s how you can do it better.
We want to evaluate a ticket description with multiple STARTS_WITH, but you do not want to write multiple OR operators in your rule that could make it bulky and hard to read. We can leverage the ANY stream operator to match our ticket with a list of strings or elements.
You can also leverage the ALL operator in case you want AND conditions.
Check if a string contains any characters that are not alphabetic letters or whitespace.
This DSL:
true if any numbers or special characters are foundfalse if the string contains only letters and whitespaceThis expression creates a pseudo-random number string formatted as a hyphen-separated sequence.
This DSL:
$TIME().$INTEGER()) as a seed value[7:12]Not cryptographically secure — uses deterministic operations on time values. Will produce different values on each evaluation as time changes.