Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.
Commentaire: Published by Scroll Versions from space VERSIONSWEAVY and version 5.4

verb: GET
resultType: simple

...

Résumé

Manipulation de l'entité Deal (Opportunités/Affaires) en lecture/écriture/suppression via un objet métier depuis une application externe.

Tables

Les tables utilisées sont :

  • sw_data_deal : Table des opportunités/affaires

Les tables liées sont :

  • sw_data_dealelement : Table des éléments d'opportunité/affaire

Critères d'activation

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

Fonctionnement

verb: GET
resultType: simple

Info

"deal":{
    "codedeal": "PJ000011",
    "customer_ID": "C0000001",
    "label": "Vitrine de magasin",
    "generictype_ID_dealType": "Type projet 1",
    "generictype_ID_status": "ACTIVE",
    "dealNumber": "PJ000011",
    "isProject": "1"
  }

verb: GET
resultType: extended

Info
"deal":{
    "codedeal": "PJ000011",
    "customer_ID": "C0000001",
    "label": "Vitrine de magasin",
    "generictype_ID_dealType": "Type projet 1",
    "generictype_ID_status": "ACTIVE",
    "dealNumber": "PJ000011",
    "isProject": "1",
    "description": "",
    "creationDate": "2020-09-18 00:00:00",
    "closingDate": "",
    "amount": "300",
    "probability": "55",
    "generictype_ID_lossReason": "",
    "customer_ID_introducer": "",
    "baseuser_ID": "",
    "amount2": "",
    "lossReasonComment": "",
    "realClosingDate": "",
    "dealstep_ID_current": "",
    "deal_ID_origin": "",
    "manualProbability": "0",
    "marketinglead_ID_origin": "",
    "customercontact_ID": "C0000001-DJ"
  }

Verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables generictype_deal_type, customer, customercontact, baseuser et generictype_status

