Apps
NetSuite
34 min
learn how to connect engini to netsuite with the netsuite activities in engini you can create, update, delete, get one or more records getting started with netsuite prerequisites access to netsuite admin account identify all netsuite permissions required connecting engini to netsuite com netsuite integration and access configuration enable web services & token based authentication navigate to “enable features” form using the following path as described below and in the picture setup > company > enable features navigate to the “suitecloud” tab enable client suitescript & server suitescript in the suitescript section enable soap web services & rest web services in the suitetalk section enable token based authentication & oauth 2 0 in the manage authentication section scroll back to the top of the page and save the changes create an integration record create a new integration record by navigating to the following path as described below and in the picture setup > integration > manage integrations > new provide a name to the integration record & make sure that the state is enabled enable token based authentication & disable authorization flow in the token based authentication section disable authorization code grant in the oauth 2 0 section save the integration record copy and story the consumer key and secret somewhere safe since it will be displayed for you only once and we will need it to authenticate netsuite with engini create an integration role – likely the most important part create a new integration role by navigating to the following path as described below and in the picture setup > users/roles > manage roles > new provide a name to the integration role if you are planning to interact with records that were created by administrators and/or do actions that require administrator role you should also check the “core administration permissions” checkbox on the right side of the general tab as seen below check the “all” option & enable “allow cross subidiary record viewing” in the subsidiary restrictions section optional – you can set this role as a web services only role in the authentication section meaning you won’t be able to sign in the netsuite ui using this role but only to interact with it’s api’s setting up permissions in the permissions section (as example we will show adding a permissions to sales orders transactions) in the transaction tab choose “sales order”, then choose the permission level on the right column from the available options (view/create/edit/full) and click on add button in the same tab, also add the find transaction permission as seen in the picture below this permission will enable you to query netsuite for transactions like sales orders, invoice, etc the sales order has different lists related to it – for example, customers and item collection (order items) to get access to those lists we need to define them in the lists tab with the appropriate permissions level as following we will need to add the following permissions in the setup tab as seen in the picture below to allow querying netsuite and get lists of result we will need to add “suiteanalytics workbook” permissions in the reports tab as seen in the picture below scroll back to the top of the page and save the changes assign the integration role – you can choose to create a new user or assign it to an existing user edit an existing user navigate to the following path as described below and in the picture setup > users/roles > manage users click on the user you want to edit in the list once inside the employee form click on edit button to enter edit mode enable give access (if not enabled already) in the access tab & assign the engini integration role created earlier and click on the add button click on the save button to save the changes create a new user navigate to the following path as described below and in the picture lists > employees > employees > new name the employee provide an email choose the subsidiary enable give access in the access tab & assign the engini integration role created earlier and click on the add button click on the save button to save the changes create access token for the integration user navigate to the following path as described below and in the picture setup > users/roles > access token > new for the application name choose from the list the integration record we created earlier for the user choose from the list the user we created / edited and assigned the role to for the role choose from the list the role we created earlier click the save button copy and store the token id & token secret in a safe place we will need it to authenticate netsuite with engini add a connection to netsuite in engini enter your engini account at https //app engini io navigate to connections page by clicking on the connections on the left sidebar or by clicking https //app engini io/connections click on the add connection option located at the topbar choose netsuite option from the available applications enter the following details in the “add connection” form connection name enter a unique and descriptive name for this connection this name will help you identify and manage the connection in your engini account “netsuite” by default account id input your netsuite account id token id provide the token id for authentication token secret enter the token secret associated with your netsuite account consumer key / client id input your consumer key or client id consumer secret / client secret enter your consumer secret or client secret filter datetime format defines the date time format used when sending date time filters in api requests (for example yyyy mm ddthh\ mm\ ss) filter date format defines the date only format used when sending date filters without time (for example yyyy mm dd) base url (calculated) the final base api endpoint, automatically constructed from the connection settings this field is read only connection timeout the maximum time (in seconds) to wait for an api response before the request is aborted save settings press “save” note after you’ve saved the connection, a window will open displaying all available entities from this window, select the entities you want to use select database objects after you’ve saved the connection, you can add additional objects click on the three dots (⋯) on the right side of the connection and then click on select database objects a window will open displaying all available entities from this window, select the entities you want to use once you’ve finished selecting the additional entities, click save schedule triggers check for created records object type select the type of object you want to check if a new record has been created starting (utc) choose the date and time for this workflow to start working for the selected day time the workflow will run according to the selected frequency recur every select the time interval the minimum time interval is 15 minutes add time frame click on the “add time frames” button select the specific time frame during which you want your workflow to be executed simply select the start time and end time that best align with your scheduling preferences press the “add time frame” button for adding more time frames top n by clicking on the empty field next to “top n” you can define the maximum number of values you want to retrieve add conditions you can specify which records will be returned from the search results by utilizing the “add conditions” button choose from the drop down the field you want to filter by select the condition you want the record to meet for the selected field click on the field to show the tooltip with all the options you can choose you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate check for updated records object type select the type of object you want to check if a new record has been created starting (utc) choose the date and time for this workflow to start working for the selected day time the workflow will run according to the selected frequency recur every select the time interval the minimum time interval is 15 minutes add time frame click on the “add time frames” button select the specific time frame during which you want your workflow to be executed simply select the start time and end time that best align with your scheduling preferences press the “add time frame” button for adding more time frames top n by clicking on the empty field next to “top n” you can define the maximum number of values you want to retrieve add conditions you can specify which records will be returned from the search results by utilizing the “add conditions” button choose from the drop down the field you want to filter by select the condition you want the record to meet for the selected field click on the field to show the tooltip with all the options you can choose you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps 1 3 for all the fields you want to populate actions create record creates a new record of the selected object type object type select from the drop down the type of record you want to create depending on the object of the selected type, additional fields that must be completed will become available add field by clicking the “add field” button, you can choose how to fill in the various fields in the record you are creating you can add one field to the activity or more fields to the activity definitions, up to the number of fields in the board choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/docs/ixqqblwfxopjg0nave78y/o3kkbgi5xnqf yvnuqkcv and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat the steps from step 3 for all the fields you wish to populate delete record object type select from the drop down the type of record you want to delete id enter the id of the record you want to delete update record updates an existing record in an object object type select from the drop down the type of record you want to update id enter the id of the record you want to update add field by clicking the “add field” button, you can choose how to fill in the various fields in the record you are updating you can add one field to the activity or more fields to the activity definitions, up to the number of fields in the board choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/docs/ixqqblwfxopjg0nave78y/o3kkbgi5xnqf yvnuqkcv and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate get record gets a specified record in an object object type select from the drop down the type of record you want to retrieve id enter or search for the id of the record you want to retrieve get records gets all the records in an object object type select from the drop down the type of record you want to retrieve top n by clicking on the empty field next to “top n” you can define the maximum number of values you want to retrieve add filters you can specify which records will be returned from the search results by utilizing the “add filter” button choose from the drop down the field you want to filter by select the condition you want the record to meet for the selected field click on the field to show the tooltip with all the options you can choose you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using functions and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a d for all the fields you want to populate create or update record you can create a new record if it doesn’t already exist in the database if the record is found, the activity will update it object type select from the drop down the type of record you want to create/update id enter or search for the id of the record you want to create/update add field by clicking the “add field” button, you can choose how to fill in the various fields in the record you are creating/updating you can add one field to the activity or more fields to the activity definitions, up to the number of fields in the board choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/docs/ixqqblwfxopjg0nave78y/o3kkbgi5xnqf yvnuqkcv and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate initialize objects array this activity initializes an object array in netsuite, preparing it to store multiple structured data items based on the selected object types (customer, invoice, product item) name enter the name of the variable that will hold the initialized object array this name will be used throughout the workflow whenever you refer to this object array object element type this field defines the type of data the array will store options include customer, invoice, product item and more the selected type determines the structure of the array and its use in subsequent actions append item object to array you can add an item object to an existing array, allowing you to create, expand, and manipulate collections of objects efficiently variable choose from the dropdown an existing array variable in which you want to add the item object this variable stores the collection of objects to which you’ll append the new item add field by clicking the “add field” button, you can choose how to fill in the various fields in the record you are updating you can add one field to the activity or more fields to the activity definitions, up to the number of fields in the board choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/docs/ixqqblwfxopjg0nave78y/o3kkbgi5xnqf yvnuqkcv and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate map object type array this activity is particularly useful when there is an array of data that needs to be translated into another structure this activity is especially efficient when the array structure is fixed and doesn’t depend on specific conditions date list choose a data list that you’ve obtained from previous activities in your workflow this data list typically contains an array of objects that you want to process and transform object element type you need to define the type of objects from the drop down that will be stored within the array add field by clicking the “add field” button, you can choose how to fill in the various fields when you are mapping choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/docs/ixqqblwfxopjg0nave78y/o3kkbgi5xnqf yvnuqkcv and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate