Slug: update-external-status Version: 1.0.0 Infer: Yes

Overview

Update External Status Model

The Update External Status model enables one-way synchronization from Kodexa to external systems by sending document status updates to external APIs. This allows you to notify third-party systems when documents reach specific processing stages within your Kodexa workflows.

How It Works

  1. When a document is processed through this model
  2. It checks if the document’s current Kodexa status meets requirements (if configured)
  3. It retrieves the document’s correlation ID from metadata
  4. It sends a status update request to the configured external API endpoint
  5. 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 requests
status_codeThe status value to send to the external system
is_dependent_on_kodexa_statusWhen enabled, only sends updates if document is in a specific Kodexa status
kodexa_status_if_dependentThe Kodexa status that the document must be in to trigger an update
should_run_in_debug_modeWhen enabled, logs what would be sent but doesn’t make API requests

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. If status dependency is enabled, the document must be in the specified Kodexa status

API Request Format

The model sends the following JSON payload to the external API:

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

Process Flow

Comparison with Sync External Status Model

While the Sync External Status model triggers on document status change events, the Update External Status model:

  • Runs as part of a document processing pipeline
  • Can be positioned at precise points in the document workflow
  • Is triggered by document processing rather than status events
  • Can be used in conjunction with other processing steps

Example Usage

This model is particularly useful for:

  • Workflow Integration: Notifying external systems about document processing progress
  • Status Tracking: Keeping external systems up to date on document status
  • Cross-System Coordination: Synchronizing document statuses across different platforms
  • Process Automation: Triggering external workflows based on document status

Configuration Example

To update an external system when a document reaches “Completed” status:

update_status_endpoint: "https://api.example.com/document-status"
status_code: "COMPLETED"
is_dependent_on_kodexa_status: true
kodexa_status_if_dependent: "Approved"
should_run_in_debug_mode: false

Debug Mode

The debug mode option is particularly useful for:

  • Testing configuration without affecting external systems
  • Verifying correlation IDs are available before enabling live updates
  • Diagnosing issues with the update process
  • Validating conditional logic during workflow development

Inference Options

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

NameLabelTypeDescriptionDefaultRequired
should_run_in_debug_modeShould the model run in debug modebooleanToggle on to run the model in debug mode (only log the output)FalseNo
update_status_endpointUpdate Status EndpointstringThe endpoint to use for updating the status of the document-No
status_codeStatus CodestringThe status code to update to-No
is_dependent_on_kodexa_statusIs this dependent on the document being in a specific Kodexa status?booleanToggle on to make the model dependent on the Kodexa status of the documentFalseNo
kodexa_status_if_dependentKodexa status if dependentdocumentStatusThe Kodexa status to update to if the model is dependent on the Kodexa status of the document-No

Model Details

  • Provider: Kodexa AI