Reading IFS Application Events in Real Time with Webhooks

Reading IFS Application Events in Real Time with Webhooks

Using IFS Cloud's event framework to push notifications to external systems via webhooks — configuration, payload structure, retry handling, and building a minimal webhook receiver.

Published

IFSIFS CloudEventsWebhooksIntegrationReal-Time

Introduction

Real-time integration is the backbone of modern enterprise systems. In IFS Cloud, events occur constantly—orders are created, inventory levels change, purchase requests are approved, customers are modified. Traditionally, external systems had to poll IFS Cloud repeatedly to discover these changes, a costly and slow approach.

For suitable events and releases, a REST Call event action can push an HTTP request through the IFS integration framework. This reduces polling latency, but it is still a distributed, normally at-least-once integration that needs durable delivery, authentication, idempotency and reconciliation.

This guide shows you how to configure IFS Cloud webhooks, understand the payload structure, handle reliability and retry logic, and build a simple webhook receiver to get started immediately.

What Are Webhooks?

A webhook is an automated HTTP POST request sent by IFS Cloud to a URL you specify when a particular business event occurs. Think of it as the reverse of an API call—instead of your system asking IFS Cloud, "Has anything changed?", IFS Cloud pushes the change directly to you.

Push vs. Poll: Why Webhooks Matter

Polling (traditional approach):

  • Your system makes repeated API calls to IFS Cloud
  • Delays between the event occurring and you discovering it
  • Wastes bandwidth on unnecessary requests
  • Increases load on the IFS Cloud API

Webhooks (push-driven):

  • IFS Cloud initiates a request when the configured action is processed
  • Your system is notified with low latency when the route is healthy
  • Routine empty polling calls are reduced
  • Enables true event-driven workflows

For integration developers, this shift from pull to push fundamentally changes how you architect external systems—you move from reactive polling to proactive, event-driven processing.

IFS Cloud Event Framework Overview

IFS Cloud's event system is built on a simple yet powerful model:

  1. Events — Predefined or custom business occurrences (e.g., "customer created", "order released")
  2. Event Actions — Configured responses to those events; available action types vary by release
  3. Payload — A customer-defined message populated from the scalar parameters the selected event exposes

The navigation labels and REST Call fields in this guide reflect releases that provide this action type. Confirm them in the target IFS Cloud release; older Applications 10 environments and different Cloud update levels can present the event tooling differently.

Accessing the Event Configuration UI

In current IFS Cloud documentation, navigate to Solution Manager → Configuration → Events. Here you'll find pages for:

  • Manage Event Actions — Central hub for configuring what happens when events fire
  • List Events — Browse all available system and custom-defined events
  • Create New Event Action — Add new webhook actions

Setting Up a REST Call (Webhook) Event Action

IFS Cloud's REST Call action type is the webhook mechanism. Let's configure one step by step.

Step 1: Navigate to Event Actions

  1. In IFS Cloud, go to Solution Manager → Configuration → Events → Manage Event Actions
  2. Click Create New Event Action

Step 2: Configure the Basic Details

Fill in the mandatory fields:

FieldExampleNotes
Action TypeREST CallSelects the webhook mechanism
Perform upon EventCustomerOrder / CreateChoose the event that triggers this webhook
Action DescriptionNotify external order system of new ordersHuman-readable description
Enable Action✓ CheckedMust be enabled for the action to fire
Published✓Publish the completed action for it to run

Step 3: Configure REST Endpoint Details

Under the REST Call section, configure:

REST Endpoint:

https://receiver.example.invalid/webhooks/ifs-order-events

Method: POST (most common for webhooks)

Sender: Choose or create a REST sender configuration

  • Configure an authentication type exposed by that release. Current documentation includes Basic, Bearer and Azure Shared Key options; prefer a short-lived credential or an OAuth-capable gateway over a static shared secret
  • This centralizes credentials in IFS Connect

Additional Header Parameters:

Accept: application/json
Content-Type: application/json

Step 4: Configure the Payload (Body)

The payload is where the event data flows. IFS Cloud provides substitution fields from the event:


The & prefix marks an event-parameter substitution. The action editor lists the parameters available for the selected event and prefixes inserted values with &. For a custom table event, attributes can be exposed as NEW:<Attribute> and OLD:<Attribute>; the example assumes a custom event that exposes NEW:ORDER_NO and NEW:CUSTOMER_NO. The framework does not automatically supply this schema, child rows, a universal EVENT_ID, or a timestamp. If consumers need lines or related objects, send a compact notification and let a worker read the authoritative record through a projection API.

