The SmartConnect NetSuite Real-Time trigger works in conjunction with the native NetSuite SuiteScript file. The SuiteScript file is generated dynamically when clicking the Register button on the NetSuite Real-Time Data Source and is specific to NetSuite Real-Time Data Source and NetSuite entity.
Create the Script Record in NetSuite
- Log into NetSuite as a user with access to publish Scripts.
- Navigate to Customization > Scripting > Scripts > New.
- Click New button to upload a new Script file.
- Choose ATTACH FROM Computer.
- Enter a FILE NAME that is exactly the same as your JavaScript file downloaded from SmartConnect.
- Click Choose File and upload the SmartConnect SuiteScript file contained in the zip file downloaded from the SmartConnect NetSuite Real-Time Data Source.
- Click Save.
- Click on Create Script Record.
- Enter a value for NAME.
- Enter a value for DESCRIPTION.
- Click Save.
Deploy the script
After creating the Script Record we can deploy this script to activate it in NetSuite.
- Click Deploy Script on the Script Record.
- Set APPLIES TO as the base Record Type being tracked by the data source.
- Set the STATUS to Released.
- Set the Audience to the appropriate roles.
- Click Save.
Test the Real-Time data source
With our Script Record created and deployed, we can now run a test to make sure our trigger is firing and calling SmartConnect Successfully.
- In NetSuite update the record you are tracking, in my case this is Customer.
- Click Save on the record.
- Log into SmartConnect.
- Check your SmartConnect Dashboard for recent runs. If your integration is in the list, then the trigger fired successfully.