Webhook Workflow Step
Complete guide to configuring the Webhook workflow step to execute custom business logic and integrate with external systems via webhooks.
Overview
The Webhook workflow step allows you to execute custom business logic and integrate with external systems via webhooks during order processing. Unlike the basic Export Order step which only sends data, this workflow step can also receive updates back from the external system to modify the order in Omnium.
Important to know:
- The webhook call is awaited - Omnium waits for the external system to respond before continuing
- The execution happens immediately when the workflow step is triggered
- The external system can update the order by returning modified order data
- Failed webhooks can either stop the workflow or just show a warning
Key Difference from Export Order:
- Export Order: One-way communication - sends order data to external systems
- Webhook workflow step: Two-way communication - sends order data AND can receive order updates back
Identifier
| Property | Value |
|---|---|
| Key | WebhookWorkflowStep |
| Group | Export |
| Applicable Statuses | All (available for all statuses) |
Step 1: Configure the Workflow Step
To add webhook workflow steps to your workflow, you need to configure the workflow step properties.
Minimum Required Configuration
At minimum, you must specify the connector:
All Available Options
| Property | Required | Type | Description | Example |
|---|---|---|---|---|
| Connector | Yes | string | The name of the webhook connector to use | "Webhook" |
| ConnectorId | No | string | Specific connector instance ID to use when multiple connectors of the same type exist. Must match the ConnectorId field in the connector configuration. | "webhook-validation-service" |
| RunAfterOrderIsSaved | No | boolean | Set to true to ensure the order is fully saved and indexed before executing the webhook. Adds a 1-second delay when run by system services. | true or false (default: false) |
| StopOnError | No | boolean | Set to true to stop the entire workflow if the webhook fails | true or false (default: false) |
| ErrorStatus | No | string | If webhook fails AND StopOnError is true, change the order status to this value | "WebhookValidationFailed" |
| TranslateKey | No | string | Optional translation key for the workflow step name in the UI | "WorkflowStep_CustomValidation" |
Example Configurations
Example 1: Simple webhook action (warnings only if it fails)
Example 2: Critical validation webhook (stop workflow if it fails)
Note: This requires a connector with ConnectorId: "webhook-fraud-check" in your tenant settings.
Example 3: Order enrichment webhook (ensure order is saved first)
Step 2: Configure the Webhook Connector
After configuring the workflow step, you need to configure the connector itself in your tenant settings.
Basic Webhook Connector Structure
Authentication Options
Option A: Bearer Token Authentication (Recommended)
Option B: Basic Authentication
Option C: Custom Headers
Advanced Configuration Options
| Property | Type | Description | Example |
|---|---|---|---|
| ConnectorId | string | Unique identifier for this connector instance (required when using multiple connectors of the same type) | "webhook-fraud-check" |
| Timeout | TimeSpan | How long to wait for the webhook response | "00:00:30" (30 seconds) |
| EnabledForMarkets | array | Restrict connector to specific markets | ["SE", "NO"] |
| DisabledForMarkets | array | Exclude connector from specific markets | ["FI"] |
Using Multiple Webhook Connectors
When you have multiple webhook endpoints for different purposes (validation, enrichment, fraud detection, etc.), you must:
- Set a unique
ConnectorIdon each connector in your tenant settings - Reference that specific
ConnectorIdin your workflow step configuration
Connector Selection Priority:
- ConnectorId (highest priority) - Selects the exact connector instance
- Market - Selects market-specific connector if available
- Name - Falls back to default connector by name
Example: Multiple Webhook Connectors for Different Services
Then in your workflow steps, specify which service to use:
Understanding the Webhook Request and Response
What Gets Sent to Your Webhook?
When the workflow step executes, Omnium sends a POST request with the complete order object:
What Can Your Webhook Return?
Your webhook endpoint can return updated order data that will be applied to the order in Omnium.
Updatable Order Properties:
Status- Change the order statusOrderType- Change the order typeTags- Add or modify order tagsName- Update the order name/titleErrors- Add or clear error messagesFollowUpDate- Set a follow-up dateAssets- Add or modify order assetsOrigin- Update the order originProperties- Add or modify custom properties
Example Response - Update Status and Add Tags:
Example Response - Add Error:
Example Response - Success (No Changes): Return HTTP 200 OK with an empty response, or:
Behavior
What Happens on Success?
- Order event is created with type "Exported" (operation:
ExecuteExportOrder) - Order properties are updated with data returned from webhook (if any)
- Any previous export errors are cleared
- Workflow continues to the next step
What Happens on Failure?
If StopOnError = false (default):
- A warning is added to the workflow step result
- Workflow continues to the next step
If StopOnError = true:
- An error is added to the workflow step result
- Workflow stops - no further steps execute
- Order status changes to
ErrorStatus(if you configured one)
Common Use Cases
Address Validation
Fraud Detection
Order Enrichment (Non-Critical)
Multiple Sequential Webhook Actions
You can chain multiple webhook actions in your workflow, each using a different connector instance:
Step 1 - Fraud Check (Critical):
Step 2 - Address Validation (Critical):
Step 3 - Customer Enrichment (Non-critical):
Complete Configuration Example
Step 1: Configure the Connector in Tenant Settings
Step 2: Configure the Workflow Step
Add this workflow step to your Order Type (e.g., in the "New" status):
Note: The ConnectorId must match the ConnectorId field in your connector configuration.
How it works:
- When an order is created and reaches "New" status, the
WebhookWorkflowStepexecutes - Omnium sends the complete order to your validation endpoint with bearer token authentication
- Your service validates the order and returns a response
- If validation succeeds, order is updated with your response data and workflow continues
- If validation fails, workflow stops and order status changes to "ValidationFailed"
Error Handling
| Condition | Result | Continues Workflow? |
|---|---|---|
| Webhook successful | Success | Yes |
| Webhook returns order updates | Success (order updated) | Yes |
| Webhook service not found | Error | Yes |
| Webhook failed (StopOnError=true) | Error | No |
| Webhook failed (StopOnError=false) | Warning | Yes |
Troubleshooting
Webhook Not Executing
- Is the connector name spelled correctly? (it's case-sensitive!)
- Is the connector configured in Tenant Settings?
- Does the order's workflow actually reach this step?
- Check the order events log for "Exported" event with operation
ExecuteExportOrder
Webhook Timeout
- Increase the
Timeoutvalue in connector configuration (default is usually 30 seconds) - Optimize your webhook endpoint to respond faster
- Consider making your webhook asynchronous - return 200 OK immediately and update order later via API
Order Not Updated from Webhook Response
- Is your webhook returning valid JSON?
- Are you returning the correct property names (case-sensitive)?
- Ensure you're returning HTTP 200 OK status
Valid properties that can be updated:
Status, OrderType, Tags, Name, Errors, FollowUpDate, Assets, Origin, Properties
Stale Data Issues
Set RunAfterOrderIsSaved: true in your workflow step to ensure the order is fully saved before the webhook executes.
Related Steps
- Export Order - One-way order export to external systems
- Notification - Send notifications
