API | Watcher custom schema using jsonpath

Publié 4 mois par  Julien Pauthier

Publier un sujet
  • Sujet épinglé
Julien Pauthier
Julien Pauthier Administrateur

Our watchers support jsonpath, which can help navigate the JSON structure from our watchers (here a custom widget field identified with the external ID "test"), as well as to rely on Javascript to implement simple JS functions (eg: anonymise a lastname):


{
  "id": "${$.id}",
  "contact": {
    "emailAddress": "${$.client.email}",
    "name": "${$.client.firstName} ${$.client.lastName}",
    "phone": "${$.client.phone}"
  },
  "note": "${$.notes}",
  "additionalField1": ${$.form[?(@.externalId == 'test')].value},
  "service": {
    "name": "${$.service.name}",
    "appointmentType": "${$.service.externalId}"
  },
  "staff": {
    "name": "${$.staff.firstName} $eval{'${$.staff.lastName}'[0]}.",
    "ref": "${$.staff.externalId}"
  },
  "startTime": "${$.start.dateTime}",
  "endTime": "${$.end.dateTime}"
}


0 Votes


0 Commentaires

Connexion ou S'inscrire pour poster un commentaire