Skip to main content

DynamoDB Schema

Amazon DynamoDB is a NoSQL database service designed for high-performance, scalable, and low-latency applications.

In a DynamoDB table, the primary key is a fundamental component of the database schema, used to uniquely identify and organize items within a table. The primary key consists of two attributes: the partition key (PK) and the sort key (SK). The partition key is the primary attribute used to distribute data across multiple partitions for scalability.

The table may also include Global Secondary Indexes named using the prefix (GSI) which can be employed to facilitate efficient querying of data based on different attributes.

This page describes the DynamoDB item patterns used by FormKiQ. It is intended for troubleshooting, reporting, migration planning, and architectural review. Application integrations should normally use the FormKiQ APIs instead of reading or writing these tables directly.

Multi-Tenant

When an entity is stored for a specific SiteId other than the default site, the format of the PK is prefixed with SiteId/.

For example: When using a siteId of finance, the PK will store a document using finance/docx#.

This prefixing pattern keeps data for separate sites logically isolated while still allowing the same table design to support single-site and multi-site deployments. When reviewing records, always confirm whether a key is scoped to the default site or a named site.

Sites

The following entities define sites and site-level permissions. A site is the primary logical boundary for document access, metadata, and tenant-style partitioning in FormKiQ.

Sites

The Sites entity stores the site record itself, including display information and lifecycle status. It is used when listing available sites, validating whether a site is active, and enforcing site-scoped behavior across documents and users.

Entity Key Schema

AttributesFormat
PK"sites"
SK"sites#" + siteId
GSI1PK"sites"
GSI1SK"sites#" + status + "#" + siteId

Entity Attributes

AttributesDescription
siteIdSite Id
titleSite Title
statusSite Status (ACTIVE / INACTIVE)

Group Permissions

The Group Permissions entity maps a group to the site permissions that group receives. It supports role-based access decisions by connecting identity-group membership to site-level capabilities such as read, write, delete, or administrative behavior.

Entity Key Schema

AttributesFormat
PK"sitegroups"
SK"group#" + groupName + "#site#" + siteId
GSI1PK"sitegroups"
GSI1SK"site#" + siteId + "#group#" + groupName

Entity Attributes

AttributesDescription
groupNameName of Group
siteIdSite Id
permissionsList of Group permissions for site

Documents

The following entities store document metadata, lifecycle state, processing state, tags, attributes, and document-related module results. Document content is stored in Amazon S3; DynamoDB stores the metadata and indexes required to manage and find that content.

Document

The Document entity is the primary metadata record for a stored document. It connects the user-facing document identifier to its path, content type, S3 version, checksum information, user ownership, and date fields used for listing and audit-style queries.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"document"
GSI1PKShortDate(yyyy-MM-ddd)
GSI1SKFullDate("yyyy-MM-dd'T'HH:mm:ssZ") + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
inserteddateInserted Date
lastModifiedDateLast Modified Date
userIdCreate by user
pathDocument path
deepLinkPathDocument deep link path
metadataKey / Value with Key starting with "md#"
contentTypeMime Content Type
contentLengthContent Length
checksumDocument content checksum
checksumTypeDocument content checksum type
s3versionDocument Content S3 version

Child Document

A Child Document entity represents a relationship between a parent document and a subsidiary or derived document. This pattern is used when one document is associated with another document as part of a larger document set, generated output, extraction result, or related processing flow.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"document#" + childDocumentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
belongsToDocumentIdParent Id of document

Document (Soft Delete)

A soft-deleted document is moved into a separate key namespace so it no longer appears in normal active-document queries. The record can still retain enough metadata to support deleted-document listings, restore behavior, audit review, and retention workflows.

Entity Key Schema

AttributesFormat
PK"softdelete#docs#"
SK"softdelete#document" + documentId
GSI1PKShortDate(yyyy-MM-ddd)
GSI1SKFullDate("yyyy-MM-dd'T'HH:mm:ssZ") + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
inserteddateInserted Date
lastModifiedDateLast Modified Date
userIdCreate by user
pathDocument path
deepLinkPathDocument deep link path
contentTypeMime Content Type
checksumDocument content checksum
tagSchemaIdTag Schema for document

