Skip to content
Developerhome

Auto categorisation

Published   13 June 2023     Less than to read

:

Note: Auto categorisation is currently only available for the European region.

Overview

By default bank rules are added by the customer as a manual process. Banking Service applies these user-created rules as part of a step function at the end of a transaction sync. Adding any predicted actions to the transaction object for the consuming product to use.

With auto categorisation, Banking Service will use Sage AI Labs (SAIL) to automatically generate useful predicted actions and populate the actions without users needing to create this manually.


Auto categorisation setup

Set the ‘autoCategorisation’ field on the feature object to ‘true’ on all the bank account records you want to auto categorise. This can be set on the account body when posting or updating using the bank account endpoint.

"featureObject": {
    "autoCategorisation": true
  }

Learn more about creating an account.

:

Note: Banking Service can set auto categorisation to be enabled for all accounts by product by default if required.

Get transactions

When getting transactions for an account which has autoCategorisation set to true, the predicted actions object will contain all associated SAIL processed actions.

A new Boolean field has been added to the action object named showToUser. This will be a value returned to the Banking Service from SAIL’s API and used to indicate whether the predicted action should be shown to a user or not. You can use this flag to filter out AI-generated rules if required.

For SAIL-processed predicted actions, there’ll be a single accountsPostings, representing a single match in their model. There may be multiple posting instructions depending on what is returned.

Example response

"transactions": [
  {
    "transactionType": "DEBIT",
    "transactionStatus": "posted",
    "datePosted": "2016-06-16T20:12:01.356Z",
    "dateUserInitiated": "2016-06-16T16:12:01.356Z",
    "transactionAmount": 356.23,
    "transactionId": 1,
    "internalId": "2675940c-39ae-4819-abc3-787fe09332b5",
    "transactionHash": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
    "correctionId": "6cf2723d-3119-50a1-8a57-5ddd44d66f70",
    "correctionAction": "replace",
    "referenceNumber": 43543456,
    "name": "Joe Bloggs",
    "feedSource": "auto",
    "payee": {},
    "category": {},
    "transactionNarrative": "Example narrative",
    "accountsPostings": [],
    "providerAdditionalFields": [],
    "predictedActions": [{
      "predictionId": "b42fd2fc-7ba4-468d-82bc-22deb3197b66",
      "score": 100,
      "source": "SAIL",
      "showToUser": true,
      "action": {
        "accountsPostings": [
          {
            "createdBy": "SAIL",
            "postingInstructions": [
              {
                "type": "dimension_tag",
                "code": "XXX"
              }
            ]
          }
        ]
      }
    }]
  }
]

Was this helpful?