Once you've queried records, you can use that data to make intelligent decisions in your workflow. Here are three common patterns:
Escalate repeat offenders: Query for previous alerts from the same user. If they've triggered more than three alerts in the past week, escalate to a manager:
<<IF(SIZE(query_records.body.record_results) > 3, "escalate", "standard")>>Skip duplicate requests: Check if the same user already submitted a similar software request this month. If so, skip creating a new case:
<<SIZE(query_records.body.record_results) == 0>>Calculate trends: Compare current values to historical averages to identify anomalies. Use
MAPto extract a specific field's values from your query results, then useAVERAGEto calculate the mean and compare it against the incoming event data.