Step 5: Optional Conditions

If you don't want the webhook to fire for every order, add conditions:

Example: Only send webhooks for orders with amount > 10,000

  • Attribute: ORDER_AMOUNT
  • Condition Type: >
  • Value: 10000

Multiple conditions can be combined (AND logic).

Step 6: Save and Enable

Click Save, enable the action and publish it. Publishing an enabled action also enables its parent event; an enabled but unpublished action does not run.

Understanding Webhook Payloads

Every REST Call carries the body you configured from the selected event's parameters. Understanding that customer-defined contract is essential for correctly processing it downstream.

Example Custom Payload Structure

IFS does not emit one universal webhook envelope. The structure below is a contract you might define for a particular event, either directly in the event action or in an integration gateway. Every property and child collection must be mapped from an available scalar event parameter or enriched later through an API read.


Here eventId, timestamp, and lineItems are part of the integration's own versioned contract—not guaranteed built-in event fields. For an IFS REST Call action, a lean key-only payload is usually safer than trying to embed a complete mutable business object.

Payload Best Practices

  1. Create a stable event key — Combine immutable business keys with a change/version value exposed by the event, or let a durable intermediary assign an ID. Store it under a uniqueness constraint for deduplication.
  2. Include an occurrence time if exposed — Otherwise record receipt time in the gateway and treat it separately from business-effective time.
  3. Namespace Your Fields — Use nested JSON (e.g., data.order.orderId) to avoid collisions.
  4. Use Consistent Types — String amounts, ISO 8601 dates, standard codes.
  5. Include Source and Version — Allows your receiver to handle multiple integrations and schema versions.

Building a Simple Webhook Receiver

Your external system needs a webhook endpoint—an HTTP endpoint that receives and processes IFS Cloud's POST requests. Here's a minimal but functional Node.js/Express example.

Prerequisites

  • A supported Node.js LTS release and npm
  • A publicly accessible URL (use ngrok, Tunnelmole, or a public server for testing)

Step 1: Set Up the Project


Step 2: Create the Webhook Handler

Create server.js:

This first program is deliberately a local learning receiver. Its in-memory list is neither a queue nor durable storage, so it processes the demo handler synchronously and returns 200 only after that handler completes. The production pattern later in the article persists an inbox/queue item before returning 202.


Step 3: Run the Receiver


Output:

🚀 Webhook receiver listening on port 3000
📝 Webhook endpoint: POST /webhooks/ifs-events
💚 Health check: GET /health
📊 Event log: GET /events

Step 4: Expose Locally for Testing

Use a tunneling tool only for an isolated non-production test and configure the sender's Authorization header. Tunnel URLs expose your development machine to the internet, so restrict access and close the tunnel immediately afterwards:


The tool will return a generated public URL such as https://<generated-subdomain>.tunnelmole.net. Use that exact generated value only in the isolated non-production test route:

https://<generated-subdomain>.tunnelmole.net/webhooks/ifs-events

Handling Reliability and Retries

Webhooks are inherently unreliable over the internet—networks fail, servers go down. Robust integration requires retry logic.

How IFS Cloud Retries

REST Call delivery and retry behaviour depends on the IFS release and the configured sender/route:

  • Timeout: Keep receiver acknowledgement well inside the configured sender timeout
  • Retries: Verify which transport/status failures are retried, the backoff, and the maximum attempts in the target environment
  • Durability: Confirm whether the call is backed by an Application Message, what is retained, and the operator's supported retry/redelivery procedure

Best Practices for Your Webhook Receiver

1. Respond Quickly (202 Accepted)


2. Ensure Idempotence (Handle Retries)

Store the integration's stable eventId under a database uniqueness constraint before acknowledging. The insert must be atomic; a separate “does this exist?” check races with concurrent retries:


Retain inbox keys for at least the sender's replay/redelivery and reconciliation window. Expiry is a records/operations decision, not an in-memory TTL shortcut.

3. Log the Minimum Durable Operational Facts


4. Use a Durable Queue for Processing

For high-volume integrations, decouple ingestion from processing. This handler assumes the same bearer-authentication and schema-validation middleware shown elsewhere in the article has already run:



The inbox dispatch claim, queued, processing, completion, failure, lease-expiry, and dead-letter transitions must be atomic database operations. Protect and retain the stored payload according to its sensitivity and the agreed replay window. BullMQ is the execution mechanism here; the inbox remains the durable idempotency and retry record.

