Event-driven Process (Payouts Integration)

This article describes how SAP Integration Suite can enable synchronization between S/4HANA credit / debit memos and Pricefx rebate payout records using event-driven approach.

Listen to Pricefx Rabbit MQ Events

The integration flow listens to quote approval events ('ITEM_APPROVED_RR') from Pricefx via Pricefx MQ Integration Adapter or RabbitMQ Adapter for SAP Integration Suite. Please raise a support ticket to obtain the RabbitMQ connection properties and enable the required Pricefx events. Duplicate “Listen to Pricefx Rabbit MQ Events” from “Sample Artifacts for SAP S/4HANA Integration with Pricefx” package to your package and modify it. The payout branch and its local process show a sample of how a rebate record approved event can be listened to and processed.

payout event.jpg
payout subprocess.jpg

Aggregate Rebate Record Events from Pricefx

The integration flow aggregates Rebate Records approved events from Pricefx. Any events which cannot be processed successfully will be written to the log by email.

aggregate pl.jpg

 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 rebate record events should be aggregated.

Build a List of Rebate Record IDs from Aggregated Pricefx Rebate Events

This integration flow builds a list of rebate record IDs from the aggregated Pricefx rebate events so that the rebate records can be processed in batches.

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. Transaction handling

  4. Error data store

Get Payout Records from Pricefx and Create Credit and Debit Memos

This integration flow multicasts the rebate records IDs to create both credit and debit memos.

Below parameters can be configured but default values are provided:

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

  2. Credit memo receiver – The integration flow which creates credit memo headers.

  3. Credit memo items receiver – The integration flow which creates credit memo items.

  4. Debit memo receiver – The integration flow which creates debit memos headers.

  5. Debit memo items receiver – The integration flow which creates debit memo items.

Get Payout Records from Pricefx and Create Credit Memo in SAP S/4HANA

This integration flow creates credit memo headers in S/4HANA from Pricefx payout records and writes the credit memo IDs back to the payout records.

Below parameters have to be configured:

  1. Pricefx connection properties

  2. S/4HANA OData connection properties

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 writes response to Pricefx.

  3. Log receiver – The logging integration flow.

  4. Error Log receiver - The error handling flow

  5. AIR receiver – The integration flow which retrieves AIR from Pricefx.

  6. Transaction handling

  7. Page size

  8. Split and Gather properties

  9. Message Mapping to build a batch request to create credit memo headers

  10. Message Mapping to extract payout record ID from Pricefx payout records response

  11. Request message to fetch payout records from Pricefx

Get Payout Records from Pricefx and Create Credit Memo Items in SAP S/4HANA

This integration flow creates credit memo items in S/4HANA from Pricefx payout records and writes the credit memo item IDs back to the payout records.

Below parameters have to be configured:

  1. Pricefx connection properties

  2. S/4HANA HTTP connection properties

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 writes response to Pricefx.

  3. Log receiver – The logging integration flow.

  4. Error Log receiver - The error handling flow

  5. AIR receiver – The integration flow which retrieves AIR from Pricefx.

  6. Transaction handling

  7. Page size

  8. Split and Gather properties

  9. Message Mapping to build a batch request to create credit memo items

  10. Message Mapping to extract payout record ID from Pricefx payout records response

  11. Request message to fetch payout records from Pricefx

Get Payout Records from Pricefx and Create Debit Memo in SAP S/4HANA

This integration flow creates debit memo headers in S/4HANA from Pricefx payout records and writes the debit memo IDs back to the payout records.

Below parameters have to be configured:

  1. Pricefx connection properties

  2. S/4HANA OData connection properties

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 writes response to Pricefx.

  3. Log receiver – The logging integration flow.

  4. Error Log receiver - The error handling flow

  5. AIR receiver – The integration flow which retrieves AIR from Pricefx.

  6. Transaction handling

  7. Page size

  8. Split and Gather properties

  9. Message Mapping to build a batch request to create debit memo headers

  10. Message Mapping to extract payout record ID from Pricefx payout records response

  11. Request message to fetch payout records from Pricefx

Get Payout Records from Pricefx and Create Debit Memo Items in SAP S/4HANA

This integration flow creates debit memo items in S/4HANA from Pricefx payout records and writes the debit memo item IDs back to the payout records.

Below parameters have to be configured:

  1. Pricefx connection properties

  2. S/4HANA HTTP connection properties

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 writes response to Pricefx.

  3. Log receiver – The logging integration flow.

  4. Error Log receiver - The error handling flow

  5. AIR receiver – The integration flow which retrieves AIR from Pricefx.

  6. Transaction handling

  7. Page size

  8. Split and Gather properties

  9. Message Mapping to build a batch request to create debit memo items

  10. Message Mapping to extract payout record ID from Pricefx payout records response

  11. Request message to fetch payout records from Pricefx

Update Payout Records in Pricefx

The integration flow transforms the response from SAP S/4HANA and updates the payout records to Pricefx. It is modified from “Write records to Pricefx” from the “Sample artifacts for SAP S/4HANA Integration with Pricefx” package.

Below parameters have to be configured:

  1. Pricefx connection properties

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. Transaction handling

  4. Error data store

  5. Message Mapping to build update request from the message

  6. Element name that the update payout calculation logic requires