2. Field Mapping

Consulting the documentation for the mock core, we see there are 5 fields of interest to us:

  • name.firstName

  • name.lastName

  • emailAddresses.ElectronicAccessLines.AddrLine

  • identification.dateOfBirth

  • persTypes.PersonTypeCode

Right-click on the create_new_customer Service Request and select Go To > Field Mapping. Click + Add Row 5 times to create 5 empty field mappings.

Each of the fields required by the core can be populated using data we received from randomuser.me, so we simply need to set up the mapping between the fields across the two systems.

First, we'll populate all the fields that the core expects. In the field column, copy in the following JSON paths:

Field

Name.FirstName

Name.LastName

EmailAddresses.EmailAddress[0].ElectronicAddressLines.ElectronicAddressLine[0].AddrLine

Identification.DateOfBirth

Identification.DateOfBirth

Now for each field that the core expects, we'll enter the JSON path to the value as it exists in the response from randomuser.me:

FieldValue

name.firstName

request_user.payload.results[0].name.first

name.lastName

request_user.payload.results[0].name.last

emailAddresses.ElectronicAccessLines.AddrLine

request_user.payload.results[0].email

identification.dateOfBirth

request_user.payload.results[0].dob.date

persTypes.PersonTypeCode

"individual"

Notice that while the first four items are JSON Paths into the object returned by randomuser.me, the last item is a static value, as it will always be the same for all users created by this integration.

Finally, fill out str for the Value Type column for all rows.

We have now transformed the data received from randomuser.me into the format that the mock banking core expects.

Save your changes.

Last updated