MWDSL & Bender
Two mini-languages appear throughout the Configuration API: MWDSL (fields ending _dsl — access rules, filters, enablement toggles) and Bender (fields named *_bender — data mappings). Both are validated at write time.
MWDSL
An expression language evaluated against a payload (for most config fields: the requesting user).
Operators (decreasing precedence): () · . [] accessors · * / · + - · == != > >= < <= IN NOT IN · NOT · AND · OR · IF … THEN … ELSE …. Keywords are case-insensitive.
Literals: "text", 123, 2.5, TRUE/FALSE/NULL, [a, b], {"k": v}.
Attributes: bare identifiers resolved against the payload — user.email_addr, user.department, user.manager, user.user_tags, user.custom_data.<your attribute>. Negative indices and slices work: items[-1], text[0:5].
Functions: $NAME(args) or postfix value.$NAME(args). Catalog: $LOWERCASE $UPPERCASE $TRIM $CONCAT $SPLIT $REPLACE $STARTS_WITH $ENDS_WITH $MATCH (regex) $MAP $FILTER $ANY $ALL $FIND $REDUCE $LENGTH $COALESCE $TIME $PARSE_TIME $FORMAT_TIME $ADD_DATE $TEXT $INTEGER $DECIMAL $PARSE_JSON $URLENCODE … Lambdas as function args: x => expr.
There is no $CONTAINS — use the IN operator ("sub" IN text = substring, item IN list = membership). Regex = $MATCH.
Semantics: "", 0, NULL, FALSE, [], {} are falsy. AND/OR short-circuit and return a value. "true" = enabled for everyone; "false" = disabled.
Examples
Bender (short form)
A JSON data-mapping language. Three rules:
- A bare string is an MWDSL expression — so string constants must be quoted inside it:
{"entity_type": "\"PERSON\""}. - A JSON object maps output keys (dotted nested paths allowed) to sub-benders; a JSON array builds a list.
- Function calls are single-key objects with an UPPERCASE
FUNC()key:EVAL() FLATTEN() MERGE() MAP() SORT() COALESCE() FILTER() CONDITIONAL() LOOKUP() CONCAT() RENDER() STRIP_HTML().
Examples
Simple mapping (e.g. live-agent url_params_bender):
Lookup + loop (MAP() exposes the loop value as item):
Conditional with fallback:
dl_group_validation_bender in Group Access Settings takes the long form only. For example, to pass the group name through: {"object": {"children": {"name": {"simple_eval": {"expression": {"rule_v2": "group.name"}}}}}}. Every other Data Mapper field accepts the short form shown above.