Customer lookup functionality
The Primary Customer Lookup Criteria and Secondary Customer Lookup Criteria in the flow settings are used to identify the existing customer when importing an order or customer. The integration app first runs the primary lookup in NetSuite, if no matches are found, then the secondary lookup is run, and if there is any customer record matching, NetSuite returns the internal ID and the integration app updates the customer record with the particular internal ID. If the search doesn’t return an internal ID, the integration app assumes the record as a new customer, and creates one.
Primary Customer Lookup Criteria
Secondary Customer Lookup Criteria
Customer import conditional mapping
When mapping data for import, an additional advanced option called Conditional Mapping allows you to specify the conditions under which you would like the data imported. You can define whether a field mapping should be applied or not under certain conditions. For example, these mapping conditions can be for creating a record, updating a record, etc. For more information on conditional mapping, refer to the Conditionally map source record fields.
Issue
The integrator.io considers only the primary lookup criteria for identifying the customers as the primary lookup is an import component and doesn’t consider the secondary lookup as it is not part of the import component, because of which the conditional mapping doesn’t work as expected when the secondary lookup finds a customer record. For example, as per the following screenshot, whenever the primary lookup fails or doesn’t find any matches, the flow immediately applies the conditional mapping whenever a new record is created, without matching the secondary lookup criteria.
Resolution
To overcome this issue, add the secondary lookup criteria to the primary lookup condition itself using an OR condition so that if any of the criteria matches, the integrator.io applies the conditional mapping correctly.
To add secondary filter criteria:
- In a list of integration flows, on the Magento Customer to NetSuite Customer Add/Update flow, click Configure settings.
- Click the filter icon near the Primary Customer Lookup Criteria. The Settings pane opens the Define lookup criteria screen with the usual filter options.
- Select the condition between the filter groups as OR.
- Click Add Group and add the conditions and operators as shown in the following screenshot.
- Click Save.
Comments
Hello, thank you for explaining this!
What is the difference/relationship between these mappings and the ability to edit how the import is finding existing records (see image; the criteria is my own) though?
For example, what if the field above ("How can we find existing records?") is looking for different criteria than the Primary/Secondary Lookup Criteria you outlined above?
How do they interact with each other?
Chase Barrett, please let us know the criteria you are looking for. Click the filter icon in the screenshot below to select the required one from the displayed list (on the Define lookup criteria tab).
If you have any queries, we recommend raising a support ticket so our support team can assist you.
Please sign in to leave a comment.