Skip to content
Docs

Script Debug

Device transformation scripts are used to convert incoming device payloads into a format recognized by StatStream. Script Debug provides a safe environment to test scripts with sample payloads, verify the output, and detect errors before they are applied to live device data.

Go to Admin → Script Debug.

To test a transformation script:

  1. Enter your script in Transformation Script (JavaScript). The script must return a valid JSON object as its final statement.
  2. Enter a sample payload in JSON Payload to run through the script.
  3. Click Test.
  4. Review the transformed output and verify that it matches the expected format.
  5. Update the script as needed and repeat the test until the output is correct.
Script Debug