Document OCR

The Document OCR entity stores OCR processing metadata for a document. It tracks which OCR engine was used, whether the OCR request succeeded, failed, or was skipped, and any job identifier needed to connect the FormKiQ document record to asynchronous OCR processing results.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"ocr#"

Entity Attributes

AttributesDescription
documentIdDocument Identifier
inserteddateInserted Date
userIdCreate by user
contentTypeMime Content Type
ocrEngineOcr Engine Used (textract, tesseract)
ocrStatusOcr Status (failed, requested, skipped, successful)
jobIdOcr Job Id
ocrOutputTypeOcr Output Type (CSV)

Document Actions

Document Actions store queued or completed processing requests for a document. Actions are used for automation such as OCR, full-text extraction, webhooks, notifications, antivirus scanning, ruleset execution, or workflow-related processing.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"action#" + idx + "#" + type
GSI1PK"action#" + type + "#" + queueId
GSI1SK"action#" + documentId + "#" + yyyy-MM-dd'T'HH:mm:ssZ
GSI2PK"actions#" + status
GSI2SK"action#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
typeType of Action
statusStatus of Action
parametersParameters for Action
metadataMetadata for Action
userIdCreate by user
inserteddateInserted Date
startDateStart Date of action
completedDateCompleted Date
messageAction message
queueIdQueue Id
retryCountaction retry count
maxRetriesMaximum number of retries
workflowIdWorkflow Id
workflowStepIdWorkflow Step Id
workflowLastStepWorkflow Last Step

Document Sync

Document Sync records track synchronization work between FormKiQ and an external service or module. They provide status, service, type, and message fields so synchronization attempts can be listed, retried, audited, or diagnosed.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"syncs#" + yyyy-MM-dd'T'HH:mm:ssZ
GSI1PK"doc#syncs#" + service + "#" + status + "#"
GSI1SK"sync#" + type + "#" + yyyy-MM-dd'T'HH:mm:ssZ + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
serviceService synced to
syncDateSync Date
userIdCreate by user
statusStatus of Sync
typeType of data synced
messagesync message

Document Tag

Document Tag records support legacy key-value metadata for documents. They are indexed so documents can be found by tag key and tag value without scanning all document records.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"tags#" + tagKey
GSI1PK"tag#" + tagKey + "#" + tagValue
GSI1SK"yyyy-MM-dd'T'HH:mm:ssZ" + "#" + documentId
GSI2PK"tag#" + tagKey
GSI2SKtagValue + "#" + yyyy-MM-dd'T'HH:mm:ssZ + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
typeType of Tag
tagValueTag Value
userIdCreate by user
inserteddateInserted Date

Document Tag (Multi-Value)

Document Tag (Multi-Value) records support tags where a single key can have more than one value. The indexed value pattern allows each value to participate in tag search while preserving the document-level relationship to the original tag key.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"tags#" + tagKey + "#idx" + index
GSI1PK"tag#" + tagKey + "#" + tagValue
GSI1SK"yyyy-MM-dd'T'HH:mm:ssZ" + "#" + documentId
GSI2PK"tag#" + tagKey
GSI2SKtagValue + "#" + yyyy-MM-dd'T'HH:mm:ssZ + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
typeType of Tag
tagValueTag Value
tagValuesTag Values
userIdCreate by user
inserteddateInserted Date

Document Attribute

Document Attribute records store structured metadata values attached to documents. Attributes support typed values and are the preferred metadata model for validation, filtering, workflow decisions, and richer document classification.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"attr#" + key + "#" + value
GSI1PK"doc#attr#" + key
GSI1SKvalue
GSI2PK"docs#" + documentId
GSI2SK"attr#" + valueType + "#" + key

Entity Attributes

AttributesDescription
documentIdDocument Identifier
keyattribute key
indexattribute index
valueTypeType of Attribute (string, number, boolean, watermark (GSI2), publication)
stringValuestring value
numberValuenumber value
booleanValueboolean value

Document Data Classification Result

Document Data Classification Result records store the output of classification or LLM-assisted classification processing for a document. They preserve the prompt/entity name, generated content, extracted attributes, and audit fields needed to understand when and how classification was produced.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"llmresult#" + TIMESTAMP + "#" + llmPromptEntityName

