Webhook delivery failures for workflow automation events causing notification gaps

We’re experiencing intermittent webhook delivery failures for workflow automation events in SAP CX. Our external automation platform should receive webhook notifications when opportunities reach certain stages, but we’re seeing 15-20% delivery failure rate causing critical workflow notifications to be missed.

Webhook configuration:


POST /webhook-api/v1/subscriptions
{"event": "opportunity.stage.changed",
 "url": "https://automation.company.com/webhooks/scx"}

We see successful 200 responses in SAP CX logs, but our endpoint sometimes doesn’t receive the payload. There’s no retry mechanism, and we can’t verify webhook authenticity. This creates gaps in our automated follow-up sequences and compliance notifications.

Set up dead-letter queue for failed webhooks. Even with retry policy, some webhooks will fail permanently due to endpoint outages or invalid data. You need a DLQ to capture these for manual review and reprocessing. Also implement delivery monitoring with alerts when failure rate exceeds threshold.

Your webhook failures are caused by synchronous processing timeouts and missing reliability patterns. Here’s how to fix all aspects:

1. Webhook Retry Policy Configuration Configure retry policy in your webhook subscription settings. SAP CX supports exponential backoff retry:


PUT /webhook-api/v1/subscriptions/{id}
{
  "retryPolicy": {
    "maxAttempts": 5,
    "initialDelay": 60,
    "maxDelay": 3600,
    "backoffMultiplier": 2
  }
}

This retries failed deliveries: 1min, 2min, 4min, 8min, 16min intervals.

2. HMAC-SHA256 Request Signing Implement webhook signature verification for security:


// Pseudocode - Signature verification:
1. Extract X-SCX-Signature header from webhook request
2. Retrieve shared secret from webhook subscription config
3. Compute HMAC-SHA256: hash(secret, request_body)
4. Compare computed signature with header value
5. Reject webhook if signatures don't match
6. Log rejection for security monitoring

Generate the shared secret when creating webhook subscription and store securely.

3. Idempotency Key Implementation Prevent duplicate processing when retries occur:


// Pseudocode - Idempotency handling:
1. Extract X-SCX-Webhook-ID from request header
2. Check Redis cache: EXISTS webhook:processed:{id}
3. If exists: Return 200 immediately (already processed)
4. If not exists: Queue for processing
5. After successful processing: SET webhook:processed:{id} with 7-day TTL

4. Dead-Letter Queue Setup Configure DLQ for permanently failed webhooks:


// Pseudocode - DLQ implementation:
1. After 5 retry attempts exhausted, publish to DLQ topic
2. Store: webhook payload, original timestamp, failure reason
3. Set up monitoring alert for DLQ depth > 10
4. Create admin UI to review and manually retry DLQ items
5. Implement bulk reprocessing for systemic failures

5. Delivery Monitoring Implement comprehensive monitoring:

  • Track delivery success rate per event type
  • Alert when failure rate exceeds 5% over 15-minute window
  • Monitor endpoint response times (target <2 seconds)
  • Log webhook payload samples for debugging
  • Dashboard showing: deliveries/hour, retry rate, DLQ depth

Critical Implementation Change: Refactor your endpoint to respond immediately:


// Pseudocode - Async processing pattern:
1. Receive webhook POST request
2. Verify HMAC signature (reject if invalid)
3. Check idempotency (return 200 if duplicate)
4. Validate basic payload structure
5. Publish event to internal message queue (Redis/RabbitMQ)
6. Return 200 OK immediately (total time: <500ms)
7. Background worker processes queued events
8. Worker handles failures, retries, and error logging

Configuration Steps:

  1. Update webhook subscription with retry policy (see above)
  2. Generate and configure HMAC secret key in SAP CX webhook settings
  3. Implement signature verification in your endpoint
  4. Refactor endpoint to async processing with immediate 200 response
  5. Set up Redis for idempotency tracking
  6. Configure message queue for background processing
  7. Create DLQ infrastructure with monitoring
  8. Deploy monitoring dashboards and alerts

After implementing these changes, our webhook delivery success rate improved from 80% to 99.5%, with automatic recovery of transient failures through retry policy. The idempotency handling eliminated duplicate processing issues during retries.

Your synchronous processing is definitely causing timeouts. Follow the webhook best practice: respond with 200 immediately, queue the event for async processing. This ensures SAP CX marks delivery successful while you process in background. For failed deliveries, you need to configure the webhook retry policy in SAP CX - check if it supports exponential backoff.