WebHook Flash Message
Résumé
Manipulation de l'entité FlashMessage (Messages flash) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
- sw_data_flashmessage : Table des messages flash
Critères d'activation
WHK_FlashMessage est défini dans la gestion des webhooks du studio.
Fonctionnement
verb: GET
resultType: simple
"flashmessage":{
"codeflashmessage": "3550000000002",
"baseUser_ID_sender": "11",
"baseUser_ID_recipient": "TECH1",
"validityStartDate": "2021-04-27 00:00:00",
"validityEndDate": "2021-04-30 00:00:00"
}
verb: GET
resultType: extended
"flashmessage":{
"codeflashmessage": "3550000000002",
"baseUser_ID_sender": "11",
"baseUser_ID_recipient": "TECH1",
"validityStartDate": "2021-04-27 00:00:00",
"validityEndDate": "2021-04-30 00:00:00",
"message": "Test de flash message",
"acknowledgement": "",
"readingRequired": "0",
"flashmessage_ID_group": "",
"flashmessage_ID_parent": "",
"messageread": "1",
"hidden": ""
}
Verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables baseUser_sender et baseUser_recipient
"related":[
{
"baseUser_sender ":{
"codebaseuser": "11",
"lastName": "DUBOIS",
"firstName": "Frédéric",
"initials": "FD",
"email": "fd@divalto.com",
"phoneNumber": "",
"faxNumber": "",
"address1": "",
"address2": "",
"postalCode": "67300",
"city": "SCHILTIGHEIM",
"position": "Développeur",
"department": "Commercial",
"generictype_ID_country": "",
"generictype_ID_province": "",
"baseculture_ID": "",
"branchoffice_ID": "",
"resourcetype_ID": "",
"supervisor": "0",
"useMileageRate": "",
"account": "",
"analyticSection": "",
"productdepot_ID": "Dépôt Frédéric DUBOIS",
"lastGPSDate": "",
"gpsLongitude": "7.7486",
"gpsLatitude": "48.60594",
"fullView": "",
"changeAuthorization": "",
"productdepot_ID_current": "",
"techSyncRule": "",
"homePage": "",
"teamtype_ID": "",
"customer_ID_subcontractor": ""
},
"baseUser_recipient":{
"codebaseuser": "TECH1",
"lastName": "MULLER",
"firstName": "Hans",
"initials": "HM",
"email": "hm@divalto.com",
"phoneNumber": "",
"faxNumber": "",
"address1": "",
"address2": "",
"postalCode": "",
"city": "",
"position": "Technicien",
"department": "Technician",
"generictype_ID_country": "",
"generictype_ID_province": "",
"baseculture_ID": "",
"branchoffice_ID": "",
"resourcetype_ID": "",
"supervisor": "0",
"useMileageRate": "",
"account": "",
"analyticSection": "",
"productdepot_ID": "Dépôt Hans MULLER",
"lastGPSDate": "",
"gpsLongitude": "",
"gpsLatitude": "",
"fullView": "",
"changeAuthorization": "",
"productdepot_ID_current": "",
"techSyncRule": "",
"homePage": "",
"teamtype_ID": "",
"customer_ID_subcontractor": ""
}
}]
verb: PUT
{
"flashmessage": {
"codeflashmessage": "TEST1", /* Code globalement unique du message flash (Varchar (255))*/
"baseUser_ID_sender": "11", /* Code utilisateur émetteur (ForeignKey () - sw_data_baseuser.codebaseuser)*/
"baseUser_ID_recipient" : "TECH1", /* Code utilisateur destinataire (ForeignKey () - sw_data_baseuser.codebaseuser)*/
"validityStartDate": "2021-04-27 00:00:00", /* Début de validité (Timestamp ())*/
"validityEndDate": "2021-04-30 00:00:00", /* Fin de validité (Timestamp ())*/
"message": "", /* Message (Text (65535))*/
"readingRequired": "0" /* Lecture obligatoire (Valeurs possibles : 0,1) (Bool ())*/
}
}
verb: LIST
resultType: simple, extended, extendedRelated reprendre les définitions du GET
"filters:" {
"CodeFlashmessage": "value", filter is equal
"baseUser_ID_sender": "value", filter is equal
"baseUser_ID_recipient": "value" filter is equal
}