Entity Attributes

AttributesDescription
documentIdDocument Identifier
llmPromptEntityNameLLM Prompt Entity Name
contentResult from the LLM Prompt
attributesList of Attributes found in the LLM prompt result
inserteddateInserted Date
userIdCreate by user

Document Metadata Extraction Result

Document Metadata Extraction Result records store extracted metadata produced from document processing. These records make extraction output available for review, later automation, and comparison across multiple extraction runs for the same document.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"mdextractionresult#" + llmPromptEntityName + "#" + TIMESTAMP
GSI1PK"docs#" + documentId
GSI1SK"mdextractionresult#" + TIMESTAMP + "#" + llmPromptEntityName

Entity Attributes

AttributesDescription
documentIdDocument Identifier
llmPromptEntityNameLLM Prompt Entity Name
contentResult from the LLM Prompt
attributesList of Attributes found in the LLM prompt result
inserteddateInserted Date
userIdCreate by user

Document MalwareScan Result

Document MalwareScan Result records store the outcome of malware or antivirus scanning for a document version. They help determine whether a file was clean, malicious, or failed scanning and preserve the scan engine and S3 version associated with the result.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"malware#result#" + TIMESTAMP + "#" + ID

Entity Attributes

AttributesDescription
documentIdDocument Identifier
scanStatusMALICIOUS, ERROR, CLEAN
engineMalware Scan Engine
s3versionS3 version id
inserteddateInserted Date

Document Publication

Document Publication records store publication-specific information for documents that are exposed through a publication workflow or public-facing document path. They connect the published path and content type back to the source document and S3 version.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"publication"

Entity Attributes

AttributesDescription
pathDocument Path
contentTypeDocument Content-Type
s3VersionDocument S3 Version Key
documentIdDocument Identifier
userIdCreate by user

Resource User Activity

User Activities refers to the tracking and logging of actions performed on document/entities within a system.

These activities typically include operations such as CREATE, VIEW, DELETE, and MODIFY, allowing administrators or users to monitor the lifecycle and interactions with documents.

This tracking provides visibility into who accessed or altered a document, when the action occurred, and what changes were made. Document Activities are crucial for auditing, security, compliance, and overall document management, ensuring accountability and transparency in document usage.

Resource user activity is broader than document-only activity. It can capture actions against documents, entity types, entities, and other managed resources so administrators can review activity by resource, user, and date.

note

These attributes are stored in the "audit" DynamoDB table.

EntityType Activity Key Schema

EntityType activity keys store audit records for actions performed against entity type definitions. They support lookups by entity type, user, and activity date.

AttributesFormat
PK"entityType#" + entityTypeId
SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityTypeId + "#" + ulid
GSI1PK"activity#user#" + username
GSI1SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityTypeId + "#" + ulid
GSI2PK"activity#" + yyyy-MM-dd
GSI2SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityTypeId + "#" + ulid

Entities Activity Key Schema

Entities activity keys store audit records for actions performed against individual entity records. They support entity-level timelines and user/date-based activity queries.

AttributesFormat
PK"entity#" + entityTypeId + "#" documentId
SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityId + "#" + ulid
GSI1PK"activity#user#" + username
GSI1SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityId + "#" + ulid
GSI2PK"activity#" + yyyy-MM-dd
GSI2SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + entityId + "#" + ulid

Document Activity Key Schema

Document activity keys store audit records for document actions. They support document timelines as well as cross-document activity views by user and date.

AttributesFormat
PK"doc#" + documentId
SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + documentId + "#" + ulid
GSI1PK"activity#user#" + username
GSI1SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + documentId + "#" + ulid
GSI2PK"activity#" + yyyy-MM-dd
GSI2SK"activity#" + yyyy-MM-dd'T'HH:mm:ss + "#" + documentId + "#" + ulid

Activity Attributes

Activity attributes describe the actor, resource, operation, status, source, and change details associated with an activity record.

