Contents
The integration app uses flows to sync data between the apps. The field value from one app is used to populate the field value for a record in another app. You'll notice for every field on a Salesforce record, there is a substitute field on a NetSuite record. For example, you can sync the shipping address in Salesforce to address lines 1 and 2 in NetSuite.
The shipping address format differs between Salesforce and NetSuite. The integration app allows you to sync address-related data by mapping fields between Salesforce and NetSuite. You can map mailing, billing and shipping addresses between Salesforce and NetSuite. Salesforce stores all addresses in an address text box (single field). However, NetSuite stores address in individual lines (two or more fields based on the configuration set). By default, NetSuite allows you to store mailing, billing, and shipping addresses in address lines 1 and 2. You can configure NetSuite to store the address in an additional address line 3.
To map and split multi-line address from Salesforce to multiple address lines in NetSuite, you need to use an expression in your flow mappings.
Navigate to flow field mappings
To navigate to field mappings of a flow:
- Go to integrator.io and navigate to the Salesforce-NetSuite IO integration tile.
- Go to Flows.
- Click Edit mappings next to the flow name to open up the Edit Mappings page.
Map Salesforce import fields to NetSuite export fields
Read more to know about mapping fields between Salesforce and NetSuite. To configure field settings (icon next to a field), refer to Field Settings.
Map addresses between Salesforce and NetSuite
Know before you map the fields:
- You can map and split multi-line shipping and shipping addresses from Salesforce to multiple address lines in NetSuite.
- You can split Salesforce shipping and shipping addresses into NetSuite address lines for Account and Contact flows.
Map Salesforce address to NetSuite address line 1
We’ve used a shipping address for illustrative purposes. The process for mapping the shipping address remains the same.
To sync a multi-line Salesforce address to NetSuite address line 1:
- Refresh the “Export Field (Salesforce)” and “Import Field (NetSuite).“
- Map ShippingAddress1 export field to Shipping Address 1 import field.
- Click Save.
Map a Salesforce address to NetSuite address lines 1 and 2
Know before you map the fields:
- We’ve used a shipping address for illustrative purposes. The process for mapping the shipping address remains the same.
- If you map a multi-sentence address between Salesforce address to NetSuite address lines 1, and 2 the integration app syncs additional lines to the NetSuite address line 2.
To split and sync a multi-line Salesforce address to NetSuite address lines 1 and 2:
- Refresh the “Export Field (Salesforce)” and “Import Field (NetSuite).“
- Map ShippingAddress1 export field to Shipping Address 1 import field.
- Map ShippingAddress2 export field to Shipping Address 2 import field.
- Click field setting next to Shipping Address 2.
- From the settings box, select “Multi-Field.”
-
Enter the value mentioned below into the Expression text box:
{{#if ShippingAddress1}} {{regexReplace ShippingStreet '' ShippingAddress1 g}} {{/if}} - Click Save.
- Click Save.
Understand the regex (regular expression):
- Shippingstreet here means the full address mentioned in two or more lines in Salesforce.
- For shipping address: Shippingaddress1, Shippingaddress2 and Shippingaddress3 are the names used internally by Celigo for applying the code logic.
- For billing address: Billingaddress1, Billingaddress2 and Billingaddress3 are the names used internally by Celigo for applying the code logic.
- As there are two address lines in NetSuite, the handle bar expression “{{#if ShippingAddress1}} {{regexReplace ShippingStreet '' ShippingAddress1 g}} {{/if}}” uses the full address in Salesforce i.e Shippingstreet to replace with the Shippingaddress 2 (means address line 2 in Salesforce) and other additional lines in Salesforce.
Understand the Salesforce and NetSuite records after the flow run
Map a Salesforce address to NetSuite address lines 1, 2, and 3
Know before you map the fields::
- We’ve used a shipping address for illustrative purposes. The process for mapping the shipping address remains the same.
- If you map a multi-sentence address between Salesforce address to NetSuite address lines 1, 2, and 3 the integration app syncs additional lines to NetSuite address line 3.
- You need to configure NetSuite to store addresses in an additional address line 3.
To split and sync a multi-line Salesforce address to NetSuite address lines 1, 2, and 3:
- Refresh the “Export Field (Salesforce)” and “Import Field (NetSuite).“
- Map ShippingAddress1 export field to Shipping Address 1 import field.
- Map ShippingAddress2 export field to Shipping Address 2 import field.
- Click field setting next to Shipping Address 2.
- From the settings box, select “Multi-Field.”
- Enter the value {{ShippingAddress2}}in the Expression text box.
- Click Save.
- Map ShippingAddress3 export field to Shipping Address 3 import field.
- Click field setting next to Shipping Address 3.
- From the settings box, select “Multi-Field.”
-
Enter the value mentioned below into the Expression text box:
{{#if ShippingAddress2}}
{{regexReplace (regexReplace ShippingStreet '' ShippingAddress1 g) ''ShippingAddress2 g}} - Click Save.
- Click Save.
Understand the regex (regular expression):
- As there are three address lines in NetSuite, the handle bar expression “{{#if ShippingAddress2}}{{regexReplace (regexReplace ShippingStreet '' ShippingAddress1 g) ''ShippingAddress2 g}}” uses the full address in Salesforce i.e Shippingstreet to replace with the Shippingaddress 3 (means address line 3 in Salesforce) and other additional lines in Salesforce.
Check out our community forum to ask questions and get insightful tips on field mappings from our community members.
Comments
This is pretty messy. You mix shipping and billing address in the example above. Also, you should indicate that these BillingAddress1, 2, 3 fields do not appear as available fields to select. Confusing.
David Gollom : you're right, it's really confusing.
* BillingAddress1 doesn't exist in Salesforce export (there is no field for line 1 in Salesforce)
* Regex rule on ShippingAddress for populate BillingAddress is not correct
should there be a
{{/if}}
at the end of the second example (step 4 of
Map a Salesforce address to NetSuite address lines 1, 2, & 3)
This article is no longer relevant as it references legacy Salesforce features. The address mapping can actually be built in a simpler way now.
Please sign in to leave a comment.