Monitoring Events
Depending on your use case, any event can be submitted for additional monitoring by mapping the event type to a Source Workflow. When enabled, Alloy stores the data submitted on events and automatically routes all requests for the event type to be evaluated. When taking this approach, you must provide the external_entity_id
or entity_token
in your request (along with the other minimum required fields) so that Alloy can attach the resulting Evaluation and/or Alerts to the correct Entity.
Unlike data-storing events, where only top-level required fields are needed for Alloy schema, additional fields may be required in the supplemental_data
section if you're using 3rd-party services while monitoring.
When a Source Workflow is enabled for an event type, Alloy will return results of the Source Workflow under the evaluations[]
array in the Events response. If you’re using ongoing Journeys, you may also see a record returned in the journey_applications[]
response section.
As an example, you may perform real-time monitoring on transaction
events to assess risk and detect suspicious patterns in behavior:
{
"event_type": "transaction",
"event_lifecycle_id": "e3065d04-95aa-47a1-915c-84b575ff3855",
"event_status": "completed",
"data": {
"external_transaction_id": "e3065d04-95aa-47a1-915c-84b575ff3855",
"external_account_id": "8b75f5e2-b671-450c-9fb2-5aa05c286309",
"external_entity_id": "cf88a0a1-34d6-492d-b617-c8b43785e7b7",
"timestamp": "2023-12-06T13:54:39.735Z",
"is_approved": true,
"transaction_created_date": "2023-12-06T13:54:39.735Z",
"transaction_settled_date": "2023-12-06T13:54:39.735Z",
"amount": -2000000,
"process_method": "Cash",
"category": "Withdrawal",
"interaction_point": "ATM",
"description": "NEW YORK NY #238490 WITHDR 12/6",
"status": "Completed",
"status_detail": "Completed - Posted",
"currency": "USD",
"is_triggered_by_user": false,
"type_code": "ATM01",
"type_description": "ATM Cash Withdrawal",
"counterparty": {
"external_counterparty_id": "BOA NEW YORK NY #238490",
"account_type": "merchant account",
"account_name": "BOA NEW YORK NY #238490 ATM",
"account_number": "BOA NEW YORK NY #238490",
"country_code": "US"
},
"supplemental_data": {},
"meta": {}
}
}
{
"status_code": 201,
"event_request_token": "EV-jalCTa1yXnWqbKYvs05B",
"_links": {
"self": {
"href": "/v1/events/EV-jalCTa1yXnWqbKYvs05B"
}
},
"event": {
"event_type": "transaction",
"event_status": "PROCESSED",
"data": {
"settled_at": null,
"description": "NEW YORK NY #238490 WITHDR 12/6",
"card_process_mode": null,
"device_type_code": null,
"type_code": "ATM01",
"type_description": "ATM Cash Withdrawal",
"is_approved": true,
"approval_code": null,
"is_reversal": null,
"batch_identifier": "EV-jalCTa1yXnWqbKYvs05B",
"meta": null,
"category": "Withdrawal",
"is_triggered_by_user": false,
"is_international_override": null,
"amount": "-2000000",
"interaction_point": "ATM",
"status": "Completed",
"status_detail": "Completed - Posted",
"process_method": "Cash",
"return_code": null,
"return_code_reason": null,
"entry_mode": null,
"iso_message": null,
"response_code": null,
"archived_at": null,
"counterparty": {
"account_type": "merchant account",
"merchant_category_code": null,
"account_class": null,
"country_code": "US",
"entities": [
{
"entity_token": "B-4x8WzjvGz5Oz8RWA6MvY"
}
],
"account_number": "NEW YORK NY #238490",
"counterparty_token": "A-vjyYKdRm4Zm8NnRqa9FI"
},
"external_account_id": "8b75f5e2-b671-450c-9fb2-5aa05c286309",
"account_token": "A-Rbdws17NItHaEy3HrHkL",
"transaction_created_date": "2023-12-06T13:57:58.238Z",
"currency": "USD",
"external_transaction_id": "087ac67e-17ab-4529-8d1a-a8b2214d305f"
},
"evaluations": [
{
"error": null,
"evaluation_token": "L-l09RgNEuI4qkjfAZLfec",
"workflow_token": "IO33FzOq7zNRl9XXchWnPAZIXgAUiRwx",
"workflow_version_id": 2,
"prefiltered": false,
"summary": {
"result": "success",
"outcome": "Needs Investigation",
"tags": [
"Outgoing",
"Anomalous Increase in ATM Withdrawals"
]
},
"_links": {
"self": {
"href": "/v1/evaluations/L-l09RgNEuI4qkjfAZLfec"
}
}
}
],
"journey_applications": [{
"error": null,
"journey_application_token": "JA-EiM42mDnJWlGMR1wSBW2",
"journey_token": "J-FlFujbCsYMUUiXLl5aEX",
"journey_version_id": 1,
"source_evaluation_tokens": [
"L-l09RgNEuI4qkjfAZLfec"
],
"_links": {
"self": {
"href": "/v1/journeys/J-FlFujbCsYMUUiXLl5aEX/applications/JA-EiM42mDnJWlGMR1wSBW2"
}
}
}]
}
}
Check out the Example Scenarios section for more common monitoring use cases and to see how monitored events and data-storing events are used together.
Updated 3 months ago