AttributesDescription
siteIdSite Identifier
resourceActivity Resource (document, entity, entityType, etc)
typeType of User Activity (view, add, change, delete)
statusActivity Status (COMPLETE, FAILED, UNAUTHORIZED)
sourceIpAddressSource Ip Address for activity request
sourceSource of activity request
userIdCreate by user
documentIdDocument Identifier
attributeKeyDocument Attribute Key
entityTypeIdEntityType Identifier
entityIdEntity Identifier
changeSetMap of new / old value by key
inserteddateInserted Date

Document User Activity

Document User Activities refers to the tracking and logging of actions performed on documents within a system.

These activities typically include operations such as CREATE, VIEW, DELETE, and MODIFY, allowing administrators or users to monitor the lifecycle and interactions with documents.

This tracking provides visibility into who accessed or altered a document, when the action occurred, and what changes were made. Document Activities are crucial for auditing, security, compliance, and overall document management, ensuring accountability and transparency in document usage.

Document user activity is stored alongside version-related records so a document's metadata and content changes can be tied back to the activity that created or modified them.

note

These attributes are stored in the "versions" DynamoDB table.

Document Activity

The main document user activity tracking record. Depending on the type of document activity, the versionPk, versionSk refers to the record associated with the activity.

This record acts as the activity timeline entry for a document. The version key references allow the activity entry to point to the metadata or content snapshot associated with the user action.

Entity Key Schema

AttributesFormat
PK"doc#" + documentId
SK"activity#" + yyyy-MM-dd'T'HH:mm:ss.ffffffZ
GSI1PK"activity#user#" + username
GSI1SK"activity#" + yyyy-MM-dd'T'HH:mm:ss.ffffffZ + "#" + documentId
GSI2PK"activity#"
GSI2SK"activity#" + yyyy-MM-dd'T'HH:mm:ss.ffffffZ + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
typeType of User Activity (view, add, change, delete)
userIdCreate by user
versionPkPK key for version table
versionSkSK key for version table
inserteddateInserted Date

Document Metadata

Document Metadata refers to the metadata information attached to the document.

These records capture metadata snapshots for version and activity tracking. They help preserve what metadata was present at a point in time, rather than only storing the latest active document state.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"doc#" + yyyy-MM-dd'T'HH:mm:ss

Entity Attributes

AttributesDescription
documentIdDocument Identifier
pathDocument path
inserteddateInserted Date
lastModifiedDateLast Modified Date
deepLinkPathDocument deep link path
metadataKey / Value with Key starting with "md#"

Document Version

Document Version Tracking refers to the process of recording and managing changes made to the content of a document over time. Each time a document is edited or updated, a new version is created, allowing users to track and compare previous iterations of the document.

The version record stores content-level information such as content type, size, checksum, and S3 version. This allows FormKiQ to associate document history with the correct stored object version.

Entity Key Schema

AttributesFormat
PK"docs#" + documentId
SK"document#" + yyyy-MM-dd'T'HH:mm:ss

Entity Attributes

AttributesDescription
contentTypeMime Content Type
contentLengthMime Content Type
checksumDocument content checksum
checksumTypeDocument content checksum type
s3versionDocument Content S3 version

Document Attribute Version

Document Attribute Tracking refers to the monitoring and recording of changes made to the metadata or properties associated with a document.

Attribute version records preserve the state of structured metadata over time. They support auditability for changes to attributes that may drive workflows, search behavior, compliance status, or business classification.

Entity Key Schema

AttributesFormat
PK"doc#" + documentId
SK"attr#" + key + "#" + yyyy-MM-dd'T'HH:mm:ss + "#" + value

Entity Attributes

AttributesDescription
archive#SK"attr#" + key + "#" + value
documentIdDocument Identifier
keyattribute key
indexattribute index
valueTypeType of Attribute (string, number, boolean, publication)
stringValuestring value
numberValuenumber value
booleanValueboolean value

Attributes

The Attributes entity defines reusable metadata fields that can be attached to documents. Attribute definitions describe the key, type, data type, and usage state so documents can use structured metadata consistently across sites, schemas, search, and workflows.

Entity Key Schema

AttributesFormat
PK"attr#" + key
SK"attribute"
GSI1PK"attr#"
GSI1SK"attr#" + key
GSI2PK"attr#"
GSI2SK"attr#" + dataType

