Destination Formats

Customize your data output by transforming standard SenML payloads into the exact format your endpoints require.

By default, KPN Things forwards ingested uplink data to your destinations (such as HTTPS, MQTT, AWS Lambda, or Google Cloud Functions) in standard SenML format (RFC 8428 - Sensor Measurement Lists).

If your external systems or third-party applications require data in a specific or proprietary layout, you can create a custom Destination Format. This allows you to write a JavaScript script that automatically transforms the standard SenML payload into your desired format before it is sent.

Creating a Custom Destination Format

Follow these steps to set up and configure a custom destination format:

Step 1: Create the Format Profile

  1. In the Things Creator menu, click All Destination Formats.

  2. Click Add new Destination Format.

  3. Enter a Name and Description for your format.

    Tip: Choose a clear, recognizable name. This name will appear in the "Destination Format" drop-down menu when you configure destinations within your projects.

  4. Click Add Destination Format to save the profile.

Step 2: Write and Test Your Script

  1. On the Destination Format details page that appears, locate the Script section and click Create.

  2. A JavaScript editor will open, pre-populated with a placeholder example script to help you get started.

  3. Write your transformation logic. You can use the built-in testing tool to validate your script against a sample SenML input payload and preview the output. See Destination Format Scripts for more details.

  4. Once you are satisfied with the transformation results, click Create.

Next Steps

Your new custom format is now ready for use. When adding a new destination or updating an existing one in any of your KPN Things projects, simply select your custom format from the Destination Format drop-down menu to apply the transformation.

Tip: add a Test Endpoint with your new custom format to an existing flow to quickly verify your new format with real uplinks

Last updated

Was this helpful?