Problem: When we want to synchronise the Salesforce Contact/Account object with the Netsuite Customer Object, we cannot map Shipping and Billing Addresses to the Netsuite Address Object. The reason is, on Salesforce, Shipping and Billing details are part of Object itself, whereas on Netsuite Addresses is a List Type.
Solution: We need to transform Shipping and Billing addresses into a List object and use this List to map into the Netsuite address List.
The recipe below shows how to transform Contact Shipping and Billing addresses to List.
Create a Temporary List with size 2 to be used for iterating over.
Iterate Over the List
Create "Contact Address List" with List Action "Append Items to List", define fields like Address Type, City, State, Country, Postal Code etc. ( define the fields based on target application Address fields, so that it will be easier for mapping)
Store Shipping Address and Billing Address as First (index = 0) and Second objects (index =1) in the List.
(there may be multiple ways to map/store addresses like checking index = 0 with CONDITION Action. if you have more than 2 addresses, you can follow the same approach.)
Map Salesforce Mailing and Shipping addresses with Index 0 and 1 for ex:
map Contact Address List to Netsuite Addressbook mapping as shown below:
Recipe URL: https://www.workato.com/recipes/541833
(note: this is a sample recipe to demonstrate scenario)