{"ref":"content:groovy-script-to-compare-xml-payloads-in-sap-cpi","page":"/content/groovy-script-to-compare-xml-payloads-in-sap-cpi","json":"/content/groovy-script-to-compare-xml-payloads-in-sap-cpi.json","generated":"2026-11-15","drafted_with_ai":true,"entity":{"id":"groovy-script-to-compare-xml-payloads-in-sap-cpi","title":"Groovy Script to Compare XML Payloads in SAP CPI","url":"https://community.sap.com/t5/technology-blog-posts-by-members/groovy-script-to-compare-xml-payloads-in-sap-cpi/ba-p/13650630","content_type":"blog","published_on":"source:sap-community","explains":["capability:integration-flows"],"summary":"Walks through an [integration flow](capability:integration-flows) on [Cloud Integration](artifact:btp-cloud-integration) that detects which records changed between two XML payloads: two Content Modifier steps store the old and new employee datasets as exchange properties, and a Groovy script step parses both with `XmlSlurper`, matches employees by `EMPLOYEE_ID`, compares each child element's text and rebuilds only the changed records with `MarkupBuilder`. The full script and both sample payloads are shown, and the flow's purpose is to shrink a message to just its updated segments before it moves on downstream.","author":"gaganhl","published":"2024-03-27","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"integration-suite-tag"}],"first_seen":"2026-10-28"},"drafted_with_ai":true},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"poor","evidence":"published 32 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2024-03-27"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":11289,"unit":"views"},{"value":1,"unit":"comments"},{"value":8,"unit":"likes"}]},"signals":{"views":11289,"likes":8,"comments":1,"metrics_at":"2026-11-01"},"series":null,"edges":{"authors":[]}}