Sample Integration Flows
- 1 Process Quote Events from Pricefx
- 2 Listen to Pricefx RabbitMQ Events
- 3 Aggregate Messages from SAP S/4HANA and Write to Pricefx
- 4 Get Latest Updated Data by Polling at Intervals
- 5 Get Latest Updated Entities from SAP S/4HANA and Write to Pricefx
- 6 Rerun Error Response from SAP S/4HANA and Write to Pricefx
- 7 Write Message to Queue
- 8 Rerun Error Data by Polling
- 9 Refresh Pricefx OAuth Token
- 10 Refresh SAP S/4HANA OData Cookie and CSRF Token
- 11 Write Records to Pricefx
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
Sender – The process direct incoming path of this integration flow.
Transaction handling
XPaths to locate the quote ID and Quote Type
Main receiver – The integration flow which processes the quote event.
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
Sender – The process direct incoming path of this integration flow.
Main receiver – The integration flow which processes the aggregated events.
Error receiver – The error handling integration flow.
Transaction handling
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
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
Sender – The process direct incoming path of this integration flow.
Main receiver – The integration flow which converts OData response retrieved from SAP S/4HANA to Pricefx request and writes to Pricefx.
Error receiver – The error handling integration flow.
Log receiver – The error handling integration flow.
OData connection properties and queries
AIR receiver – The integration flow which retrieves AIR from Pricefx.
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
Sender – The process direct incoming path of this integration flow.
Main receiver – The integration flow which re-processes the error message.
Transaction handling
Error data store
Write Message to Queue
This integration flow writes messages to a queue defined in SAP Event Mesh.
Configuration
Sender – The process direct incoming path of this integration flow.
Transaction handling
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
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.
Get the stored tokens from global variables.
Check if the token creation or token refresh is required.
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 }
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
Pricefx connection properties
Sender – The process direct incoming path of this integration flow.
Transaction handling
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
OData connection properties
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
Sender – The process direct incoming path of this integration flow.
Error receiver – The error handling integration flow.
Pricefx connection properties
Pricefx action and batch size
Transaction handling
Error data store
Split and Gather properties
Message Mapping to build upsert request from the message
Message Mapping to flatten the upsert request to a list of values in XML
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.