Automated non-conformance escalation to SAP quality module using ETQ REST API

I want to share our implementation of automated non-conformance escalation between ETQ Reliance and SAP’s quality management module. We were manually transferring non-conformance data between systems, which caused delays and data inconsistencies.

We built a bidirectional integration using ETQ’s REST API that automatically creates quality notifications in SAP when non-conformances exceed defined thresholds in ETQ. The integration handles OAuth2 authentication, field mapping, and error handling with retry logic.

// Key API endpoint configuration
String etqEndpoint = "/api/v1/nonconformances";
String sapEndpoint = "/sap/opu/odata/QM_NOTIFICATION";

The solution reduced our escalation time from 2-3 days to near real-time and eliminated manual data entry errors. Happy to share technical details about the implementation approach.

Great questions - let me provide comprehensive details on our implementation approach:

REST API Integration Architecture: We built a middleware service layer using Java Spring Boot that sits between ETQ Reliance and SAP. This service subscribes to ETQ webhook events for non-conformance updates and uses ETQ’s REST API for data retrieval. The architecture provides loose coupling, allowing either system to be updated independently without breaking the integration.

OAuth2 Authentication Implementation: We implemented OAuth2 client credentials flow for secure authentication. The process involves:

  1. Register the integration application in ETQ Admin Console to obtain client credentials
  2. Request access token from ETQ’s OAuth2 endpoint using client ID and secret
  3. Include bearer token in all API request headers
  4. Implement automatic token refresh before expiration (tokens typically valid for 1 hour)
  5. Store credentials in HashiCorp Vault for security
  6. Implement retry logic with exponential backoff for authentication failures

The authentication service maintains token state and handles refresh transparently, ensuring uninterrupted API access.

Workflow Automation and Trigger Logic: ETQ’s workflow engine evaluates escalation criteria based on configurable business rules:

  • Immediate escalation: Critical/major severity non-conformances
  • Pattern-based escalation: Three occurrences of same issue within 30 days
  • SLA-based escalation: Non-conformances open beyond defined timeframes (typically 15 days for moderate, 30 days for minor)
  • Impact-based escalation: Non-conformances affecting multiple product lines or customers

When trigger conditions are met, ETQ fires a webhook event to our integration service. The webhook payload includes non-conformance ID, trigger reason, and timestamp. Our service then retrieves full non-conformance details via REST API GET request and initiates SAP quality notification creation.

Error Handling and Resilience: Robust error handling is critical for production reliability:

  • Implement circuit breaker pattern to prevent cascading failures
  • Use message queue (Apache Kafka) for asynchronous processing and guaranteed delivery
  • Log all API transactions with correlation IDs for troubleshooting
  • Implement retry logic with exponential backoff (3 attempts with 2x delay)
  • Send alerts to operations team for persistent failures
  • Maintain error dashboard showing integration health metrics
  • Store failed transactions for manual review and reprocessing

Bidirectional Synchronization Strategy: We designate ETQ as the master system for non-conformance data, while SAP owns quality notification workflow status. The sync logic works as follows:

ETQ to SAP (Create):

  • ETQ triggers webhook when escalation criteria met
  • Integration service creates quality notification in SAP via OData API
  • Store ETQ non-conformance ID and SAP notification number in mapping table
  • Update ETQ with SAP notification number via REST API PATCH request

SAP to ETQ (Update):

  • SAP workflow status changes trigger events captured by our service
  • Integration service queries mapping table to find corresponding ETQ record
  • Update ETQ non-conformance status via REST API PATCH request
  • Sync includes: disposition decision, root cause analysis, corrective actions, closure date

Conflict Resolution:

  • Timestamp-based conflict detection (last write wins)
  • Critical fields (severity, product impact) locked in ETQ after SAP sync
  • Manual review queue for conflicts requiring human decision
  • Audit log maintains complete change history in both systems

Field Mapping and Data Transformation: We built a configurable mapping framework that transforms between ETQ and SAP data models:

ETQ Non-Conformance → SAP Quality Notification:

  • NC Number → Notification Number (with prefix ‘ETQ-’)
  • Description → Short Text (truncated to 40 chars, full text in Long Text)
  • Severity → Priority (mapped: Critical=1, Major=2, Moderate=3, Minor=4)
  • Product → Material Number (lookup via product master data service)
  • Root Cause → Defect Code (mapped via configuration table)
  • Corrective Actions → Task List (multiple actions create multiple tasks)

SAP Quality Notification → ETQ Non-Conformance:

  • Status → Workflow Stage (In Progress, Under Review, Closed)
  • Completion Date → Closure Date
  • Final Cost → Financial Impact

The mapping configuration is externalized in database tables, allowing business users to modify mappings without code changes.

Performance and Scalability: Our implementation handles approximately 200-300 non-conformance escalations per month with average processing time under 5 seconds. The architecture scales horizontally by adding integration service instances behind a load balancer. We use database connection pooling and API request batching to optimize performance.

Business Impact: This automated integration delivered significant benefits:

  • Reduced escalation time from 2-3 days to near real-time (under 5 minutes average)
  • Eliminated manual data entry errors (previously 8-10% error rate)
  • Improved compliance with escalation SLAs (from 75% to 98%)
  • Enhanced visibility through unified quality dashboards spanning both systems
  • Freed quality team from 15-20 hours per week of manual data transfer

The solution demonstrates how ETQ’s REST API capabilities enable seamless integration with enterprise systems, transforming manual quality processes into automated, efficient workflows while maintaining data integrity and compliance requirements.

We have multiple trigger conditions configured in ETQ’s workflow. High-severity non-conformances (critical or major) escalate immediately. For moderate severity, escalation triggers if the same issue occurs three times within 30 days, indicating a systemic problem. We also escalate if a non-conformance remains open beyond defined SLA timeframes. The workflow engine in ETQ evaluates these conditions and calls our integration service via webhook when escalation criteria are met. This keeps the business logic in ETQ while the integration service focuses on technical data transfer.

We used client credentials grant since this is a system-to-system integration without user interaction. ETQ’s API supports OAuth2 with token refresh, which we handle automatically. The authentication service maintains the token lifecycle and refreshes before expiration. We store credentials securely in a vault service rather than hardcoding them. The initial setup requires registering your integration application in ETQ’s admin console to get client ID and secret.