Sample Integration Flows

Process Quote Events from Pricefx

This integration flow is a template for processing Pricefx quote events and performing appropriate actions. You can have different actions for different Quote Types.

Configuration

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

  2. Transaction handling

  3. XPaths to locate the quote ID and Quote Type

  4. Main receiver – The integration flow which processes the quote event.

  5. Pricefx connection properties

Listen to Pricefx RabbitMQ Events

This integration flow is a template for listening to Pricefx events and performing appropriate actions. You should modify this flow based on the events you will listen to.

You need to have one integration flow for each Pricefx partition.

See Listen to Pricefx RabbitMQ Events for a configuration example.

Aggregate Messages from SAP S/4HANA and Write to Pricefx

This integration flow waits for multiple messages from the previous process and aggregates them together for another flow to process. This can reduce the number of calls to downstream applications. The aggregated message contains a list of IDs from a series of events.

Configuration

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

Get Latest Updated Data by Polling at Intervals

This integration flow runs periodically at the configured timer interval to synchronize data between SAP S/4HANA and Pricefx. It provides an example to synchronize Sales Orders, Price Conditions, products and customers. You need to modify this process if you synchronize different data types.

Configuration

  1. Scheduler properties

Get Latest Updated Entities from SAP S/4HANA and Write to Pricefx

This integration flow is a template for retrieving updated entities from SAP S/4HANA by OData in pages and for writing to Pricefx.

You need to have one copy of this flow per each Pricefx entity.

Configuration

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

  2. Main receiver – The integration flow which converts OData response retrieved from SAP S/4HANA to Pricefx request and writes to Pricefx.

  3. Error receiver – The error handling integration flow.

  4. Log receiver – The error handling integration flow.

  5. OData connection properties and queries

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

  7. Transaction handling

Rerun Error Response from SAP S/4HANA and Write to Pricefx

This integration flow picks up messages from error data store and triggers the process to write to Pricefx again.

You need to have one copy of this flow per each Pricefx entity for which error handling is required.

Configuration

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

  2. Main receiver – The integration flow which re-processes the error message.

  3. Transaction handling

  4. Error data store

Write Message to Queue

This integration flow writes messages to a queue defined in SAP Event Mesh.

Configuration

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

  2. Transaction handling

  3. AMQP connection properties

Rerun Error Data by Polling

This integration flow runs periodically at the configured timer interval to rerun error message in data stores. You should modify this process if you synchronize other data types.

Configuration

  1. Scheduler properties

Refresh Pricefx OAuth Token

This integration flow gets or refreshes the access token and stores the tokens in the global variables for Pricefx connections in your environment. You will need to duplicate this integration flow for each Pricefx partition. This is run periodically at the configured interval.

  1. Get the stored tokens from global variables.

  2. Check if the token creation or token refresh is required.

  3. Get the tokens via Pricefx Integration Adapter.

     

    Sample JSON response from the get token operation:

    { "access-token": "03D43F56-xxxx-xxxx-xxxx-xxxxxxxxxxx", "refresh-token": "CE1F7DE5-xxxx-xxxx-xxxx-xxxxxxxxxxx", "token-type": "Bearer", "expires-in": 3600 }

     

  4. Extract the token from the JSON response message by a Groovy script and write to global variables.

    import com.sap.gateway.ip.core.customdev.util.Message; import groovy.json.* def Message processData(Message message) { //Body def body = message.getBody(String.class); def jsonSlurper = new JsonSlurper() def json = jsonSlurper.parseText(body) message.setProperty("access-token", json.attribute13) message.setProperty("refresh-token", json.attribute14) return message }

     

For details see Pricefx SAP Integration Adapter - Authentication.

Configuration

  1. Pricefx connection properties

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

  3. Transaction handling

  4. Refresh intervals

Refresh SAP S/4HANA OData Cookie and CSRF Token

This integration flow gets the cookie and CSRF token from SAP S/4HANA fetch token operation and stores them in global variables for all token protected SAP OData connections in your environment. The fetch token operation can be any OData GET operation with x-csrf-token=”Fetch” header.

Configuration

  1. OData connection properties

  2. Variable name of the S/4Hana access token and cookie token

Write Records to Pricefx

This integration flow transforms the message to Pricefx upsert or bulk load request and writes to Pricefx table via Pricefx SAP Integration Adapter.

If the data volume is huge and the data quality from SAP S/4HANA is good enough, Bulk Data Load should be used. This mode is faster but with very limited data validation. Upsert is slower and good only for small data volume but it also validates most of the data.

You need to have one copy of this flow per each Pricefx entity.

Configuration

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

  2. Error receiver – The error handling integration flow.

  3. Pricefx connection properties

  4. Pricefx action and batch size

  5. Transaction handling

  6. Error data store

  7. Split and Gather properties

  8. Message Mapping to build upsert request from the message

  9. Message Mapping to flatten the upsert request to a list of values in XML

  10. Headers of all the required fields in a bulk load request

Note: The mapping must start with the prefix ‘ref:’ according to Dynamic Mapping requirement of SAP Integration Suite. The ID can be found under “View metadata” of your mapping.