WebHook Event (V5.5)
Résumé
Manipulation de l'entité Event (Evénements génériques) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
sw_data_event : Table des événements
Les tables liées sont :
sw_data_customeraddresevent : Table des adresses liées aux événements
Critères d'activation
WHK_Event est défini dans la gestion des webhooks du studio.
Fonctionnement
verb: GET
resultType: simple
"event": {
"codeevent": "EXT00000001",
"eventDate": "2021-06-04 11:03:50",
"comment": "commande",
"customer_ID": "C0000001",
"baseuser_ID": "TECH2",
"eventtype_ID": "Order",
"customercontact_ID": "",
"deal_ID": "",
"label": "",
"marketinglead_ID": ""
}
verb: GET
resultType: extended
"event": {
"codeevent": "EXT00000001",
"eventDate": "2021-06-04 11:03:50",
"comment": "commande",
"customer_ID": "C0000001",
"baseuser_ID": "TECH2",
"eventtype_ID": "Order",
"customercontact_ID": "",
"deal_ID": "",
"label": "",
"marketinglead_ID": "",
"gpsLongitude": "",
"gpsLatitude": "",
"customer_ID_dealPartner": ""
}
verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables customer, baseuser, customercontact, deal et customer_dealpartner
"related": [
{
"customer": {
"codecustomer": "2269",
"baseuser_ID": "SMITH",
"name": "LAURENT AUBENAS",
"address1": "RTE DE ST ETIENNE DE FONTBELLON",
"address2": "",
"postalCode": "07200",
"city": "AUBENAS",
"phoneNumber": "111220360",
"faxNumber": "133220360",
"email": "contact@soc.com",
"generictype_ID_customerType": "CTC",
"generictype_ID_country": "",
"address3": "",
"mobilePhoneNumber": "611220360",
"generictype_ID_province": "",
"generictype_ID_civility": "",
"baseculture_ID": "FR-FR",
"branchoffice_ID": "",
"contactName": "Simon LAURE",
"website": "<http://www.soc.com",>
"deliveryDays": "1A;1B;2A;2B;4A;4B;5A;5B",
"openingDays": "1A;1B;2A;2B;3A;3B;4A;4B;5A;5B",
"vacationStart": "",
"vacationEnd": "",
"siretNumber": "",
"comment": "ok",
"message": "",
"blocked": "0",
"underSurveillance": "1",
"generictype_ID_customerFamily": "",
"generictype_ID_paymentMean": "",
"generictype_ID_deliveryMode": "",
"pricecategory_ID": "",
"discountRate": "0",
"gpsLongitude": "4.40672",
"gpsLatitude": "44.60007",
"confirmationEmail": "",
"confirmationFax": "",
"generictype_ID_brand": "",
"blockedComment": "",
"authorizedCredit": "",
"apeCode": "",
"vatIntra": "",
"legalStatus": "",
"workforce": "",
"customer_ID_paying": "",
"generictype_ID_taxCode": "",
"productdepot_ID": "",
"risk": "",
"accountNumber": "",
"currency_ID": "",
"generictype_ID_accountingCategory": "",
"generictype_ID_customerPotential": "C",
"skype": "contact@soc.com",
"generictype_ID_role": "",
"unused": "",
"customergroup_ID": "",
"generictype_ID_referencing": "",
"generictype_ID_distribution": "",
"generictype_ID_market": "",
"area": "",
"baseuser_ID_favoriteTechnician": "",
"emailFormat": "@soc.com",
"s_Satisfaction": "",
"s_VIP": "",
"isIndividual": "",
"facebook": "",
"twitter": "",
"youtube": "",
"linkedin": "",
"activity": "",
"contactFirstName": ""
},
"baseuser": {
"codebaseuser": "TECH2",
"lastName": "PETIT",
"firstName": "Eric",
"initials": "",
"email": "schengebroyen@divalto.fr",
"phoneNumber": "",
"faxNumber": "",
"address1": "",
"address2": "",
"postalCode": "67200",
"city": "STRASBOURG",
"position": "Directeur technique",
"department": "Technician",
"generictype_ID_country": "",
"generictype_ID_province": "",
"baseculture_ID": "",
"branchoffice_ID": "SXB",
"resourcetype_ID": "",
"supervisor": "0",
"useMileageRate": "",
"account": "",
"analyticSection": "",
"productdepot_ID": "Fourgonnette Tech 2",
"lastGPSDate": "",
"gpsLongitude": "7.71292",
"gpsLatitude": "48.58577",
"fullView": "",
"changeAuthorization": "",
"productdepot_ID_current": "Fourgonnette Tech 2",
"techSyncRule": "1",
"homePage": "",
"teamtype_ID": "",
"customer_ID_subcontractor": ""
},
"customercontact": {
"codecustomercontact": "",
"customer_ID": "",
"generictype_ID_civility": "",
"lastName": "",
"firstName": "",
"address1": "",
"address2": "",
"postalCode": "",
"city": "",
"phoneNumber": "",
"mobilePhoneNumber": "",
"faxNumber": "",
"email": "",
"address3": "",
"generictype_ID_country": "",
"generictype_ID_province": "",
"baseculture_ID": "",
"description": "",
"generictype_ID_position": "",
"birthday": "",
"gpsLongitude": "",
"gpsLatitude": "",
"mainContact": "",
"generictype_ID_service": "",
"skype": "",
"s_specialisation": "",
"s_VIP": "",
"s_int": "",
"s_double": "",
"s_datetime": "",
"bouncedEmailDetected": "",
"closedDate": "",
"s_SacContactDispo": "",
"s_SacContactNonDispo": "",
"s_SacContactAffiche": "",
"twitter": "",
"linkedIn": ""
},
"deal": {
"codedeal": "",
"customer_ID": "",
"label": "",
"generictype_ID_dealType": "",
"generictype_ID_status": "",
"dealNumber": "",
"isProject": "",
"description": "",
"creationDate": "",
"closingDate": "",
"amount": "",
"probability": "",
"generictype_ID_lossReason": "",
"customer_ID_introducer": "",
"baseuser_ID": "",
"amount2": "",
"lossReasonComment": "",
"realClosingDate": "",
"dealstep_ID_current": "",
"deal_ID_origin": "",
"manualProbability": "",
"marketinglead_ID_origin": "",
"customercontact_ID": ""
},
"customer_dealPartner": {
"codecustomer": "",
"baseuser_ID": "",
"name": "",
"address1": "",
"address2": "",
"postalCode": "",
"city": "",
"phoneNumber": "",
"faxNumber": "",
"email": "",
"generictype_ID_customerType": "",
"generictype_ID_country": "",
"address3": "",
"mobilePhoneNumber": "",
"generictype_ID_province": "",
"generictype_ID_civility": "",
"baseculture_ID": "",
"branchoffice_ID": "",
"contactName": "",
"website": "",
"deliveryDays": "",
"openingDays": "",
"vacationStart": "",
"vacationEnd": "",
"siretNumber": "",
"comment": "",
"message": "",
"blocked": "",
"underSurveillance": "",
"generictype_ID_customerFamily": "",
"generictype_ID_paymentMean": "",
"generictype_ID_deliveryMode": "",
"pricecategory_ID": "",
"discountRate": "",
"gpsLongitude": "",
"gpsLatitude": "",
"confirmationEmail": "",
"confirmationFax": "",
"generictype_ID_brand": "",
"blockedComment": "",
"authorizedCredit": "",
"apeCode": "",
"vatIntra": "",
"legalStatus": "",
"workforce": "",
"customer_ID_paying": "",
"generictype_ID_taxCode": "",
"productdepot_ID": "",
"risk": "",
"accountNumber": "",
"currency_ID": "",
"generictype_ID_accountingCategory": "",
"generictype_ID_customerPotential": "",
"skype": "",
"generictype_ID_role": "",
"unused": "",
"customergroup_ID": "",
"generictype_ID_referencing": "",
"generictype_ID_distribution": "",
"generictype_ID_market": "",
"area": "",
"baseuser_ID_favoriteTechnician": "",
"emailFormat": "",
"s_Satisfaction": "",
"s_VIP": "",
"isIndividual": "",
"facebook": "",
"twitter": "",
"youtube": "",
"linkedin": "",
"activity": "",
"contactFirstName": ""
}
}
]
verb: PUT
verb: LIST
resultType: simple, extended reprendre les définitions du GET
Valeurs possibles pour le tri "orderBy" :
eventDateDesc : par date d'évènement descendant
eventDateAsc : par date d'évènement ascendant