Optional Lab: Data Syntax Language (DSL)
Overview
- Learning Objectives: Write Moveworks DSL rules that control access to functionality, and validate them against real users before applying them.
- Estimated Time: 15 minutes
- Prerequisites:
- Lab #4 complete (users ingested, so you can test rules against real user data)
Key Concepts
DSL is the logic layer of Moveworks, allowing you to write custom “if-this-then-that” rules for access and filtering. Core concepts include:
- Context: The specific data object available to the rule. For example, a “Bot Access Rule” uses the
usercontext, while a “Ticket Filter” uses theticketcontext. - Dot Walking: The syntax used to access nested properties within an object, such as
user.departmentto check an employee’s org unit. - Normalization: The use of methods like
$LOWERCASE()to ensure that logic remains consistent even if source data has inconsistent capitalization. - Operators: Logical tools (like
==,AND,OR,IN) used to build complex conditions, such as allowing access only to specific departments or locations.
Relevant Documentation:
- Moveworks Help: Data Syntax Language Reference
- Moveworks Help: DSL Best Practices
- Moveworks Agent Marketplace: Agent Architect
🛠️ 1: Walkthrough
1.1: Building DSL Rules
- Navigate to User Identity > Bot Access to see the DSL block you set in Lab #4.
Do not save the Bot Access Rule in this lab. The steps below replace TRUE with example rules to explore the editor. Saving a restrictive rule can block every user, including you, from the AI Assistant. When you finish, leave the page without saving, or confirm the rule still reads TRUE.

- Click into the DSL block and remove
TRUEto see the available context, operators, and methods. Selectuser.from the dropdown to view the available attributes.
Understanding Context: In Moveworks, context represents the data object currently accessible to your DSL code.
- In this Example: We are using the User context because we are defining user access permissions.
- Other Scenarios: Different DSL blocks will provide different objects (like
TicketorArticle) depending on what the block is designed to do.

- The DSL editor lists every attribute on the context object. You can build rules on any of these attributes.

Note: The DSL autofill displays all potential context object fields, even if they contain no data.
Before writing rules, verify the field’s coverage for your organization. In the following example, if an administrator were to limit AI Assistant access by the “Department” field, they must be aware that 10.03% of the users lack this attribute and would be excluded by default.

- Dot-walk into an attribute on the user object to see the available methods. Use
$LOWERCASE()to normalize the attribute’s text so case differences don’t change the rule’s outcome.
Always normalize casing when comparing text.

-
Once you select a method, press Space to view the auto-populated list of Operators. These are used for logical comparisons and data manipulation. For instance, using IN allows you to compare an attribute against a list of values; it returns TRUE only if the attribute exists in that list.

-
Combine operators to layer logic. You can build a rule on any attribute ingested on the Moveworks
UserorTicketobject. Paste this block to see fields, case normalization, and combined operators together:

- After writing a DSL rule, always run these two checks:
-
Select the
Validate Syntaxbutton to verify there are no syntax errors

-
Select
Runto compare your DSL rule against a user or ticket which you know should pass & fail, and confirm your rule is working as expected

-
1.2: Using Moveworks Agent Architect to Construct DSL Rules
Use the Moveworks DSL Architect to draft complex access rules. Describe who should (or shouldn’t) have access in plain language, and the Architect produces DSL with the nesting, methods, and operators filled in.
-
Open the Moveworks Agent Marketplace: click the ? icon in the upper right and select AI Agent Marketplace.

-
Select
Create -> Agent Architect
-
Select
DSL Architect

-
Input the following prompt to see how DSL Architect can help you construct DSL rules:
Bookmark this page. Use the Agent Architect for a first draft of DSL rules, Bender mappings, Tool Studio plugins, or Moveworks Setup configuration.
The prompt below names the exact field names, which makes the response directly usable.

✅ 2: Verification & Next Steps
- Confirm Understanding:
- Read the DSL rule you built. Make sure you understand what it does and which functions, operators, context, and attributes it uses.
- Read the prompt you gave the DSL Architect. Note how much detail it takes to get consistent output.
- Practice:
- After Lab #8, open the Ticket Filters configuration and add DSL rules that limit which tickets Moveworks can act on.
Next: Return to the Moveworks Setup labs to continue with the core labs or pick another optional lab.
To learn Bender, the data-mapping companion to DSL, see Optional Lab: Moveworks Bender.
🪞 3: Reflecting on This Configuration
Through this lab, you’ve learned the following:
- What Moveworks DSL rules are used for
- What content is available within a Moveworks DSL block (operators, bender methods, relevant context, attributes)
- How to construct & validate a DSL rule
- How to use the DSL Architect to draft complex logic
🧠 4: Knowledge Check
1. What does “context” mean in a Moveworks DSL block?
- Answer: Context is the data object available to the rule. For example,
usercontext gives access to user attributes likedepartmentorrole, whileticketcontext gives access to ticket fields.
2. Why should you always use $LOWERCASE() when comparing text values in DSL?
- Answer: Source data may have inconsistent capitalization (e.g., “IT Support” vs “it support”). Normalizing with
$LOWERCASE()ensures comparisons work regardless of how the data was entered.
3. What are two ways to validate a DSL rule before applying it in production?
- Answer: (1) Use the Validate Syntax button to check for syntax errors, and (2) use the Run button to test the rule against a real user or ticket to confirm expected pass/fail behavior.
4. When would you use the IN operator instead of == in a DSL rule?
- Answer: Use
INwhen comparing a single attribute against multiple allowed values (e.g.,user.department.$LOWERCASE() IN ["it support", "engineering"]). Use==for a single exact match.
⚙️ 5: Configuration Details
DSL Rule to Test: