Order Interactions

Use the asOrder() serialization function to specify the sort order in a SAQL query.

Let’s look at an example where the selection in a toggle widget determines the sort order in a SAQL query.

Given this data from a source query:

To order by a single field, apply this order logic. When you don’t specify the direction in the query, the default is ascending.

After CRM Analytics evaluates the interaction, the grouping becomes:

To order by multiple fields, use this grouping logic.

After CRM Analytics evaluates the interaction, the grouping becomes:

To specify the order and the direction, use this grouping logic.

After CRM Analytics evaluates the interaction, the grouping becomes: