How to catch on forest server if a value is changed on forestAdmin?

Hi ForestAdmin team,

Without using smart actions, is there a way to catch a database value change performed by ForestAdmin directly on the forest server ?

For example the Forest user “toto@kontoso.co” changed the field “firstName” in the collection “users” on ForestAdmin, we want to catch this chnage on our forest server and then perform side effects.

Our goal is mainly to send the new data to Segment if a data value is changed on ForestAdmin.

Thanks a lot for your help

Hello @Aarbel,

There are 2 ways of doing this:

  1. Override the route PUT /users/:recordId described here, and add some logic before or after the modification.
  2. Define hooks on your ORM, to apply modifications before saving objects
1 Like

Thanks a lot @GuillaumeGautreau for the speed of your feedback !

We use Prisma and PostgreSQL. I have in mind that Forest has a particular proximity with PostgreSQL. Do you provide deeper api connection with this kind of database ?

Hello,

What do you mean by deeper api connection?

Postgresql is supported through sequelize, and we don’t use anything fancy outside what is provided by sequelize.