Skip to main content
Hero

Granting Access

To get started with NXT Triggers with a Visma Business NXT Customer, you need to grant it access. Go to Connect Application and add isv_nxt_triggers as a user with connected application activated. You also have to make sure that you are a user with supervisor rights in the Business NXT customer.

Creating a Trigger

To create or edit a trigger, open NXT Triggers and select the company you want to work with under triggers. Then press + Create Trigger and select the table and event you want to trigger on.

Your first trigger

When you create a new trigger, you will be met with a code editor. Here you can write your trigger code in TypeScript. All triggers must export a default function, which is an async function that takes an object with the following properties.

About indepotency

A big difference between SQL triggers and NXT triggers is that a NXT trigger might be retried. Since we are running in the cloud, we can’t guarantee that the services we are calling are idempotent. To ensure that a part of a trigger is only run once, even if it’s called multiple times, you can use the useIndepotent function.
useIndepotent

Example usage in triggers

Base Trigger

This is the starting point for your new trigger. It logs the event object to the console, and by using the debugger you can see the output from the trigger.