Mapping is one of the core activities you will be doing, when developing integrations. Syncing data between App A and App B will involve mapping fields from App A to App B. This mapping could be very simple or very complex, depending on your use case and the apps involved. The OIC Mapper works on different levels, this allows us to implement the most simple or most complex of mappings very easily. Let's now look at the different levels.
Level 1 - simple source to target mapping
The following possible sources are available -
- For app or event driven integrations, the initial request payload or event payload. Think of an app driven integration to create a new customer in Netsuite. The integration has a REST trigger, so the request payload will be available as a source.
- Integration Metadata
- Request and response payloads from any invokes performed by the integration e.g. the response payload from Netsuite on customer creation -
Level 2 - using Functions
All of the functions available are fully documented with examples -
So let's look at them -
Advanced - I've highlighted some that are often used in file processing. generate-guid is also used to generate unique identifiers. There are ,of course, salient use cases for all of these functions.
Boolean, Conversion and Date are self explanatory, at least I hope so!
Integration Cloud - getFlowId returns the instance id of the integration. This can be useful for a number of reasons, including compliance. isReplayed - tells us if this integration flow is a re-run.
lookupValue we've already met in the Lookups post.
String functions are often used, a typical example would be concat - where you want to concatenate 2 or more source fields and then map the result to a target field.
User Defined - includes functions that have been imported into the project e.g.
Operators
XSLT Constructors
for-each (iterate over a specified sequence of fields) and for-each-group (select fields or nodes and organize into groups)
Again, the documentation within the mapper is excellent, but you can always google to get more details.
Developer View
The subtle difference here is I see the underlying field names, when I click Developer, otherwise, I see more user friendly element/field names.
Using Search
Some of these SaaS business objects can be very complex with many fields. Take my Netsuite customer object here. I need to map the Address fields, but where are they?
Filter Options
Code View
You can also edit this, once you know what you're doing -
Testing the Mapping
In the tester, you can generate inputs -
Then click Execute to test -
No comments:
Post a Comment