{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/financekey/json-schema/financekey-finance-key-entity-core-pkg-v-integration-schema.json",
  "title": "FinanceKey.Entity.CorePkg.v_Integration",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/financekey-cores-api-openapi.yml#/components/schemas/FinanceKey.Entity.CorePkg.v_Integration",
  "required": [
    "consentTypeId",
    "entityId",
    "integrationCategoryId",
    "integrationDirectionId",
    "name",
    "scheduleDescription",
    "systemDefnDescription",
    "systemDefnName"
  ],
  "type": "object",
  "properties": {
    "createdById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that created the initial record.",
      "format": "int32",
      "readOnly": true
    },
    "createdOn": {
      "type": "string",
      "description": "The date and time the record was initially created.",
      "format": "date-time",
      "readOnly": true
    },
    "updatedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that last modified the record.",
      "format": "int32",
      "readOnly": true
    },
    "updateOn": {
      "type": "string",
      "description": "The date and time the record was last modified.",
      "format": "date-time",
      "readOnly": true
    },
    "closedById": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The identity of the account that deactivated and closed the record.",
      "format": "int32",
      "readOnly": true
    },
    "closedOn": {
      "type": "string",
      "description": "The date and time the record is to be considered as inactive and closed.",
      "format": "date-time",
      "readOnly": true
    },
    "active": {
      "type": "boolean",
      "description": "A flag that shows if the record is currently active. This values is calculated based on the current date and the record closed date.",
      "readOnly": true
    },
    "rowVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "A unique version stamp of the record.",
      "format": "byte",
      "readOnly": true
    },
    "sessionId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identity of the session that last modified the record.",
      "readOnly": true
    },
    "integrationId": {
      "type": "integer",
      "description": "IntegrationId of data type int is an identity field in the table Integration which will produce an automatically generated, sequential and continuous integer value that uniquely identifies each row of data in the table. The IntegrationId values will uniquely identify each row, allowing for easy referencing and searching. The value of the Identity field will increase incrementally by one each time a new row is inserted into the Integration table.",
      "format": "int32",
      "readOnly": true
    },
    "actionId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "ActionId is the unique identifier for an action in the Integration table. Its data type is an integer. ActionId allows the user to seamlessly identify a specific action within the Integration table to locate and process the required information.",
      "format": "int32"
    },
    "comment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Miscellaneous notes and information for the entry or record."
    },
    "elementId": {
      "maxLength": 256,
      "type": [
        "string",
        "null"
      ],
      "description": "The ElementId field in the Integration table is an nvarchar that stores a unique identifier for each element that is integrated with the system. It has a maximum length of 256 characters."
    },
    "entityId": {
      "maxLength": 450,
      "minLength": 1,
      "type": "string",
      "description": "The internal Entity associated with the Integration. If Inbound, this is the destination Entity. If Outbound, this is the data source."
    },
    "filter": {
      "type": [
        "string",
        "null"
      ],
      "description": "A Linq expression that should be applied as a filter when identifying items to be added to the queue."
    },
    "integrationDirectionId": {
      "maxLength": 450,
      "minLength": 1,
      "type": "string",
      "description": "The direction of the integration"
    },
    "name": {
      "maxLength": 128,
      "minLength": 1,
      "type": "string",
      "description": "Unique Name for the Integration"
    },
    "scheduleId": {
      "type": "integer",
      "description": "The default schedule that should be applied to an enabled client integration.",
      "format": "int32"
    },
    "systemDefnId": {
      "type": "integer",
      "description": "The system into which the integration has been made.",
      "format": "int32"
    },
    "maxAttemptCount": {
      "type": "integer",
      "description": "The maximum number attempts that should be made in order to process an item on the Integration Queue.",
      "format": "int32"
    },
    "actionName": {
      "maxLength": 450,
      "type": [
        "string",
        "null"
      ],
      "description": "ActionName is a field in the Integration table that stores a text description of the action (up to 450 characters) being carried out. This is used to keep track of all integration activities in the system."
    },
    "includeUpdate": {
      "type": "boolean",
      "description": "For outbound integrations, the default is to execute the integration once per row. However, when this box is ticked, the row will also be processed for entity updates. This flag can only be ticked for Integration that are active and outbound, and the continuous update is not ticked."
    },
    "systemDefnName": {
      "minLength": 1,
      "type": "string",
      "description": "The SystemDefnName field in the Integration table is an nvarchar data type field used to store the system definition name assigned to each integration."
    },
    "scheduleDescription": {
      "minLength": 1,
      "type": "string",
      "description": "ScheduleDescription is an nvarchar field in the Integration table that stores text descriptions of the various scheduling items used for integrations."
    },
    "lastPolled": {
      "type": [
        "string",
        "null"
      ],
      "description": "The LastPolled field in the Integration table stores the datetime when the integration was last polled. This information is used to indicate the time that was last checked to ensure that the integration is running properly. This field is deprecated. It will be moved to the ClientIntegration entity.",
      "format": "date-time"
    },
    "parallelExecution": {
      "type": "boolean",
      "description": "When checked the actions on the integration queue will be executed in parallel."
    },
    "consentTypeId": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string",
      "description": "Shows if a consent process should be intitiated when a client enables an integration, and the flow that should be followed. See Consent Type for more details."
    },
    "batchSize": {
      "type": "integer",
      "description": "The batch size is the maximum number of parallel items that will be processed from the queue for this integration.",
      "format": "int32"
    },
    "managed": {
      "type": "boolean",
      "description": "A amangeed integration is managed by FinanceKey, and is common to all clients. When an update is made to a managed integration, it is synchronised to all client tenants."
    },
    "continuous": {
      "type": "boolean",
      "description": "When continuous, the integration needs to be repeatedly executed, even if the row is not updated. An example of this is when the system needs to check for status updates from a remote application. Be sure to include an expiry in the filter. This flag can only be ticked for active outbound integrations where the Include Update flag is already ticked."
    },
    "permitScheduleChange": {
      "type": "boolean",
      "description": "When checked, the client is able to modify the schedule on the enabled client integration."
    },
    "integrationCategoryId": {
      "maxLength": 450,
      "minLength": 1,
      "type": "string",
      "description": "The IntegrationCategoryId field in the Integration table is a nvarchar data type with a maximum length of 450. This field serves as a category identifier for different types of integration projects within the database. It allows for easy organization and categorization of integration items, ensuring efficient data management and retrieval. The field can hold a variety of alphanumeric data, making it a versatile option for categorizing diverse integration projects."
    },
    "actionActionId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The ActionActionId field in the Integration table is used to uniquely identify and categorize different actions within integrated systems. This field is of data type int, meaning it stores integer values that can be incremented or decremented. The values in this field serve as a reference for specific actions and enable efficient organization and retrieval of data from the table. The ActionActionId field allows for seamless integration of various systems, providing a comprehensive view of actions and facilitating data-driven decision making.",
      "format": "int32"
    },
    "systemDefnDescription": {
      "minLength": 1,
      "type": "string",
      "description": "The SystemDefnDescription field is a data type of nvarchar in the Integration table. This field is used to provide a description or explanation for the intended purpose or function of a system within the integration process. It may include details on the specific components, features, or capabilities of the system that are relevant to its role in the integration. The SystemDefnDescription allows for a clear understanding of the purposes and functions of different systems, aiding in the efficient and effective integration of data and processes."
    }
  },
  "additionalProperties": false
}