Netsuite / SuiteScript Integration Setup

  • Updated

How this works

GoSweetSpot can be integrated with your Netsuite SuiteScript platform account to synchronize your Netsuite SuiteScript records with GoSweetSpot. This allows you to view and process your Netsuite SuiteScript records from GoSweetSpot.

The SuiteScript can be implemented in two ways -
    1) NL Auth - using Username and Password
    2) Token-Based Authentication

This article explains how these two ways can be implemented.

If you are using- 

1) NL Auth (using Username and Password) Integration Setup

  1. Add your Account Id to the GSS Integration SetUp

  2. Choose DataSourceType as SuiteScript

  3. Fill in the Username and Password. You can create just a user for this purpose. 

  4. You need to obtain these below details from your Netsuite SuiteScript platform account and add them as well -


    • NS Role Id - Required field
    • Fetch Orders URL
      https://{AccountID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script={id}&deploy={deployID}
      eg: https://12345.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=1001&deploy=1

      Expected JSON data format sample
      [
      {
      "items": [
      {
      "item": "10.1020.AB", //ProductSKU/ ProductCode
      "description": "10.1020.AB Product A Jumbo Size",//ProductDescription
      "quantity": "4", //Quantity
      "rate": "100",//UnitValue
      "bin": ""
      }
      ],
      "orderdate": "01/01/2022",
      "ordernumber": "SO123456",
      "internalid": "12345678", //Internal Order Id in NetSuite
      "reference": " / Product A Jumbo Size",
      "company": "ABC Limited",
      "email": "support@abc.co.nz",
      "phone": "022-448-0022",
      "add1": "10 Street Sample Avenue",
      "add3": "Suburb Sample",//Suburb
      "city": "City Sample",// City
      "state": "XX", // State/Region Code
      "postal": "1000",
      "countrycode": "NZ",// Country Code
      "internalmemo": "Sample Memo" //Notes
      },
      {
      "items": [
      {
      "item": "30.4020.DB",
      "description": "30.4020.DB Product B, Satin",
      "quantity": "1",
      "rate": "219",
      "bin": ""
      },
      {
      "item": "20.2030.BD",
      "description": "10.1020.AB Product C, Wool",
      "quantity": "2",
      "rate": "300",
      "bin": ""
      },
      {
      "item": "20.2030.BC",
      "description": "20.2030.BC Product D, Wool",
      "quantity": "1",
      "rate": "189",
      "bin": ""
      }
      ],
      "orderdate": "01/01/2022",
      "ordernumber": "SO123457",
      "internalid": "12345679",
      "reference": " / Product B, Satin",
      "company": "ABC Construction",
      "email": "testguy@abcgroup.com",
      "phone": "029-111-1112",
      "add1": "10 Street Sample Avenue",
      "add3": "Suburb Sample",
      "city": "City Sample",
      "state": "XX",
      "postal": "1001",
      "countrycode": "NZ",
      "internalmemo": ""
      }
      ]
    • Open Tab URL
      Leave this blank

    • Custom Postback URL
      https://{AccountID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script={id}&deploy={deployID}
      eg: https://12345.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=1002&deploy=1

      Sample of JSON data format provided by us
      {
      "salesorder": "123456",
      "carrier": "Carrier Name", //Carrier Name
      "service": "Standard", // Service Type
      "least_cost_faster_carrier": "",
      "freight_type_1": "Standard",
      "total_package_1": "1",
      "total_weight_1": 2,
      "total_volume_1": "0.0180",
      "total_length_1": 26,
      "total_width_1": 26,
      "total_height_1": 26,
      "freight_type_2": null,
      "total_package_2": null,
      "total_weight_2": null,
      "total_volume_2": null,
      "total_length_2": null,
      "total_width_2": null,
      "total_height_2": null,
      "freight_type_3": null,
      "total_package_3": null,
      "total_weight_3": null,
      "total_volume_3": null,
      "total_length_3": null,
      "total_width_3": null,
      "total_height_3": null,
      "freight_type_4": null,
      "total_package_4": null,
      "total_weight_4": null,
      "total_volume_4": null,
      "total_length_4": null,
      "total_width_4": null,
      "total_height_4": null,
      "tracking_reference": "ABCD0011122",
      "custbody_tracking_reference": "ABCD0011122",
      "tracking_url": "https://gosweetspot.com/track/111111-ABCD0011122",
      "enteredby": "testadmin@gosweetspot.com" //Email of person who created label
      }
  5. If you want to update the tracking reference and tracking URL back into your Netsuite SuiteScript platform, select "Yes" for the Send Back Ticket Number option.
    Save these details and all set to go!


