Skip to content
Go to Dashboard

Using Conditional step Operators

Using Conditional step Operators

When configuring conditions in a Conditional Step, you can apply Operators to build more advanced logic. Operators allow you to manipulate or evaluate data values before your condition is evaluated. This enables more flexible comparisons, such as counting items in an array, checking if a string includes certain characters, extracting email domains, filtering related objects, and more.

You can combine Operators into method chains, where one function operates on the output of the previous one. This allows you to work with complex data structures when defining route logic inside a Conditional Step.

Method Chains

FunctionDescriptionArgument TypesReturnsExample
.countReturns the number of items in an array. Must follow a method chain that produces an array.Number
.firstReturns the first item of an array. Must follow a method chain that produces an array.Item from Array
includes()Returns TRUE if a specified item is inside the array. Must follow a method chain that produces an array.Boolean
.lastReturns the last item of an array. Must follow a method chain that produces an array.Item from Array
domain(email_string)Returns the domain of an email address.Email stringString
username(email_string)Returns the username of an email address.Email stringString
length(string)Returns the character count of a string.StringNumber
replace-allReplaces all instances of a specified string (string1) with a different string (string2).StringString
replace-charsReplaces individual characters in a string based on specified mapping.String, MappingString
replacementSpecifies the replacement value in a replace-chars operation.StringString
to-be-replacedSpecifies the string to be replaced in a replace-chars operation.StringString
characters-to-be-replacedCharacters in the input string to be replaced.StringString
splitSplits a string into an array using a delimiter.String, DelimiterArray
delimiterThe character used to split a string.StringString
trim(string)Removes leading and trailing spaces in a string.StringString
collect_from_each(object)Returns array of related objects, including traversing multi-hop relations.ObjectArraycurrent_case.accounts.collect_from_each(inquiries)
Returns inquiries related to accounts related to current case
filter('key', 'operator', 'value')Returns only items in array that meet the criteria specified. Must follow a method chain that produces an array.String, Operator, ValueArraycurrent_case.accounts.collect_from_each(inquiries).filter(foo=bar)
Returns inquiries where foo = bar
sort_asc(key)Sorts array by key in ascending order. Must follow a method chain that produces an array.StringArraycurrent_case.accounts.collect_from_each(inquiries).sort_asc(created_at)
Sorts inquiries ascending by created_at
sort_desc(key)Sorts array by key in descending order. Must follow a method chain that produces an array.StringArraycurrent_case.accounts.collect_from_each(inquiries).sort_desc(created_at)
Sorts inquiries descending by created_at
page_size(number)Sets array page size. If not set, default is 100. Max supported size is 200.NumberArraycurrent_case.accounts.collect_from_each(transactions).page_size(200)
page_number(number)Sets which page of results to display when array items > 200. Max supported page number is 100.NumberArraycurrent_case.accounts.collect_from_each(transactions).sort_desc(created_at).page_number(2)
Was this article helpful?
Thanks for the feedback — it helps us improve these docs.