Aller directement à la fin des métadonnées
Aller au début des métadonnées

Vous regardez une version antérieure (v. /wiki/spaces/UDW55/pages/10522493070/WebHook+Event) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 2) Actuel »

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 demandes d'interventions

Les tables liées sont :
/

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

{
  "event": {
    "codeevent": "EXT00000001", /* Code globalement unique de l'événement (Varchar (255))*/
    "eventDate": "", /* Date de l'événement */
    "eventtype_ID": "PhoneCall", /* Code du type de l'événement */
    "label": "A rappeler", /* Libellé (Varchar (255))*/
    "comment": "", /* Description (Text (65535))
    "customer_ID": "C0000001", /* Code du tiers (ForeignKey () - sw_data_customer.codecustomer)*/
    "customercontact_ID": "C0000001-BDX", /* Code du contact du tiers  (ForeignKey () - sw_data_customercontact.codecustomercontact)*/
    "baseuser_ID": "B0000001-BDX", /* Code du créateur de l'événement  (ForeignKey () - sw_data_baseuser.codebaseuser)*/
    "deal_ID": "D0000001-BDX", /* Code de l'affaire lié à l'événement  (ForeignKey () - sw_data_deal.codedeal)*/
    "marketinglead_ID": "ML0000001-BDX", /* Code du lead lié à l'événement  (ForeignKey () - sw_data_marketinglead.codemarketinglead)*/
    "customer_ID_dealPartner": "CDP0000001-BDX", /* Code du partenaire affaire de l'événement  (ForeignKey () - sw_data_customer.codecustomer)*/
  }    
}

verb: LIST
resultType: simple, extended reprendre les définitions du GET

"filters": {
  "codeEvent": "value", filter is equal
  "label": "value", filter is contains
  "comment": "value", filter is contains
  "eventDate": "value", filter is greater or equal to
  "eventDateBetween": "value1|value2", filter is between value1 and value2
  "codeCustomer": "value", filter is equal
  "codeBaseuser": "value", filter is equal
  "codeCustomerContact": "value", filter is equal
  "codeDeal": "value", filter is equal
  "codeMarketingLead": "value", filter is equal
  "codeEventType": "value" filter is equal
},
"orderBy": "value"

Valeurs possibles pour le tri "orderBy" :

  • eventDateDesc : par date d'évènement descendant

  • eventDateAsc : par date d'évènement ascendant

  • Aucune étiquette