2) Token-Based Authentication Integration Setup

  1. Add your Account Id to the GSS Integration SetUp

  2. Choose DataSourceType as SuiteScript

  3. Fill in the Token Id, Token Secret, Consumer Key, and Consumer Secret. You can create just a user for this purpose. Please follow this article to understand the Oracle SuiteScript platform configurations needed.

    Make sure to leave NS Role Id as blank.

  4. You need to obtain these below details from your Netsuite SuiteScript platform account and add them as well -
    • Fetch Orders URL
      https://{AccountID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script={id}&deploy={deployID}
      eg: https://12345.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=1001&deploy=1

      Expected JSON data format sample
      [
      {
      "items": [
      {
      "item": "10.1020.AB", //ProductSKU/ ProductCode
      "description": "10.1020.AB Product A Jumbo Size",//ProductDescription
      "quantity": "4", //Quantity
      "rate": "100",//UnitValue
      "bin": ""
      }
      ],
      "orderdate": "01/01/2022",
      "ordernumber": "SO123456",
      "internalid": "12345678", //Internal Order Id in NetSuite
      "reference": " / Product A Jumbo Size",
      "company": "ABC Limited",
      "email": "support@abc.co.nz",
      "phone": "022-448-0022",
      "add1": "10 Street Sample Avenue",
      "add3": "Suburb Sample",//Suburb
      "city": "City Sample",// City
      "state": "XX", // State/Region Code
      "postal": "1000",
      "countrycode": "NZ",// Country Code
      "internalmemo": "Sample Memo" //Notes
      },
      {
      "items": [
      {
      "item": "30.4020.DB",
      "description": "30.4020.DB Product B, Satin",
      "quantity": "1",
      "rate": "219",
      "bin": ""
      },
      {
      "item": "20.2030.BD",
      "description": "10.1020.AB Product C, Wool",
      "quantity": "2",
      "rate": "300",
      "bin": ""
      },
      {
      "item": "20.2030.BC",
      "description": "20.2030.BC Product D, Wool",
      "quantity": "1",
      "rate": "189",
      "bin": ""
      }
      ],
      "orderdate": "01/01/2022",
      "ordernumber": "SO123457",
      "internalid": "12345679",
      "reference": " / Product B, Satin",
      "company": "ABC Construction",
      "email": "testguy@abcgroup.com",
      "phone": "029-111-1112",
      "add1": "10 Street Sample Avenue",
      "add3": "Suburb Sample",
      "city": "City Sample",
      "state": "XX",
      "postal": "1001",
      "countrycode": "NZ",
      "internalmemo": ""
      }
      ]
    • Open Tab URL
      Leave this blank

    • Custom Postback URL
      https://{AccountID}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script={id}&deploy={deployID}
      eg: https://12345.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=1002&deploy=1

      Sample of JSON data format provided by us
      {
      "salesorder": "123456",
      "carrier": "Carrier Name", //Carrier Name
      "service": "Standard", // Service Type
      "least_cost_faster_carrier": "",
      "freight_type_1": "Standard",
      "total_package_1": "1",
      "total_weight_1": 2,
      "total_volume_1": "0.0180",
      "total_length_1": 26,
      "total_width_1": 26,
      "total_height_1": 26,
      "freight_type_2": null,
      "total_package_2": null,
      "total_weight_2": null,
      "total_volume_2": null,
      "total_length_2": null,
      "total_width_2": null,
      "total_height_2": null,
      "freight_type_3": null,
      "total_package_3": null,
      "total_weight_3": null,
      "total_volume_3": null,
      "total_length_3": null,
      "total_width_3": null,
      "total_height_3": null,
      "freight_type_4": null,
      "total_package_4": null,
      "total_weight_4": null,
      "total_volume_4": null,
      "total_length_4": null,
      "total_width_4": null,
      "total_height_4": null,
      "tracking_reference": "ABCD0011122",
      "custbody_tracking_reference": "ABCD0011122",
      "tracking_url": "https://gosweetspot.com/track/111111-ABCD0011122",
      "enteredby": "testadmin@gosweetspot.com" //Email of person who created label
      }

      If you want to update the tracking reference and tracking URL back into your Netsuite SuiteScript platform, select "Yes" for the Send Back Ticket Number option. 


      Save these details and all set to go!