Slug: sync-external-status Version: 1.0.0 Infer: No Event Aware: Yes

Overview

Synchronize External Status Model

This model enables bi-directional status synchronization between your Kodexa document processing system and external systems. When documents transition to specified statuses, the model automatically notifies external systems via API calls.

How It Works

  1. The model monitors for document status changes through document family events
  2. When a document’s status changes to one of the configured statuses
  3. It sends an API request to the specified endpoint with the document’s correlation ID and status
  4. The external system can then update its own record of the document status

Options Configuration

OptionDescription
update_status_endpointThe full URL of the API endpoint that will receive status update notifications
statuses_to_processList of document statuses that should trigger synchronization with the external system

Requirements

For this model to work correctly:

  1. Documents must have a CorrelationId in their metadata that identifies them in the external system
  2. The external API endpoint must accept POST requests with JSON payloads
  3. The document must have one of the statuses specified in the statuses_to_process list

API Request Format

When a document status changes, the model sends the following JSON payload to the external API:

[
  {
    "correlationId": "unique-document-identifier",
    "status": "NEW_DOCUMENT_STATUS"
  }
]

Process Flow

Example Usage

This model is particularly useful for:

  • Keeping document statuses synchronized between Kodexa and external systems
  • Triggering external workflows when documents reach certain states
  • Implementing cross-system notifications for document processing
  • Creating audit trails across systems
  • Building integrations with case management or workflow systems

Configuration Example

To synchronize “Approved” and “Rejected” statuses with an external system:

update_status_endpoint: "https://api.example.com/document-status"
statuses_to_process:
  - Approved
  - Rejected

Integration Considerations

  • The external API endpoint should be highly available, as failures will prevent status synchronization
  • The model retries on API failures but will eventually time out
  • For security, consider using API keys or OAuth tokens (configured in your Kodexa environment)
  • The correlation ID must be consistent between systems for proper matching

Inference Options

The following options can be configured when using this model for inference:

NameLabelTypeDescriptionDefaultRequired
update_status_endpointUpdate Status EndpointstringThe endpoint to use for updating the status of the document-No
statuses_to_processStatuses to ProcesslistN/A-No

Model Details

  • Provider: Kodexa AI