cancel
Showing results for 
Search instead for 
Did you mean: 

CPI Message Mapping source and target message

tmkglk
Explorer
0 Kudos
482

Hello Experts, 

I am working on several iFlows for integrations between SAP Products (S4 MDM, Sales Cloud, CPQ) and a 3rd Party. I need to create message mappings. Right now I have got only simple tables with the names of the fields from the source and target system and how they should be mapped. Is my understanding right that: 
In order to do the message mapping I need source and target messages (XSD, XML, WSDL, Swagger/OpenAPI Spec JSON file) which have to be given to me by the sender and receiver party.

  1. Creating an XSD or OpenAPI Spec by myself my on the basis of the tables I got or even sample payloads might be tricky because it doesn't guarantee that the schemes I will get from it will be 100 % corresponding with what the sender/reciver will eventually send/expect (the developement at sender/receiver side is not finalized yet); the recation might be quite complicated as well.
  2. Would using another artifact instead of Message Mapping like e.g. XSLT Mapping be an option? I have no experience with XSLT so I am not sure if it offers the capabilieties required for the mapping (the mappings itself aren't going to be complicated: 1:1 field mapping, excluding fields or merging).
  3. The iFlows are to/from SAP Products, but we will be using some custom fields, so I can't use the APIs available in the SAP Business Accelerator Hub since those are provided only for standard solutions and data objects?

What are your thoughts on this issue?

Thanks in advance,

TG

View Entire Topic
MAVR
Product and Topic Expert
Product and Topic Expert

Hi TG,

Message Mapping is recommended when you have a documented and defined schema for your APIs. Additionally, when these APIs change, the documentation can be regenerated by the API provider (i.e., OData, SOAP (or even IDoc) adds or changes fields and definitions, and metadata is automatically updated. Then, an edmx or XSD schema file can be generated or imported automatically).

If this is not the case, it is recommended that you use (Groovy) Scripts or XSLT because these options are not fixed or bound to a known schema. I prefer Groovy because it can be used with delimited (comma, pipe, tab, etc.) files, fixed-length files, compressed (zip or archive) files, XML, JSON, YAML, and more.

JSON: https://groovy-lang.org/processing-json.html
XML: https://groovy-lang.org/processing-xml.html
YAML: https://groovy-lang.org/processing-yaml.html
Delimited: https://groovy.apache.org/blog/reading-and-writing-csv-files

Keep integrating 🖖🏻
Best regards,

Ricardo