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/UDW57/pages/10563488509/WebHook+Task) 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. 6) Actuel »

Résumé

Manipulation de l'entité Task (Tâches) en lecture/écriture/suppression via un objet métier depuis une application externe.

Tables

Les tables utilisées sont :

  • sw_data_task : Table des tâches/rendez-vous

Critères d'activation

WHK_Task est défini dans la gestion des webhooks du studio.

Fonctionnement

verb: GET
resultType: simple

  "task":{
    "codetask": "5870000000113",
    "customer_ID": "2950000000006",
    "userAffectedTo": "BO",
    "startDate": "",
    "endDate": "",
    "comment": "",
    "object": "autre",
    "generictype_ID_TaskType": "Other",
    "generictype_ID_priority": "NONE",
    "generictype_ID_status": "CLOSED",
    "dueDate": "2020-11-20 00:00:00"
  }

verb: GET
resultType: extended

  "task":{
    "codetask": "5870000000113",
    "customer_ID": "2950000000006",
    "userAffectedTo": "BO",
    "startDate": "",
    "endDate": "",
    "comment": "",
    "object": "autre",
    "generictype_ID_TaskType": "Other",
    "generictype_ID_priority": "NONE",
    "generictype_ID_status": "CLOSED",
    "dueDate": "2020-11-20 00:00:00",
    "customercontact_ID": "",
    "userCreate": "BO",
    "description": "",
    "documentType": "1",
    "privateItem": "0",
    "showInCalendar": "",
    "extendedStatus": "",
    "customer_ID_hub": "",
    "roundheader_ID_hub": "",
    "visitreport_ID": "",
    "reminderDate": "",
    "reminderPeriodType": "",
    "reminderPeriodValue": "",
    "address": "",
    "task_ID_parent": "",
    "location": "",
    "contactName": "",
    "contactPhoneNumber": "",
    "contactMobilePhoneNumber": "",
    "contactFaxNumber": "",
    "contactEmail": "",
    "priorityTask": "",
    "deal_ID": "5870000000004",
    "customer_ID_dealPartner": "",
    "marketinglead_ID": "",
    "doneDate": ""
  }

verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables customer, customercontact, generictype_taskType

"related":[
{
  "customer":{
    "codecustomer":"C0000001",
    "name":"ENTREPRISE DIJON GUICHARD",
    "baseuser_ID":"",
    "address1":"33 Avenue du Drapeau",
    "address2":"",
    "address3":"",
    "postalCode":"21000",
    "city":"DIJON",
    "phoneNumber":"03 90 11 22 33",
    "faxNumber":"03 90 11 22 44",
    "mobilePhoneNumber":"06 90 11 22 33",
    "email":"contact@guichard.com",
    "deliveryDays":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5B",
    "openingDays":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5B",
    "siretNumber":"",
    "vatIntra":"",
    "apeCode":"516K",
    "comment":"",
    "blocked":"0",
    "blockedComment":"",
    "message":"",
    "vacationStart":"",
    "vacationEnd":"",
    "gpsLongitude":"5.04372",
    "gpsLatitude":"47.33222",
    "gpsPrecision":"8",
    "gpsUpdateDate":"2020-09-03 23:02:12",
    "gpsManual":"",
    "accountNumber":"C0000001",
    "contactName":"",
    "currency_ID":"",
    "authorizedCredit":"0",
    "risk":"1",
    "language":"",
    "underSurveillance":"",
    "workforce":"25",
    "customer_ID_paying":"",
    "pricecategory_ID":"",
    "discountRate":"0",
    "website":"<https://www.guichard.com",>
    "legalStatus":"Société Anonyme avec Directoire",
    "generictype_ID_brand":"",
    "generictype_ID_deliveryMode":"",
    "generictype_ID_paymentMean":"",
    "generictype_ID_country":"",
    "generictype_ID_province":"",
    "generictype_ID_customerType":"CTC",
    "generictype_ID_customerFamily":"",
    "confirmationEmail":"contact@guichard.com",
    "confirmationFax":"03 90 11 22 44",
    "generictype_ID_taxCode":"",
    "productdepot_ID":"",
    "generictype_ID_accountingCategory":"",
    "generictype_ID_customerPotential":"B",
    "generictype_ID_civility":"",
    "skype":"contact@guichard.com",
    "generictype_ID_role":"",
    "unused":"0",
    "customergroup_ID":"",
    "generictype_ID_referencing":"2",
    "generictype_ID_distribution":"SELF",
    "generictype_ID_market":"BIG",
    "area":"",
    "baseculture_ID":"FR-FR",
    "baseuser_ID_favoriteTechnician":"TECH-01",
    "branchoffice_ID":"SXB",
    "emailFormat":"",
    "isIndividual":"0",
    "facebook":"<https://www.facebook.com/guichard/",>
    "twitter":"<https://twitter.com/guichard",>
    "youtube":"<https://www.youtube.com/watch?v=6jGbnEwQJ54",>
    "linkedin":"<https://www.linkedin.com/company/guichard",>
    "activity":""
  },
  "customercontact":{
    "codecustomercontact":"C0000001-DJ",
    "customer_ID":"C0000001",
    "lastName":"DENEIR",
    "firstName":"Jacques",
    "generictype_ID_civility":"Monsieur",
    "address1":"1b rue Darwin",
    "address2":"",
    "address3":"",
    "postalCode":"21000",
    "city":"DIJON",
    "phoneNumber":"05 55 79 56 92",
    "faxNumber":"05 55 79 56 11",
    "mobilePhoneNumber":"06 07 08 09 10",
    "email":"jdeneir@nebout.div",
    "gpsLongitude":"5.0384",
    "gpsLatitude":"47.33073",
    "gpsAccuracy":"6",
    "gpsUpdateDate":"2020-09-16 23:02:26",
    "gpsManual":"",
    "description":"Acheteur direct",
    "generictype_ID_position":"Direction",
    "birthday":"1980-09-18 00:00:00",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "mainContact":"0",
    "generictype_ID_service":"Direction",
    "skype":"",
    "baseculture_ID":"",
    "bouncedEmailDetected":"",
    "closedDate":"",
    "twitter":"",
    "linkedin":""
  },
  "generictype_TaskType":{
    "codegenerictype": "TASK_TYPE-OTHER",
    "label": "Other",
    "originalCode": "OTHER",
    "dataType": "TASK_TYPE",
    "description": "",
    "translationKey": "GenType_TASK_TYPE-OTHER",
    "generictype_ID_parent": "",
    "tag": "",
    "orderNumber": ""
  }
}]