On the IFS Cloud Side: Configuring for Reliability

  1. Use REST Sender with Logging — Configure a named REST Sender in IFS Connect to centralize logging and error handling
  2. Set Appropriate Timeouts — Adjust based on your receiver's expected response time
  3. Monitor the real delivery path — Check the action configuration under Solution Manager → Configuration → Events, then inspect the corresponding IFS Connect Application Message/transport diagnostics when the release routes the call that way
  4. Consider Dead Letter Handling — Implement a process to review failed deliveries periodically

Common Webhook Payload Examples

The following are versioned integration-contract examples, not payloads IFS creates automatically. Map only parameters available on the selected event and enrich larger objects after receipt.

Example 1: Customer Created


Example 2: Purchase Order Released


Example 3: Inventory Adjustment


Security Considerations

1. Use HTTPS Only

Webhook URLs must be HTTPS. Never use HTTP for production webhooks—event payloads may contain sensitive business data.

2. Authenticate the Sender

Configure a sender authentication method supported by the target IFS release and receiver—ideally OAuth through an API gateway, or a tightly protected bearer credential where that is the available option. A Bearer token is an authentication credential, not a payload signature. Do not invent an X-IFS-Signature contract. If your gateway explicitly adds an HMAC signature, verify the documented algorithm, key ID, timestamp and the exact raw request bytes before JSON parsing; JSON.stringify(req.body) can produce different bytes from those signed.

3. Restrict Network Access Where Practical

Use the contracted, current outbound network ranges only if IFS documents stable ranges for your service. Treat an allowlist as defence in depth, not identity: ranges can change or be shared, so retain application-layer authentication.

4. Validate Payload Structure

Don't assume the webhook payload matches your expectations. Validate schema:



5. Rate Limiting

Protect your endpoint from abuse. The simple IP limiter below is illustrative; an IFS service can use shared egress addresses, so production gateways should also quota the authenticated client and size limits from measured event bursts:


Testing Your Webhook Integration

1. Manual Testing with curl


Keep shell tracing disabled while handling the token. Passing the generated authorization header through stdin keeps the bearer credential out of curl's process arguments.

2. Monitor the Receiver

Use the health check and event log endpoints:


3. IFS Cloud Event Log

In IFS Cloud, verify the published action under Solution Manager → Configuration → Events → Manage Event Actions. For delivery failures, use the IFS Connect Application Message/transport diagnostics and correlation data available in that release; the configuration page alone is not a durable receiver-delivery audit.

4. Test with Real Data

Once happy with the setup:

  1. Create a test customer or order in IFS Cloud
  2. Verify the webhook fires
  3. Check your receiver's logs to confirm the payload was received correctly

Key Takeaways

  • Webhooks are push, not pull — IFS initiates the configured action, reducing discovery latency without promising instantaneous delivery
  • Use REST Call event actions — Configure them in Solution Manager, specify your endpoint, and define the payload using substitution fields
  • Respond quickly — Authenticate and validate the request, durably enqueue/upsert it, then return 202 Accepted and process it asynchronously
  • Ensure idempotence — Store event IDs and skip duplicates to handle retries gracefully
  • Log delivery state and correlation metadata — Retain the evidence needed for debugging and compliance without copying unbounded sensitive payloads into logs
  • Secure your endpoint — Use HTTPS, authenticate the sender, validate payloads, and rate-limit access
  • Plan for failure — Network issues and server outages are inevitable; queue processing, implement retries, and monitor

Next Steps

  1. Configure your first webhook in IFS Cloud — Start with a low-risk, low-volume test event and synthetic data
  2. Set up a simple Node.js receiver — Use the example code as a starting point
  3. Test end-to-end — Create test data in IFS Cloud and verify the webhook fires to your receiver
  4. Implement production hardening — Add strong sender authentication, durable inbox/queueing, idempotency, rate limiting, redaction and monitoring
  5. Monitor and iterate — Track webhook latencies, error rates, and failures; adjust retry and timeout settings as needed

REST event delivery adds a valuable low-latency integration option in supported IFS Cloud releases. By treating events as versioned, at-least-once messages—and retaining a reconciliation path—you can react quickly to business changes without depending entirely on polling.

Designing event-driven integrations in IFS Cloud?

Syrett Consultancy can help you turn application events and webhooks into reliable integration flows with the right security, retry, and monitoring patterns.