Skip to main content

API - Rule Execution

Authentication required

Before calling this API, ensure you have a valid Bearer token. See API Authentication for how to obtain one.

The Rule Execution API allows triggering the execution of scheduled rules for a specific date, typically after a batch upload is completed.

Important

When using the endpoint to run rules outside of their schedules, execution_date needs to be a past date.

If you need a business rule to run again in the same day, set the force flag to true.

Execution Modes

Executes the scheduled rules that are due on the provided execution_date.

  • Only execution_date provided All live rules scheduled for that date will be executed.
  • execution_date + rule_ids provided

Only the specified live rules scheduled for that date will be executed.

info
  • Rule Scheduling: Rule execution is determined by the scheduled day configured within the business rule manager. For example, if the execution endpoint is called on November 22nd, it will process all live rules scheduled to run on November 22nd, irrespective of the time of day.
  • Multiple Daily Runs: To execute the same rule more than once within a single day, the rule execution must be triggered again for that specific rule.
  • The force flag cannot override a rule's schedule. If a rule is not scheduled for the specified date, it will not execute regardless of the force setting.

Response Details

The response includes two lists:

  • accepted_rules: Rules that will be executed for the given execution_date.
  • rejected_rules: Rules that will not be executed. Each rejection includes a reason - review these carefully.

Rule Rejection Reasons

  • Rule is not live
    Returned when rule_ids are provided and a requested rule is not in the current live rules set.
  • Rule is not scheduled to run on <date>
    Returned when a requested rule is live but its schedule does not match the requested execution_date.
  • Rule has already run for <date>
    Returned if the rule already has an execution record for the specified date and force=false. To run the rule again, set the force flag to true.
note

If rule_ids are not provided (i.e., all scheduled rules are executed), the only per-rule rejection reason is “Rule has already run for <date>

Using execution_id for Monitoring

When rules are accepted for execution (HTTP 202 or HTTP 207), the response includes an execution_id and a list of accepted_rules. This information can be used to monitor execution progress using the Rule Execution Status endpoint or the Observability API.

Execution Timing

Rule execution does not occur immediately if transaction or entity ingestion processes are still in progress. Once ingestion is complete, the rules will automatically execute based on the submitted request.


Loading ...