Rule types

🚧

Removing non-reference data from webhook alerts body

In line with industry security practices, we have removed personally identifiable information (such as companyName) from the body of our alert webhooks, leaving 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 has 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":"9e0cc03b-3868-4543-98c0-568f0f1b12a3",
      "newStatus":"Linked",
      "oldStatus":"PendingAuth"
   }
}

Company status has changed

Trigger: A company's status changes
Additional data: newStatus, oldStatus

{
   "CompanyId":"eb564082-befc-4084-968a-816f6a2df730",
   "RuleId":"de1c02ae-ee10-4b5a-b0db-e8637534cf4c",
   "RuleType":"CompanyStatusChanged",
   "AlertId":"83e7aa73-7d2a-4ca3-a6e5-3dff495be0f5",
   "Message":"Company status changed from PendingAuth to Linked",
   "Data":{
      "newStatus":"Linked",
      "oldStatus":"PendingAuth"
   }
}

Data sync completed

Trigger: Data synchronisation is completed
Additional data: dataType, datasetId

{
   "CompanyId":"323b5a69-6366-45ec-85fa-16f321a17d5b",
   "RuleId":"1903bbb6-e6ab-4edb-8080-62239a1705f0",
   "RuleType":"Data sync completed",
   "AlertId":"696c6495-a88a-4c24-99f1-dee3f16990dc",
   "Message":"Data sync of type company completed for company 323b5a69-6366-45ec-85fa-16f321a17d5b",
   "Data":{
      "datasetId":"8ee17d26-ac12-4e2d-92d0-a90147958ee3"
   }
}

Dataset data has changed

Trigger: A dataset has completed and caused changes in Codat's data cache
Additional data: dataType, datasetId

Note: This rule is not supported for the Profit and Loss or Balance Sheet data types.

{
  "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: A new company is synchronised 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(All)",
   "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 has 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?