Monitoring Alerts
Monitoring generates alerts when it detects changes on your entities. This guide covers how to fetch alerts, investigate the underlying changes that triggered them, and resolve them.
For adding entities to monitoring and basic alert handling, see the Companies or Private persons example.
Fetch alerts
Use the alerts query to list alerts. You can filter by entity, alert kind, state, time period, and entity kind:
query GetUnresolvedAlerts {
alerts(
where: {
states: [UNRESOLVED]
page: { size: 20 }
}
) {
edges {
node {
id
kind
insertedAt
computedAt
state
}
monitoredEntity {
... on Company {
id
name
}
... on PrivatePerson {
id
name
}
}
}
pageInfo {
totalSize
nextPageOffset
}
}
}Filter by alert kind
Filter to specific change types using kinds:
query GetSanctionAlerts {
alerts(
where: {
kinds: [SANCTION]
states: [UNRESOLVED]
page: { size: 20 }
}
) {
edges {
node {
id
kind
computedAt
}
monitoredEntity {
... on Company {
id
name
}
}
}
}
}Filter by entity
Fetch alerts for a specific entity:
query GetEntityAlerts {
alerts(
where: {
entity: "<entity_id>"
states: [UNRESOLVED]
page: { size: 20 }
}
) {
edges {
node {
id
kind
computedAt
}
}
}
}Investigate alert details
Use the alertData query to see
exactly what changed. The change field structure depends on
the alert kind.
PEP changes
When a PEP (Politically Exposed Person) status changes on a related person:
query InvestigatePepAlert {
alertData(alert: "<alert_id>") {
monitoredEntity {
... on Company {
id
name
}
}
kind
computedAt
change {
... on CompanyPepChange {
kind
pepChanges {
person {
... on BusinessPerson {
id
name
}
}
relationsToMonitoredEntity
toValue {
pep
rca
hits {
name
roles {
description
startDate
endDate
}
countries {
name
}
}
}
fromValue {
pep
rca
}
}
}
}
}
}The fromValue and toValue fields show the previous and
new state, letting you see exactly what changed.
Sanction changes
When sanction status changes on the entity or a related person:
query InvestigateSanctionAlert {
alertData(alert: "<alert_id>") {
monitoredEntity {
... on Company {
id
name
}
}
kind
change {
... on CompanySanctionChange {
kind
sanctionChanges {
entity {
... on BusinessPerson {
id
name
}
... on Company {
id
name
}
}
relationsToMonitoredEntity
toValue {
sanctioned
sanctions {
sanctionedBy
program
sourceUrl
sanctionedSince
}
}
fromValue {
sanctioned
}
}
}
}
}
}Ownership and role changes
When company relationships change (new officers, ownership changes, beneficial owner updates):
query InvestigateRelationsAlert {
alertData(alert: "<alert_id>") {
monitoredEntity {
... on Company {
id
name
}
}
kind
change {
... on CompanyRelationsChange {
kind
roleChange {
toValue {
roleTitle
isActive
period {
from
to
}
entity {
... on BusinessPerson {
id
name
}
}
}
fromValue {
roleTitle
isActive
}
}
ownershipChange {
toValue {
totalSharePercentage {
from
to
}
entity {
... on BusinessPerson {
id
name
}
... on Company {
id
name
}
}
}
fromValue {
totalSharePercentage {
from
to
}
}
}
beneficialOwnerChange {
toValue {
reasons
entity {
... on BusinessPerson {
id
name
}
}
}
}
}
}
}
}Resolve alerts
After investigating, use the alertUpdate mutation to mark alerts as resolved:
mutation ResolveAlerts {
alertUpdate(
where: {
ids: ["<alert_id_1>", "<alert_id_2>"]
state: RESOLVED
}
) {
success
}
}You can also reopen a previously resolved alert by setting
the state back to UNRESOLVED.