Skip to main content
Version: 19

Callback-related actions

Business goal​

The actions below make it possible to send callbacks to external systems, with support for OAuth authentication.

Configuration​

To trigger a callback on a certain event, you need to add 2 event actions:

  • TriggerCallbackEventV2: This action will define the content of the callback and schedule a callback for execution (scheduled event type 'SEND_CALLBACK').
  • SendCallbackV2: This system action will handle the scheduled callback by sending it to the external system.

There is another action available to send callbacks when a failure occurs during an automation:

  • SendCallbackOnFailureV2: This action will send a callback when an automation fails, allowing the external system to be notified of a failure.

Settings​

General settings related to the API call itself (only applicable for TriggerCallbackEvent and SendCallbackOnFailure):

  • callBackUrl:

  • authentication: If configured, it ensures that the configured authentication is used for the callback. This is an object that contains following fields:

    • BASIC_AUTH: Uses basic authentication
      • username: Username
      • password: Password
    • BEARER_TOKEN: Uses a pre-specified bearer token
      • bearerToken: Token, only required for BEARER_TOKEN
  • href: Adds a link to the callback body. Usually a reference to this dossier for retrieval via the API gateway.

TriggerCallbackEventV2​

To adapt the content of the callback body, you can use the following settings:

  • message: An optional custom message that should be used on the callback
  • type: An optional type that can be used.
  • requiredStatus: Modifies the status to UNSUCCESSFUL when the dossier status does not match this property.
  • rbaScoreAvailable: Modifies the status to UNSUCCESSFUL when the RBA on the dossier is not available.
  • rbaScoreUpToDate: Modifies the status to UNSUCCESSFUL when the RBA on the dossier is not up to date.

SendCallbackV2​

No additional settings are required for this action.

SendCallbackOnFailureV2​

  • triggeringEventType: If set, the callback will only be sent if the event that caused the failure matches this type.

Example(s)​

Note: For the below examples, only the settings are shown, the events need to be properly configured referring to the correct classes and matching the correct events and enum types.

SendCallbackOnFailureV2: Send a callback when a failure occurs in the automation process after a dossier has been updated via the API gateway
{
"href": "/financial-sps/$fo.ref/dossiers/$dossier.ref",
"triggeringEventType": "GATEWAY_DOSSIER_UPDATED"
}
TriggerCallbackEventV2: Send a callback message when the assignee changed for a certain dossier
{
"href": "/financial-sps/$fo.ref/dossiers/$dossier.ref",
"message": "Dossier assignee changed",
"type": "DOSSIER_ASSIGNEE_CHANGED"
}
TriggerCallbackEventV2: Send a callback message when a dossier is submitted, using OAuth authentication
{
"authentication": {
"OAUTH_CLIENT_CREDENTIALS":{
"tokenUrl": "https://api/token",
"clientId": "client",
"clientSecret": "secret"
}
},
"href": "/financial-sps/$fo.ref/dossiers/$dossier.ref",
"message": "DOSSIER_SUBMITTED"
}