verb: PUT

{
  "task": {
    "codetask": "PJ000011", /* Code globalement unique de la tâche (Varchar (255))*/
    "customer_ID": "C0000001", /* Code client (ForeignKey () - sw_data_customer.codecustomer)*/
    "userAffectedTo": "BO", /* Code utilisateur affecté (ForeignKey () - sw_data_baseuser.codebaseuser)*/
    "startDate": "", /* Date de début (DateTime ())*/
    "endDate": "", /* Date de fin (DateTime ())*/
    "comment": "", /* Commentaire (Text (65535))*/
    "object": "autre", /* Objet (Varchar (255))*/
    "generictype_ID_TaskType": "Other", /* Code du type de tâche (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = TASK_STATUS)*/
    "generictype_ID_priority": "NONE", /* Code de la priorité de la tâche (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = TASK_PRIORITY)*/
    "generictype_ID_status": "CLOSED", /* Code du staut de tâche (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = TASK_TYPE)*/
    "dueDate": "2020-11-20 00:00:00", /* Date d'échéance (DateTime ())*/
    "customercontact_ID": "", /* Code contact (ForeignKey () - sw_data_customercontact.codecustomercontact)*/
    "userCreate": "BO", /* Code utilisateur créateur (ForeignKey () - sw_data_baseuser.codebaseuser)*/
    "description": "", /* Description (Text (65535))*/
    "privateItem": "0", /* Tâche privée (Valeurs possibles : 0,1) (Bool ())*/
    "showInCalendar": "", /* Afficher dans l'agenda (Valeurs possibles : 0,1) (Bool ())*/
    "extendedStatus": "", /* Statut étendu (Int ())*/
    "customer_ID_hub": "", /* Code client pivot (ForeignKey () - sw_data_customer.codecustomer)*/
    "roundheader_ID_hub": "", /* Code tournée (ForeignKey () - sw_data_roundheader.coderoundheader)*/
    "visitreport_ID": "", /* Code rapport de visite (ForeignKey () - sw_data_visitreport.codevisitreport)*/
    "reminderDate": "", /* Date de rappel (DateTime ())*/
    "reminderPeriodType": "", /* Periode de rappel : type (Varchar (4))*/
    "reminderPeriodValue": "", /* Periode de rappel : valeur (Int ())*/
    "address": "", /* Adresse (Text (65535))*/
    "task_ID_parent": "", /* Code tâche parente (ForeignKey () - sw_data_task.codetask)*/
    "location": "", /* Lieu (Varchar (255))*/
    "contactName": "", /* Nom du contact (Varchar (255))*/
    "contactPhoneNumber": "", /* Numéro de téléphone du contact (Varchar (10))*/
    "contactMobilePhoneNumber": "", /* Numéro de cellulaire du contact (Varchar (26))*/
    "contactFaxNumber": "", /* Numéro de télécopie du contact (Varchar (26))*/
    "contactEmail": "", /* Email du contact (Varchar (250))*/
    "priorityTask": "", /* Tâche prioritaire (Valeurs possibles : 0,1) (Bool ())*/
    "deal_ID": "5870000000004", /* Code affaire (ForeignKey () - sw_data_deal.codedeal)*
    "customer_ID_dealPartner": "", /* Code partenaire de l'affaire (ForeignKey () - sw_data_customer.codecustomer)*
    "marketinglead_ID": "", /* Code lead (ForeignKey () - sw_data_marketinglead.codemarketinglead)*/
    "doneDate": "" /* Date d'achèvement (DateTime ())*/
  }
}

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

"filters:" {
  "codeTask": "value", filter is equal
  "object": "value", filter is contains
  "codeCustomer": "value", filter is equal
  "taskType": "value" filter is equal
  "codeStatus": "value" filter is equal
},
"orderBy": "value"

Valeurs possibles pour le tri "orderBy" :

  • dueDateDesc : par date d'échéance descendant

  • dueDateAsc : par date d'échéance ascendant

  • Aucune étiquette