Info
Info
"related":[
{
  "generictype_dealType":{
    "codegenerictype": "DEAL_DEALTYPE-PRJ",
    "label": "Project type 1",
    "originalCode": "PRJ",
    "dataType": "DEAL_DEALTYPE",
    "description": "",
    "translationKey": "",
    "generictype_ID_parent": "Project",
    "tag":"",
    "orderNumber":""
  },
  "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",
    "codedealgpsLatitude": "PJ00001147.33222",
    "customer_IDaccountNumber": "C0000001",
    "labelcontactName": "Vitrine de magasin",
    "generictypecurrency_ID_dealType": "DEAL_DEALTYPE-PRJ",
    "dealNumberauthorizedCredit":"PJ000011"
  }

verb: GET
resultType: extended

Info
"deal":{"0",
    "codedealrisk": "PJ0000111",
    "customer_IDunderSurveillance": "C0000001",
    "labelworkforce": "Vitrine de magasin25",
    "generictypecustomer_ID_dealTypepaying": "DEAL_DEALTYPE-PRJ",
    "dealNumberpricecategory_ID": "PJ000011",
    "descriptiondiscountRate": "0",
    "creationDatewebsite":"2020-09-18 00:00:00 "https://www.guichard.com",
    "closingDatelegalStatus": "Société Anonyme avec Directoire",
    "amountgenerictype_ID_brand": "300",
    "probabilitygenerictype_ID_deliveryMode": "55",
    "generictype_ID_lossReasonpaymentMean": "",
    "customergenerictype_ID_introducercountry": "",
    "baseusergenerictype_ID_province": "",
    "amount2generictype_ID_customerType": "CTC",
    "generictype_ID_statuscustomerFamily": "DEAL_STATUS-PRJ-1",
    "lossReasonCommentconfirmationEmail": "contact@guichard.com",
    "realClosingDateconfirmationFax": "",03 90 11   "dealstep_ID_current":"22 44",
    "dealgenerictype_ID_origintaxCode": "",
    "isProjectproductdepot_ID": "1",
    "manualProbabilitygenerictype_ID_accountingCategory": "0",
    "marketingleadgenerictype_ID_origincustomerPotential": "B",
    "customercontactgenerictype_ID_civility": "C0000001-DJ",
    }

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

"related":[
{"skype": "contact@guichard.com",
    "generictype_ID_dealTyperole":{ "",
    "codegenerictypeunused":"DEAL_DEALTYPE-PRJ "0",
    "customergroup_ID": "",
    "labelgenerictype_ID_referencing":"Project type 1 "2",
    "generictype_ID_distribution": "SELF",
    "originalCodegenerictype_ID_market": "PRJBIG",
    "dataTypearea": "DEAL_DEALTYPE",
    "descriptionbaseculture_ID": "FR-FR",
    "translationKeybaseuser_ID_favoriteTechnician": "TECH-01",
    "generictypebranchoffice_ID_parent": "ProjectSXB",
    "tagemailFormat": "",
    "orderNumberisIndividual": "0"
,
 },   "customerfacebook":{
    "codecustomer":"C0000001https://www.facebook.com/guichard/",
    "nametwitter":"ENTREPRISE DIJON GUICHARD "https://twitter.com/guichard",
    "baseuser_IDyoutube": "https://www.youtube.com/watch?v=6jGbnEwQJ54",
    "address1linkedin":"33 Avenue du Drapeau "https://www.linkedin.com/company/guichard",
    "address2activity": "",
  },
  "address3customercontact":"",{
    "postalCodecodecustomercontact": "21000C0000001-DJ",
    "citycustomer_ID": "DIJONC0000001",
    "phoneNumberlastName":"03 90 11 22 33 "DENEIR",
    "faxNumberfirstName":"03 90 11 22 44 "Jacques",
    "mobilePhoneNumbergenerictype_ID_civility":"06 90 11 22 33 "Monsieur",
    "emailaddress1":"contact@guichard.com "1b rue Darwin",
    "deliveryDaysaddress2":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5B "",
    "openingDays":"1A;1B;2A;2B;3A;3B;4A;4B;5A;5Baddress3": "",
    "siretNumberpostalCode": "21000",
    "vatIntracity": "DIJON",
    "apeCodephoneNumber":"516K "05 55 79 56 92",
    "commentfaxNumber": "05 55 79 56 11",
    "blockedmobilePhoneNumber":"0 "06 07 08 09 10",
    "blockedCommentemail": "jdeneir@nebout.div",
    "messagegpsLongitude": "5.0384",
    "vacationStartgpsLatitude": "47.33073",
    "vacationEnddescription": "Acheteur direct",
    "gpsLongitudegenerictype_ID_position": "5.04372Direction",
    "gpsLatitudebirthday":"47.33222 "1980-09-18 00:00:00",
    "gpsPrecisiongenerictype_ID_country": "8FR",
    "gpsUpdateDategenerictype_ID_province":"2020-09-03 23:02:12 "",
    "gpsManualmainContact": "0",
    "accountNumbergenerictype_ID_service": "C0000001Direction",
    "contactNameskype": "",
    "currencybaseculture_ID": "",
    "authorizedCreditbouncedEmailDetected": "0",
    "riskclosedDate": "1",
    "languagetwitter": "",
    "underSurveillancelinkedin": "",
    "workforce":"25",
 }
}]

verb: PUT

Info
Info
{
  "customer_ID_payingdeal":"", {
    "pricecategory_IDcodedeal": "PJ000011", /* Code globalement unique de l'affaire "discountRate(Varchar (255))*/
    "customer_ID": "0C0000001", /* Code client (ForeignKey ()  "website":"https://www.guichard.com",- sw_data_customer.codecustomer)*/
    "legalStatuslabel": "SociétéVitrine Anonymede avec Directoiremagasin", /* Libellé (Varchar (255))*/
    "generictype_ID_branddealType": "DEAL_DEALTYPE-PRJ", /* Code type  "generictype_ID_deliveryMode":"",
    "generictype_ID_paymentMean":"",
    "generictype_ID_country":"",d'affaire (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = DEAL_DEALTYPE)*/
    "generictype_ID_provincedealNumber": "PJ000011", /*  d'affaire  "generictype_ID_customerType":"CTC",(Varchar (64))*/
    "generictype_ID_customerFamilydescription": "", Description    "confirmationEmail":"contact@guichard.com",(Text (65535))*/
    "confirmationFaxcreationDate" :"03 90 11 22 44",
    "generictype_ID_taxCode":"", "2020-09-18", /* Date de création (DateTime ())*/
    "productdepot_IDclosingDate": "", /* Date de fin  "generictype_ID_accountingCategory":"",(DateTime ())*/
    "generictype_ID_customerPotentialamount": "B300", /* Montant   "generictype_ID_civility":"",(Double ())*/
    "skypeprobability": "contact@guichard.com55", /* Probabilité (en %) (Int ())*/
    "generictype_ID_rolelossReason": "", /* Code raison de la perte (ForeignKey  "unused":"0",
    "customergroup_ID":"",() - sw_data_generictype.codegenerictype avec datatype = DEAL_LOSSREASON)*/
    "generictype_ID_referencinglossReasonComment": "2", /* Commentaire perte  "generictype_ID_distribution":"SELF",(Text (65535))*/
    "generictypecustomer_ID_market":"BIG",
    "areaintroducer": "", /* Code client  "baseculture_ID":"FR-FR",apporteur d'affaire (ForeignKey () - sw_data_customer.codecustomer)
    "baseuser_ID_favoriteTechnician": "TECH-01", /* Code responsable (ForeignKey () - "branchoffice_ID":"SXB",sw_data_baseuser.codebaseuser)*/
    "emailFormatamount2":"",
    "isIndividual":"0", /* Montant 2  "facebook":"https://www.facebook.com/guichard/",(Double ())*/
    "twittergenerictype_ID_status":"https://twitter.com/guichard",
    "youtube":"https://www.youtube.com/watch?v=6jGbnEwQJ54",
    "linkedin":"https://www.linkedin.com/company/guichard", "DEAL_STATUS-PRJ-1",Statut (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = DEAL_STATUS)*/    
    "activityrealClosingDate": "", /* Date de },fin réelle  "customercontact":{(DateTime ())*/
    "codecustomercontactdealstep_ID_current":"C0000001-DJ", "", /* Code étape actuelle (ForeignKey () - sw_data_dealstep.codedealstep)*/
    "customerdeal_ID_origin":"C0000001",     "lastName":"DENEIR", /* Code opportunité  "firstName":"Jacques",
    "generictype_ID_civility":"Monsieur",d'origine (ForeignKey () - sw_data_deal.codedeal)*/
    "address1isProject": "1b rue Darwin1", /* Opportunité (Valeurs possibles "address2":"",
: 0,1) (Bool ())*/
    "address3manualProbability": "0", /* Probabilité manuelle (Valeurs possibles "postalCode":"21000",: 0,1) (Bool ())*/
    "citymarketinglead_ID_origin": "DIJON", /* Code lead  "phoneNumber":"05 55 79 56 92",marketing d'origine (ForeignKey () - sw_data_marketinglead.codemarketinglead)*/
    "faxNumbercustomercontact_ID": "C0000001-DJ"05 55 79 56 11",
    "mobilePhoneNumber":"06 07 08 09 10",, /* Code contact client (ForeignKey () - sw_data_customercontact.codecustomercontact)*/	        "email":"jdeneir@nebout.div",
    "gpsLongitudeinternalCodeDeal":"5.0384",
    "gpsLatitude":"47.33073",
    "gpsAccuracy":"6", null, /* CodeDeal original de weavy s'il y a eu transcodage (Varchar (255)) */
    "gpsUpdateDateinternalcustomer_ID":"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", null, /* CodeCustomer original de weavy s'il y a eu transcodage (Varchar (255)) */ 

    /* Optionnel : pour mettre à jour les champs dynamiques selon paramétrage */
    /* Exemple 1 : */
    "generictype_ID_servicedynamicfields":"Direction", 
    [{
 "skype":"",     "baseculture_IDfieldname": "prj10",,
      "bouncedEmailDetectedfieldvalue": "100000",
    "closedDate":"",},
    {
 "twitter":"",     "linkedinfieldname": "prj30",
  } }]

verb: PUT

{   "dealfieldvalue": { "Jean-René Abraham"    
   "codedeal": "PJ000011" },
    "customer_ID": "C0000001",{
     "label": "Vitrine de magasin", ...
    }]
 "generictype_ID_dealType": "DEAL_DEALTYPE-PRJ",  /* Exemple 2 "dealNumber": "PJ000011",
    "description": "",
    "creationDate" : "2020-09-18",
    "closingDate": "",
    "coefficient": "",: */
    /* A partir de la version SUMMER'21, le mappage direct des champs dynamiques est possible en utilisant le nom du champ en bdd */
    "amountv_prj10": "300100000",
    "probabilityv_prj30": "55Jean-René Abraham",
    "generictype_ID_lossReason": "",
 ...
  },
  "customer_ID_introducerdealelement": "", [
  {
    "baseuser_IDcodedealelement": "PJ000011-0-1", /* Code globalement unique de l'élément  "amount2": "",d'affaire (Varchar (255))*/
    "generictypedeal_ID_status": "DEAL_STATUS-PRJ-1PJ000011", /* Code affaire. Reprendre "lossReasonComment": "",
    "realClosingDate": "",
    "dealstep_ID_current": "",le code affaire du bloc json "deal" (ForeignKey () - sw_data_deal.codedeal)*/
    "deal_ID_originlabel" : "Elément 1", /* Libellé   "isProject": "1",(Varchar (255))*/ 
    "manualProbabilityDataOrder": "010", /* Ordre d'affichage  "marketinglead_ID_origin": "",(Int ())*/
    "customercontact_IDoriginalCode": "C0000001-DJ1",	 /* Code de l'élément d'affaire à afficher (Varchar (255))*/
    "internalCodeDealdealelementstructure_ID": null"", /* CodeDeal original de weavy s'il y a eu transcodage (Varchar (255)) */Code structure (ForeignKey () - sw_data_dealelementstructure.codedealelementstructure)*/	        
    "internalcustomerdealelement_ID_parent": null,"" /* CodeCustomerCode original de weavy s'il y a eu transcodage (Varchar (255)) */ 

    /* Optionnel : pour mettre à jour les champs dynamiques selon paramétrage élément d'affaire parent (nécessite que le parent a été créée avant celui-ci) (ForeignKey () - sw_data_dealelement.codedealelement)*/
  },
 /* Exemple{
: */     "dynamicfieldscodedealelement": "PJ000011-0-1.1", /* Code globalement unique [{de       "fieldname": "prj10",
l'élément d'affaire (Varchar (255))*/ 
    "fieldvaluedeal_ID": "100000PJ000011", /* Code affaire. Reprendre },le code affaire du bloc {json "deal" (ForeignKey ()    "fieldname": "prj30",- sw_data_deal.codedeal)*/
      "fieldvaluelabel" : "Jean-René Abraham"    
    },
    {Elément 1.1", /* Libellé (Varchar (255))*/  
     ...
    }] 
  },"DataOrder": "11", /* Ordre d'affichage (Int ())*/ 
    "dealelementoriginalCode": [
  {
    "codedealelement": "PJ000011-0-1", "1.1", /* Code de l'élément d'affaire à afficher (Varchar (255))*/
    "dealdealelementstructure_ID": "PJ000011", /* Code structure  "label" : "Elément 1",  (ForeignKey () - sw_data_dealelementstructure.codedealelementstructure)*/
    "DataOrderdealelement_ID_parent": "10PJ000011-0-1", /* Code élément d'affaire parent  "originalCode": "1", 
    "dealelementstructure_ID": "",
    "dealelement_ID_parent": ""(nécessite que le parent a été créée avant celui-ci) (ForeignKey () - sw_data_dealelement.codedealelement)*/
  },
  {
    "codedealelement": "PJ000011-0-1.12", /* Code globalement unique de l'élément d'affaire (Varchar (255))*/
    "deal_ID": "PJ000011",     "label" : "Elément 1.1",  
    "DataOrder": "11",  
    "originalCode": "1.1", 
    "dealelementstructure_ID": "",/* Code affaire. Reprendre le code affaire du bloc json "deal" (ForeignKey () - sw_data_deal.codedeal)*/
    "label" : "Elément 2", /* Libellé (Varchar (255))*/  
    "dealelement_ID_parentDataOrder": "PJ000011-0-120", /* Ordre },
  {d'affichage (Int ())*/ 
    "codedealelementoriginalCode": "PJ000011-0-2", 2", /* Code de l'élément d'affaire à afficher (Varchar (255))*/
    "dealdealelementstructure_ID": "PJ000011", /* Code structure  "label" : "Elément 2",  (ForeignKey () - sw_data_dealelementstructure.codedealelementstructure)*/
    "DataOrderdealelement_ID_parent": "20", /* Code élément    "originalCode": "2", 
    "dealelementstructure_ID": "",
    "dealelement_ID_parent": ""d'affaire parent (nécessite que le parent a été créée avant celui-ci) (ForeignKey () - sw_data_dealelement.codedealelement)*/
  }]
}

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

Info
"filters:" {
  "codeDeal": "value", filter is equal
  "label": "value", filter is contains
  "codeCustomer": "value", filter is equal
  "dealType": "value", filter is equal
  "codeStatus": "value" filter is equal
}