Entity Attributes

AttributesDescription
documentIdAttribute Key
typeAttribute Type (IE: OPA)
dataTypeData Type (STRING, NUMBER, BOOLEAN, KEY_ONLY, WATERMARK, PUBLICATION )
keyAttribute key
isInUseIs Attribute in use
watermarkTextWatermark Text

Schema

Schema entities define allowed metadata structures for sites and documents. They are used to validate expected attributes, support composite-key search patterns, and constrain allowed values where structured metadata is required.

Site Entity Schema

The Site Entity Schema stores the JSON schema configuration for a site-level entity. It defines the metadata shape and validation expectations used for documents or other site-scoped records.

Entity Key Schema

AttributesFormat
PK"schemas"
SK"site#" + entity

Entity Attributes

AttributesDescription
nameName of Schema
schemaSchema JSON document

Site Composite Key

Site Composite Key records support multi-attribute query patterns. They store configured combinations of attribute keys so FormKiQ can search efficiently across more than one metadata field.

Entity Key Schema

AttributesFormat
PK"schemas"
SK"compositeKey#" + UUID
GSI1PK"schemas#compositeKey"
GSI1SK"key#" + keys

Entity Attributes

AttributesDescription
keysList of Keys

Site Attribute Key

Site Attribute Key records provide a searchable index of attribute keys referenced by a site schema. This helps FormKiQ identify schema-managed attributes without parsing every schema document.

Entity Key Schema

AttributesFormat
PK"schemas"
SK"attr#" + key
GSI1PK"attr#" + key
GSI1SK"true"

Attribute Allowed Values

A searchable key for an attributes allowed values in a Site Schema.

Allowed-value records make enumerated values queryable. They support validation and user-interface experiences where a schema limits an attribute to a known list of values.

Entity Key Schema

AttributesFormat
PK"schemas"
SK"attr#" + key + "#allowedvalue#" + value
GSI1PK"attr#" + key + "#allowedvalue"
GSI1SK"val#" + value

Classification

Classification entities define document classification schemas and related search helpers. They allow FormKiQ to model category-specific metadata rules, composite keys, and allowed values for classified documents.

Classification Entity

The Classification Entity stores the schema document for a classification. A classification can define the expected metadata shape for documents assigned to that class.

Entity Key Schema

AttributesFormat
PK"schemas#" + documentId
SK"class#" + entity
GSI1PK"class#" + entity
GSI1SK"attr#" + name

Entity Attributes

AttributesDescription
nameName of Classification
documentIdClassification Identifier
schemaSchema JSON document

Classification Composite Key

Classification Composite Key records support efficient searches across configured combinations of classification attributes.

Entity Key Schema

AttributesFormat
PK"schemas#" + documentId
SK"compositeKey#" + UUID
GSI1PK"schemas#compositeKey"
GSI1SK"key#" + keys

Entity Attributes

AttributesDescription
documentIdClassification Identifier
keysList of Keys

Site Attribute Key

Classification Site Attribute Key records index the attribute keys used by a classification schema.

Entity Key Schema

AttributesFormat
PK"schemas#" + documentId
SK"attr#" + key
GSI1PK"attr#" + key
GSI1SK"true"

Attribute Allowed Values

A searchable key for an attributes allowed values in a Classification

Classification allowed-value records make classification-specific enumerations searchable and enforceable.

Entity Key Schema

AttributesFormat
PK"schemas#" + documentId
SK"attr#" + key + "#allowedvalue#" + value
GSI1PK"attr#" + key + "#allowedvalue"
GSI1SK"val#" + value

Document Shares

The following entities support document sharing. They model which users or groups can access shared files or directories and how a shared document can be looked up by the share name, path, document, or site.

Shares

Shares records list the documents or folders shared with a particular group or user. They are used to resolve what a principal can access and what permission type applies to the shared resource.

Entity Key Schema

AttributesFormat
PK"shares#" + (group/user) + "#" + name
SK"share#" + siteId + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
typeType of Share (File or Directory)
inserteddateInserted Date
userIdCreate by user
pathFolder path
nameName of share
siteIdSiteId share is part of
permissionTypeType of permission
permissionsList of permissions

