Event-Driven Integration With ERP Cloud
Rather than polling ERP Cloud APIs to detect changes, you can subscribe to business events that ERP Cloud publishes when significant operations occur. This event-driven approach is more efficient, more timely, and reduces API call volume. Oracle ERP Cloud supports business events through Oracle Integration Cloud (OIC) and direct webhook notifications.
What Business Events Are Available
ERP Cloud publishes events for major business operations across modules. In Financials: invoice creation, invoice approval, payment completion, journal posting. In Procurement: purchase order approval, receipt creation, requisition approval. In Projects: project creation, budget approval, expenditure creation. Each event carries a payload with the key identifiers of the affected business object.
Subscribing Through OIC
The most common pattern is subscribing to ERP Cloud events through Oracle Integration Cloud. In OIC, create an integration that uses the Oracle ERP Cloud adapter as a trigger. Select the business event you want to subscribe to, and OIC automatically registers the subscription with ERP Cloud:
Create a new App Driven Orchestration integration. Add the Oracle ERP Cloud adapter as the trigger. Select “Subscribe to Business Events” as the operation. Choose the event type (e.g., Invoice Approved). Map the event payload to your processing logic. Activate the integration.
Direct Webhooks
For simpler integrations that do not require OIC, you can configure ERP Cloud to send webhook notifications directly to your endpoint. In the ERP Cloud Setup and Maintenance area, configure a Business Event subscription that sends an HTTP POST to your URL when the event fires. Your endpoint receives a JSON payload containing the event details.
Processing Event Payloads
Business event payloads typically contain the object type, the operation (create, update, delete), the object identifier, and key attribute values. Your receiving service should acknowledge the event quickly (return HTTP 200) and then process it asynchronously to avoid timeout issues:
-- Example: APEX REST handler for ERP Cloud webhook
-- Acknowledge immediately, queue for processing
BEGIN
INSERT INTO erp_event_queue (event_type, event_payload, received_at, status)
VALUES (:event_type, :body, SYSTIMESTAMP, 'PENDING');
COMMIT;
HTP.P('{"status":"accepted"}');
END;
Idempotency
Business events can be delivered more than once. Your processing logic must be idempotent, meaning processing the same event twice produces the same result. Use the event’s unique identifier to detect and skip duplicates.