1, Install the script
In order for shipments to be picked up by Shiptheory you will need to install our custom SuiteScript user event script.
In Shiptheory navigate to 'Manage Channels' then create a new NetSuite integration.
You will see a section titled "1, GET SET UP IN NETSUITE". Select which type of NetSuite record you want to be pulled into Shiptheory as a 'shipment'. Then select status you would like to use as a 'trigger'. Shiptheory will receive the shipment from NetSuite when your record is set to the trigger status.
Once you've chosen your record type and the trigger status click 'Download'. The script will be downloaded to the 'Downloads' folder of your computer.
Next, in NetSuite, go to Customization > Scripting > Scripts > New
Click the '+' button next to the 'Script File' dropdown to add a new script file.
Go back to Shiptheory and go to your NetSuite settings page. Click on 'Show Instructions' for 'Install and deploy the script in NetSuite'. Here you can copy the name for your script.
Go back to NetSuite and use this as your File Name. Then click 'choose file' and select the file you've just downloaded for Shiptheory. Then click 'Save'. After save you should the name of your script in the 'Scrip File' dropdown select. Click 'Create Script Record'.
Give the script a name of Shiptheory and an ID of _netsuite_shiptheory. Go to the deployments tab on the same page and create a new deployment for your record type. The record type must match what you have selected in Shiptheory. Give the deployment record a status of 'Released' and a log level of 'Debug'. Make sure deployed is set to 'yes' and then click 'Save'.
Next go to Customization > Lists, Records & Fields > Transaction Body Fields > New. Create a new custom field and give it the type of 'Free Form Text', a label of Sent to Shiptheory and an ID of _sent_to_shiptheory. Apply this field to your record type. The record type must match what you have selected in Shiptheory.
Finally, go to Setup > Company > Enable Features. Go to the SuiteCloud tab and ensure that you have both client and server SuiteScripts enabled.
2, Create an integration record
In order to connect NetSuite with Shiptheory you will also need to create an 'integration record' within NetSuite.
In NetSuite go to Setup > Integration > Manage Integrations > New
Give your integration record a name. Then enable Token Based Authentication and the TBA Authorization Flow. In the Callback URL text box enter this URL: https://helm.shiptheory.com/netsuite/auth
Important: If anything else is filled in or selected in your integration settings, the integration will not work. Ensure that the OAuth 2.0 and User Credentials options are unchecked.
Save the integration record. Once you have saved it, NetSuite will display your Client ID and Client Secret at the bottom of the page. Make a note of these, you will need them to connect to Shiptheory.
Important: These client credentials are only shown after creating the integration record. You should make a note of them. If you lose them then you will have to reset your client credentials for the integration record. Resetting client credentials will mean you will need to reconnect to Shiptheory.
3, Enable token-based authentication
Next go to Setup > Company > Enable Features.
Go to the SuiteCloud tab and scroll down until you see the Manage Authentication section. There you will need to enable Token-Based Authentication.
4, Connect in Shiptheory
Find your Account ID in NetSuite by going to the Setup menu and select Company then Company Information, your Account ID will be in the right hand column.
In Shiptheory go to the settings page for your NetSuite integration and enter your Account ID and the Client ID and Client Secret you made a note of earlier. Then press 'CONNECT'.
You will be redirected to NetSuite where you will need to give Shiptheory permission to access your NetSuite account. Once you have given access, you will be redirected back to Shiptheory where you can test your connection to NetSuite. If you see a green tick as shown below then you've successfully linked NetSuite to Shiptheory.