Rule types

🚧

Removing non-reference data from webhook alerts body

In line with industry standard security practices, we have removed personally identifiable information, such as companyName, from the body of our alert webhooks. This leaves only referential information, such as companyId, which can be looked up using our API.

The following rules can be configured in the Codat Portal to alert you to events affecting your companies and data.

Company data connection status changed

Trigger: A data connection's status changes.
Additional data: dataConnectionId, platformKey, newStatus, oldStatus.

{
   "CompanyId":"0ec09c80-e82b-4409-a150-5a5211c215f4",
   "RuleId":"ca3b6004-f1bb-43e7-860f-1386e108b684",
   "RuleType":"DataConnectionStatusChanged",
   "AlertId":"40eda3e2-f098-47bd-b7d5-b6b08ae3819e",
   "Message":"Data connection for SandBox status changed from PendingAuth to Linked",
   "Data":{
      "dataConnectionId":"4ecd1cb4-9048-4459-b692-7de1fffb480a",
      "platformKey":"sandbox",
      "newStatus":"Linked",
      "oldStatus":"PendingAuth"
   }
}

Data sync completed

Trigger: Data synchronisation is completed; a notification will be generated for each dataType as the sync completes.
Additional data: dataType, datasetId.

{
    "CompanyId": "7626befb-0c7d-49a4-9366-bc4c81b4e4b7",
    "ClientId": "a9244b9d-7055-48f4-80a4-b758d39da98c",
    "ClientName": "Client",
    "DataConnectionId": "3d56b944-ff98-4d6b-94cd-fa879db3b74f",
    "RuleId": "92a65d4c-5d54-4f92-8f43-30cbe30bb86b",
    "RuleType": "Data sync completed",
    "AlertId": "5e364626-6b3d-41ed-9697-0b3b59603d8f",
    "Message": "Data sync of type creditNotes completed for company 7626befb-0c7d-49a4-9366-bc4c81b4e4b7",
    "Data": {
        "dataType": "creditNotes",
        "datasetId": "1541a5ee-0d84-4b6e-a7f7-c07c1f216333"
    }
}

Dataset data changed

Trigger: A dataset synchronisation has completed and this has resulted in updates within Codat's data cache - this could be through the creation of new records or a change to existing records.
Additional data: dataType, datasetId.

{
  "CompanyId": "ac712d04-c107-424d-a801-be76d677e508",
  "RuleId": "70328e0e-9d8d-48fd-9306-7a39973009c3",
  "RuleType": "Dataset data changed",
  "AlertId": "bbdbc217-9776-4cf2-9b67-0afad20bd10e",
  "Message": "Data has changed for dataset type invoices, company ac712d04-c107-424d-a801-be76d677e508",
  "Data": {
    "dataType": "invoices",
    "datasetId": "e05b0e4b-98f6-48e8-a231-f0720e644f26"
  }
}

Dataset status has changed to an error state

Trigger: The synchronisation of a dataset fails.
Additional data: dataType, datasetStatus, datasetId.

{
   "CompanyId":"0ec09c80-e82b-4409-a150-5a5211c215f4",
   "RuleId":"ca3b6004-f1bb-43e7-860f-1386e108b684",
   "RuleType":"Data Sync Status Changed to Error",
   "AlertId":"40eda3e2-f098-47bd-b7d5-b6b08ae3819e",
   "Message":"ERROR: syncing payments triggered a ProcessingError notification at 2020-04-21T12:12:57.4250446Z ",
   "Data":{
      "dataType":"payments",
      "datasetStatus":"ProcessingError",
      "datasetId":"8ee17d26-ac12-4e2d-92d0-a90147958ee3"
   }
}

New company synchronised

Trigger: After a new company has successfully synchronised at least one dataType for the first time.

{
    "CompanyId": "0ec09c80-e82b-4409-a150-5a5211c215f4",
    "RuleId": "dba7daa5-be88-40ae-a596-d23549498b17",
    "RuleType": "New company synchronised",
    "AlertId": "e848c2a1-ad15-41eb-915b-7a67c269bd2a",
    "Message": "Company 0ec09c80-e82b-4409-a150-5a5211c215f4 synced for the first time",
    "Data": {}
}

Push operation status has changed

Trigger: A push operation's status changes.
Additional data: dataType, status, pushOperationKey.

{
   "CompanyId":"f6bc5f14-87fb-438f-8d2d-db6a0964aef1",
   "RuleId":"c40791fe-b6fd-45c3-9bf7-0a16abf1b8fd",
   "RuleType":"Push Operation Status Changed()",
   "AlertId":"a62bfb38-d73c-4aab-9bb6-d8014bba5f29",
   "Message":"invoices triggered notification for PushOperationStatusChanged at 2019-05-22T18:19:42.742Z",
   "Data":{
      "dataType":"invoices",
      "status":"Success",
      "pushOperationKey":"476afa1c-9f27-4def-bf0d-0914ad89ed27"
   }
}

Push operation has timed out

Trigger: A push operation times out.
Additional data: dataType, pushOperationGuid.

{
   "CompanyId":"f6bc5f14-87fb-438f-8d2d-db6a0964aef1",
   "RuleId":"c40791fe-b6fd-45c3-9bf7-0a16abf1b8fd",
   "RuleType":"Push Operation Timed Out",
   "AlertId":"a42bff38-d73c-4aab-9bb6-d8014bba5f29",
   "Message":"ERROR: pushing invoices never finished in time, timing out at 2020-09-07T08:42:13",
   "Data":{
      "dataType":"invoices",
      "pushOperationGuid":"476afa1c-9f27-4def-bf0d-0914ad89ed27"
   }
}

Did this page help you?