Document Share

Document Share records provide a document-centric lookup for a share. They make it possible to find share metadata from the shared document identifier, path, and share name.

Entity Key Schema

AttributesFormat
PK"shares#" + documentId
SK"share"
GSI1PK"share#" + name
GSI1SK"share#" + path + "#" + documentId

Entity Attributes

AttributesDescription
documentIdShare Identifier
sharedDocumentIdShared Document Id
nameName of share
typeType of Share (File or Directory)
inserteddateInserted Date
userIdCreate by user
pathFolder path
siteIdSiteId share is part of
permissionTypeType of permission
permissionsList of permissions

Document Folder

Document Folder records maintain folder and file listing indexes for document paths. They support browsing folder-style structures without scanning every document in the site.

Entity Key Schema

AttributesFormat
PK"global#folders#" + parentDocumentId
SK"ff#" + path OR "fi#" + path
GSI1PK (folder only)"folder#" + documentId
GSI1SK (folder only)"folder"

Entity Attributes

AttributesDescription
documentIdShare Identifier
pathFolder path
typeType of Share (File or Directory)
parentDocumentIdParent Document Id
inserteddateInserted Date
lastModifiedDateLast Modified Date
userIdCreate by user

Document Folder Permission

Document Folder Permission records store path-based permissions for folder-style document organization. They allow role permissions to be attached to a folder path and evaluated during folder browsing or document access.

Entity Key Schema

AttributesFormat
PK"global#folders#permissions"
SK"ff#" + path

Entity Attributes

AttributesDescription
pathFolder path
typeType of Share (File or Directory)
inserteddateInserted Date
userIdCreate by user
"role#" + roleNamePermissions of Role

Queue

Queue records define workflow or review queues that documents can be routed into. Queues are used by workflow and document action processing to group documents awaiting human or automated handling.

Entity Key Schema

AttributesFormat
PK"queues#" + documentId
SK"queue"
GSI1PK"queues#"
GSI1SK"queue#" + name + "#" + documentId

Entity Attributes

AttributesDescription
documentIdShare Identifier
nameName of Queue

Workflows

The following entities define workflow templates and track documents currently moving through workflows. Workflows connect rules, queues, actions, and document state transitions.

Workflow

The Workflow entity stores the workflow definition and operational metadata. It identifies the workflow by name and status and stores the workflow JSON used by processing logic.

Entity Key Schema

AttributesFormat
PK"workflows#" + documentId
SK"workflow"
GSI1PK"workflows#"
GSI1SK"workflow#" + name + "#" + documentId
GSI2PK"workflows#"
GSI2SK"workflow#" + status + "#" + name + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
nameName of Workflow
inUseWhether Workflow is in use
statusWorkflow status
descriptionWorkflow description
userIdCreate by user
jsonWorkflow JSON blob

Document Workflow

The Document Workflow entity tracks a specific document's progress through a workflow. It records the workflow, current step, action references, and status needed to resume or inspect workflow execution.

Entity Key Schema

AttributesFormat
PK"wfdoc#" + documentId
SK"wf#" + workflowId
GSI1PK"wfdoc#" + documentId
GSI1SK"wf#" + workflowName + "#" + workflowId
GSI2PK"wf#" + workflowId
GSI2SK"wfdoc#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
workflowIdWorkflow identifier
workflowNameWorkflow name
statusWorkflow status
actionPkAction PK
actionSkAction SK
currentStepIdCurrent Workflow step Id

Case Management

The following entities support case management. Cases group tasks, NIGO items, and related documents so document-centric work can be tracked as a larger business process.

Case

The Case entity stores the top-level case record, including its status, date range, case number, and metadata. It acts as the parent object for tasks, NIGO records, and case-related documents.

Entity Key Schema

AttributesFormat
PK"case#" + caseId
SK"case"
GSI1PK"case#"
GSI1SK"case#" + caseId

Entity Attributes

AttributesDescription
documentIdCase Identifier
nameCase Name
descriptionCase Description
statusCase Status
caseNumberCase Number
documentNumberDocument Number
metadataCase Metadata
inserteddateInserted Date
startDateStart Date
endDateEnd Date

Task

