Create an import in Flow Builder or select an existing import to modify how the records are sent to NetSuite.
Several operations are available for importing NetSuite records:
- Add: Insert new records into NetSuite. (To avoid adding duplicate records, check Ignore existing records, which is enabled after you select the Add operation.)
- Update: Make changes to existing records in NetSuite.
- Add or update: Combine the Add and Update operations – change an existing record or create one that does not exist.
- Attach: Define a relationship between two records. For example, a Contact record can be associated with a Partner record. The Attach operation also works to attach a file cabinet item, such as an MS Word file, to any record (other than a custom record).
- Detach: Remove a relationship between two records. For example, a NetSuite Opportunity record can be associated with a Customer record. The Detach operation also works to detach a file cabinet item, such as an Excel file, from a record.
- Delete: Permanently delete matching records or files. (You can suppress errors for records that don’t exist when the flow runs by checking Ignore missing records.)
- Delete with care; this operation is irreversible (not backed up and recoverable).
- An alternative strategy to prevent accidental deletions is to use an Update operation to make the record inactive.
- Import mappings are not required and typically not needed. However, you do have the option of assigning values to the deletionreasoncode and deletionreasonmemo records, which are provided by the NetSuite API.
Find existing records
Whenever you select an Add (with Ignore existing records); Update; Add or update; or Delete operation, you must also specify the criteria by which existing records can be identified. Then, integrator.io performs searches against NetSuite records while importing to ensure that the data is synced correctly.
The lookup criteria are displayed in the How can we find existing records? setting.
- Click the Filter ( ) button to open the editor and define lookup criteria, or filters.
- At the right, click Add filter. For more advanced criteria, see Define complex lookup logic, below.
- In the first drop-down list, choose a field from your NetSuite record to be part of your criterion.
- Choose the operation you want performed in the second drop-down list.
- Choose a field from the data available to your flow, in the third drop-down list.
Tip: You can change the operand object type to a field, value, or expression. See Change operand type, below.
- When you’ve defined the filter as you want it, click Save.
By default, each criterion will use the value of a field from the records passing through your flow as its second operand. However, you may change the operand type.
- The Settings gear ( ) button is revealed when the mouse hovers on the third drop-down list. Click to open the Operand settings editor.
- Choose an operand type:
- Field (default): Your import will use a field from records in your flow as its second operand. This is the most common scenario.
- Value: Your import will use a hard-coded value as its second operand. Use this option when the NetSuite records you are searching for have a fixed value in a given field.
- Expression: Your import will use a handlebars helper expression, making use of fields from records in your flow. Use this option when you need to use complex logic in a single lookup criterion to find the NetSuite records.
- Click Save to return to the Define lookup criteria editor with the selected operand type.
If you’ve chosen Value or Expression for a given criterion, the drop-down list of flow data fields will be replaced with a text entry box in which you can enter your value or handlebar expression.
The Define lookup criteria editor allows you to build complex filters by combining criteria with Boolean operations – NOT, AND, and OR – and grouping logical clauses.
If your filter already has one criterion, clicking Add filter in the editor will add a new criterion that will be combined with your first criterion by a logical AND expression, meaning that both criteria must evaluate true for the whole expression to be true. You may change the logic for the criteria group by toggling from AND to OR – or invert the logic of the group by clicking the NOT button.
Clicking Add group in the editor will create a “nested” group of criteria. By using combinations of NOT, AND, and OR, you can build complex logical lookup criteria to precisely identify existing NetSuite records.
See your logic
After you’ve saved the filter, the logic that you’ve created will be displayed under How can we find existing records?.
Find out more about filters and import configuration in our Community forum, where you can ask questions and post answers.