Event-driven Process (Condition Record)

This article describes how SAP Integration Suite can enable synchronization between Pricefx Condition Records and SAP S/4HANA Price Conditions using event-driven approach. Below example shows how Sales condition record integration is implemented.

Introduction

When condition records are generated in Pricefx, a CONDITION_RECORD_CREATION_FINISHED event can be triggered. SAP Integration Suite listens to this event and triggers the condition record synchronisation process to create Sales Condition or Purchasing Condition in SAP S/4HANA. The event contains the updated condition record sets and the source of the price conditions, which can be either Price List, Price Grid, Quote or Contract.

Listen to Pricefx RabbitMQ Events

This integration flow can be copied and modified from “Sample Artifacts for SAP S/4HANA Integration with Pricefx“ package. Remove any branches which are not relevant to your integration use case. For this use case, only Price Record local integration process is required.

Please raise a support ticket to obtain the RabbitMQ connection properties and enable the required Pricefx events.

Screenshot 2025-08-21 at 9.55.56 am.png

Below parameters have to be configured:

  1. RabbitMQ connection properties and the name of the event queue.

Below parameters can be configured but default values are provided:

  1. Main receiver – The integration flow which processes the events.

  2. Transaction handling

Aggregate Condition Record Events from Pricefx

The integration flow aggregates condition created events from Pricefx. The aggregated events are forwarded to the next integration flow for further processing.

Screenshot 2025-08-21 at 9.57.51 am.png


Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Main receiver – The integration flow which processes the aggregated events.

  3. Error receiver – The error handling integration flow.

  4. Transaction handling

  5. Aggregator properties – Defines how the Price Record events should be aggregated.

  6. Filter properties - Defines the records to be extracted

  7. Message header properties

Process Condition Record Events from Pricefx

This integration flow removes duplicated source IDs and condition record set IDs and retrieves the condition record set information. The records are then published to a JMS queue.

Screenshot 2025-08-21 at 10.04.42 am.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Main receiver – The integration flow which publishes the message to a JMS queue

  3. Condition record set receiver - The integration flow which retrieves the condition record set details

  4. Error receiver – The error handling integration flow.

  5. Transaction handling

  6. Filter properties - Defines the records to be extracted

  7. Message header properties

Get sales price condition records from Pricefx

This integration flow is triggered from a JMS queue. It fetches one batch of condition records from condition record set. It gets any metadata required for the integration from the value mapping. This value mapping is configured per condition record set table. Once the first batch of records are fetched, they will be set to integration status = 1 (or any numeric value you defined in the mapping) to indicate the records are being processed and would not be fetched again in next call. These records are then sent to the next process to create price conditions in SAP S/4HANA. The process would be repeated by putting the message into the JMS queue again until no more records can be fetched from the condition record set.

Screenshot 2025-08-21 at 10.18.41 am.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Create condition receiver - The integration flow which creates the price conditions in S/4HANA

  3. Republish receiver - The integration flow which publishes the message to a JMS queue again for next batch

  4. Fetch condition records receiver – The integration flow which fetches the records from Pricefx

  5. Update condition status receiver - The integration flow which updates the condition status.

  6. JSON array XML receivers - The integration flows which convert JSON array to/from XML

  7. Error receiver – The error handling integration flow.

  8. Transaction handling

  9. Fetch records request message

  10. Value mappings keys

  11. Page size

  12. Splitter properties

  13. Message header properties

Update condition records to Pricefx

This integration flow invoke the Pricefx Integration Adapter update operation to update any condition records.

Screenshot 2025-08-21 at 12.13.35 pm.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Pricefx Integration Adapter properties

  3. Error receiver – The error handling integration flow.

  4. Pricefx connection properties receiver - The integration flow which retrieves Pricefx connection properties from value mapping by environment

  5. Transaction handling

  6. Value mappings keys

  7. Connection properties xpath

  8. Names of all available Pricefx tokens

  9. Message header properties

Update Processing Condition Records Status in Pricefx

This integration flow invoke the Pricefx Integration Adapter to update status of the condition records to Processing.

Screenshot 2025-08-21 at 12.17.22 pm.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. PFX receiver - The integration flow which writes the records to Pricefx

  3. Error receiver – The error handling integration flow.

  4. Error log receiver – The integration flow which reports the error.

  5. Transaction handling

  6. JSON array XML receivers - The integration flows which convert JSON array to/from XML

  7. Message header properties

  8. Splitter properties

  9. Condition record set xpath

Create sales price condition records in SAP S4HANA

This integration flow creates sales price conditions in SAP S/4HANA by OData API. The results are written back to Pricefx condition records.

Screenshot 2025-08-21 at 12.23.44 pm.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. SAP Connection properties receiver - The integration flow which retrieves SAP connection properties from value mapping

  3. Error receiver – The error handling integration flow.

  4. PFX receiver - The integration flow which writes the records to Pricefx

  5. SAP result receiver - The integration flow which extracts SAP results from the response

  6. PFX result update receiver - The integration flow which writes the results back to Pricefx

  7. OData properties

  8. Transaction handling

  9. Message header properties

  10. Connection properties xpath

  11. Names of all available SAP tokens

Update S4HANA Condition Records Results to Pricefx Condition Records

This integration flow updates the Pricefx condition records with SAP S/4HANA OData results. The results can be a new condition record generated in SAP S/4HANA or an error message returned by the API. If the Pricefx update is failed due to concurrent update issue, the status would be reset to processing and the record will be re-processed again.

Screenshot 2025-08-21 at 12.34.07 pm.png

Below parameters can be configured but default values are provided:

  1. Sender – The process direct incoming path of this integration flow.

  2. Error receiver – The error handling integration flow.

  3. Error log receiver – The integration flow which reports the error.

  4. JSON array XML receivers - The integration flows which convert JSON array to/from XML

  5. Retry receiver - The integration flow which reprocesses the message

  6. PFX receiver - The integration flow which writes the records to Pricefx

  7. Reset status receiver- The integration flow which resets the status to processing.

  8. Transaction handling

  9. Message header properties

  10. Page size

  11. Condition record set xpath

Logging

All the logs are forwarded to Send Log to email by default. You can configure your own log handling process by configuring the parameters of log receivers and error receivers in the integration flows.