The Task entity stores work items under a case. A task can represent a review step, operational assignment, or follow-up action with its own status and date fields.

Entity Key Schema

AttributesFormat
PK"case#" + caseId
SK"task#" + taskId

Entity Attributes

AttributesDescription
documentIdTask Identifier
caseIdCase Identifier
nameTask Name
descriptionTask description
statusTask Status
metadataTask Metadata
inserteddateInserted Date
startDateStart Date
endDateEnd Date

Nigo

The Nigo entity stores "not in good order" items associated with a case. These records can represent missing, invalid, or incomplete information that must be resolved before the case can proceed.

Entity Key Schema

AttributesFormat
PK"case#" + caseId
SK"nigo#" + nigoId

Entity Attributes

AttributesDescription
documentIdNigo Identifier
caseIdCase Identifier
nameNigo name
descriptionNigo description
statusNigo Status
metadataNigo Metadata
inserteddateInserted Date
startDateStart Date
endDateEnd Date

Document

The Case Management Document entity links a FormKiQ document to a case, task, or NIGO record. It provides the relationship between the document and the business object it supports.

Entity Key Schema

AttributesFormat
PK"case#" + caseId
SK"doc#" + type + "#" + objectId + "#" + documentId

Entity Attributes

AttributesDescription
documentIdDocument Identifier
caseIdCase Identifier
objectIdCase / Task / Nigo Identifier
typeDocument Type (Case / Task / Nigo)
inserteddateInserted Date

Rulesets

The following entities define rulesets and rules used for automation. Rulesets evaluate document conditions and can trigger workflows or other actions when matching documents are created or updated.

Ruleset

The Ruleset entity stores a versioned set of automation rules. Priority and status determine whether and how the ruleset participates in document processing.

Entity Key Schema

AttributesFormat
PK"rulesets"
SK"ruleset#" + status + "#" + priority + "#" + rulesetId
GSI1PK"ruleset#"
GSI1SK"ruleset#" + rulesetId

Entity Attributes

AttributesDescription
documentIdRuleset Identifier
descriptionRuleset description
versionRuleset version
priorityRuleset priority
statusRuleset status

Rule

The Rule entity stores the conditions and target workflow for an individual rule. Rules are ordered by priority and evaluated as part of the parent ruleset.

Entity Key Schema

AttributesFormat
PK"ruleset#" + rulesetId
SK"rule#" + ruleId
GSI1PK"ruleset#" + rulesetId
GSI1SK"rule#" + priority + "#" + ruleId
AttributesFormat
PK"ruleset#"
SK"rule#" + status + "#" + rulesetId + "#" + priority + "#" + ruleId
GSI1PK"ruleset#" + rulesetId
GSI1SK"rule#" + ruleId

Entity Attributes

AttributesDescription
rulesetIdRuleset Identifier
documentIdRule Identifier
descriptionRule description
priorityRule priority
workflowIdWorkflow to run on match
conditionsRule conditions
statusRules status

Mappings

The following entities support mappings, which translate or connect external data structures to FormKiQ document attributes and metadata.

Mapping

The Mapping entity stores a named metadata mapping definition. Mappings are useful when importing, transforming, or synchronizing document metadata from another system.

Entity Key Schema

AttributesFormat
PK"mappings#" + documentId
SK"mapping"
GSI1PK"mappings#"
GSI1SK"mapping#" + name

Entity Attributes

AttributesDescription
documentIdMapping Identifier
nameMapping name
descriptionMapping description
attributesMapping attributes

API Keys

API Key records store API key metadata used for key-based API access. API keys are scoped to a site and can include permissions and group claims used by the API authorization layer.

Entity Key Schema

AttributesFormat
PK"apikeys#"
SK"apikey#" + apiKey
GSI1PKsiteId + "/apikeys#"
GSI1SK"apikey#" + name + apiKey
GSI2PKsiteId/"apikeys#"
GSI2SK"apikey#" + apiKey (mask)

Entity Attributes

AttributesDescription
apiKeyAPI Key
nameAPI Key Name
userIdCreate by user
siteIdSite Identifier
permissionsList of API Key permissions (read/write/delete)
groupsList Groups to add to the API JWT custom claims
inserteddateInserted Date

