A decision is the main ressource to interact with.

It contains an outcome, as well as details (scenario, score, rules) that you can use to trigger specific actions in your application.

AttributeDescription
id
string
ID of the decision.
app_link
url
Link to the app with the detail of the decision, including intermediate values.
created_at
timestamp
Time at which the object was created (received by Marble, before executing scenarios).

Measured in seconds since the Unix epoch.
trigger_object
object(trigger_object)
Trigger object data, for example a full transaction.
trigger_object_type
string
Trigger object type, for example transaction.
outcome
ENUM(string)
approve, decline, review, null

null if the scenario could not compute a score.
scenario
object(scenario)
Scenario that was executed.
See scenario.
rules
array[rule]
Array of rules executed in the scenario.
See rule.
score
int
Score computed by the scenario (sum of all score_modifier of rules that evaluated totrue).

Only present if outcome != null.
scheduled_scenario_execution_id
string
ID of the scheduled scenario execution.

Only present if the decision was created by a scheduled scenario execution

scenario


The scenario shows details about the scenario executed.

This is mainly useful to display its information in a third-party system, like a case manager.

AttributeDescription
id
string
ID of the scenario.
name
string
Name of the scenario.
description
string
Description of the scenario.
scenario_iteration_id
string
Unique identifier of the scenario version use in this decision
version
string
Version of the scenario.

rule


The rule provides all the detail of the rules that were computed to produce an outcome.

This is mainly useful to display its information in a third-party system, like a case manager.

AttributeDescription
name
string
Name of the rule.
description
string
Description of the rule.
score_modifier
int
If the rule is true, this is added to the scenario's score.
result
bool
Did the rule evaluate to true or false ?
rule_id
string
Unique identifier of the rule version used in this decision
error
object
Error when executing the rule.
See error.

error


The error provides more context when a scenario was not able to produce an outcome, or a rule was not able to produce a score.

Note that error == null if Marble was able to produce an outcome (ie when decision.outcome != null).

AttributeDescription
code
int
Machine-readable error code.
message
string
Human-readable error message.

Possible errors on the decision object:

codemessage
100Scenario was not able to compute a score because all rules failed.

Possible errors on the rule object:

codemessage
200A field ({field name}) in rule is empty or missing