Activities Events

Activity event records provide event-sourcing support for activity data. They preserve references to activity records and can use time-to-live behavior for retention management.

Document Activities Events

Document Activities Events store event records related to document activity. They allow activity changes to be processed or retained separately from the current activity records themselves.

Entity Event Sourcing Key Schema

AttributesFormat
PK"documentEvent"
SK"event#docs#activities#" + yyyy-MM-dd'T'HH:mm:ssZ + "#" + documentId + "#" + UUID

Entity Event Sourcing Attributes

AttributesDescription
documentIdDocument Identifier
siteIdSite Identifier
activityKeysList of Activities Key
inserteddateInserted Date
TimeToLiveRecord Time to Live

Entities Types

Entity Types define custom business object types that can be managed alongside documents. They provide the namespace and name used to group related entities under a reusable type definition.

Entity Key Schema

AttributesFormat
PK"entityType#" + documentId
SK"entityType"
GSI1PK"entityType#"
GSI1SK"entityType#" + namespace + "#" + name + "#"

Entity Attributes

AttributesDescription
documentIdEntity Type Identifier
namespaceEntity Type Namespace
nameEntity Type Name
inserteddateInserted Date

Entity

Entity records store instances of a configured entity type. They are useful for representing business objects that relate to documents, such as customers, vendors, cases, assets, or other domain-specific records.

Entity Key Schema

AttributesFormat
PK"entity#" + entityTypeId + "#" documentId
SK"entity"
GSI1PK"entity#" + entityTypeId
GSI1SK"entity#" + name + "#" + documentId

Entity Attributes

AttributesDescription
documentIdEntity Identifier
entityTypeIdEntity Type Identifier
nameEntity Name
inserteddateInserted Date
note

Entity attributes metadata are stored with the prefix of attr#

Locale

Locale records store localized labels and values used by the interface, schemas, classifications, and allowed values. They allow the same FormKiQ configuration to present user-facing text in different languages or regional formats.

Locale List

Locale List records track the locales configured for the deployment. They allow the system to enumerate which locale values are available.

Entity Key Schema

AttributesFormat
PK"locale#"
SK"locale# + locale

Entity Attributes

AttributesDescription
localeLocale

Locale Type

Locale Type records store localized values for interface labels, schema attributes, classification attributes, and allowed values.

Fetch patterns include:

  • Get ALL values for a specific locale
  • Get Locale using
    • locale, interfaceKey
    • locale, schema, attributeKey
    • locale, classification, attributeKey

Entity Key Schema

AttributesFormat
PK"locale#type"
SKlocale + "#" + type + "#" + interfaceKey
locale + "#" + type + "#" + attributeKey + "#" + allowedValue
locale + "#" + type + "#" + classificationId + "#" + attributeKey + "#" + allowedValue

Entity Attributes

AttributesDescription
itemTypeType of Locale Resource
interfaceKeyInterface Key
attributeKeyAttribute Key
allowedValueAllowed Value
classificationIdClassification Id
localeLocale
localizedValueLocalized Value

Open Policy (OPA)

Open Policy Agent records store policy configuration used for advanced authorization decisions. OPA policies can evaluate document, user, role, and attribute context to enforce access-control rules beyond basic group membership.

Entity Key Schema (Full)

The full OPA policy record stores the complete policy document for a site. It is useful when the policy should be read or replaced as a single unit.

AttributesFormat
PK"controlpolicy#opa"
SK"opa#full#" + siteId + "#policy"

Entity Key Schema (Policy)

The policy OPA record stores the policy body for a site-level access-control configuration.

AttributesFormat
PK"controlpolicy#opa"
SK"opa#policy#" + siteId + "#policy"

Entity Key Schema (Policy Item)

Policy item records store individual indexed policy fragments. This supports policies that are managed or evaluated as ordered items rather than only as one complete document.

AttributesFormat
PK"controlpolicy#opa"
SK"opa#item#" + siteId + "#policy#" + index

Entity Attributes

AttributesDescription
siteIdSite Identifier
policyOPA Policy
typeOPA Policy Type (FULL, POLICY, POLICY_ITEM)
indexIndex