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.

Résumé

Manipulation de l'entité ThirdParty (Tiers) en lecture via un objet métier depuis une application externe.

Info

Ce webhook ne traite que les modes DEFINITION, GET et LIST.

Il permet donc d’interroger par exemple une liste de tiers (client, prospect, suspect, …) sans passer par le webhook particulier à chaque type de tiers.

Pour les modes PUT et DELETE, il faudra passer par le webhook particulier à chaque type de tiers (WHK_Customer, WHK_Prospect, …).

Tables

Les tables utilisées sont :

  • sw_data_customer : Table des tiers

Les tables liées sont :

  • sw_data_customerextension : Table des indicateurs tiers

Critères d'activation

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

Fonctionnement

settings parameters

Bloc de code
"settings":
{
  "getIndicators": "1" // pour le verb GET et LIST permet de retourner les informations des indicateurs tiers
}

verb: GET
resultType: simple

Bloc de code
languagejson
"thirdparty":{
    "codethirdparty":"C0000001",
    "name":"ENTREPRISE DIJON GUICHARD",
    "baseuser_ID":"TENARDIER",
    "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",
    "generictype_ID_thirdpartyType":"CTC",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "generictype_ID_civility":"",
    "baseculture_ID":"FR-FR",
    "branchoffice_ID":"SXB"
  }

verb: GET

resultType: extended

Bloc de code
languagejson
  "thirdparty":{
    "codethirdparty":"C0000001",
    "name":"ENTREPRISE DIJON GUICHARD",
    "baseuser_ID":"TENARDIER",
    "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",
    "generictype_ID_thirdpartyType":"CTC",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "generictype_ID_civility":"",
    "baseculture_ID":"FR-FR",
    "branchoffice_ID":"SXB",
    "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",
    "accountNumber":"C0000001",
    "contactName":"",
    "currency_ID":"",
    "authorizedCredit":"0",
    "risk":"1",
    "language":"",
    "underSurveillance":"",
    "workforce":"25",
    "thirdparty_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_thirdpartyFamily":"",
    "confirmationEmail":"contact@guichard.com",
    "confirmationFax":"03 90 11 22 44",
    "generictype_ID_taxCode":"",
    "productdepot_ID":"",
    "generictype_ID_accountingCategory":"",
    "generictype_ID_thirdpartyPotential":"B",
    "skype":"contact@guichard.com",
    "generictype_ID_role":"",
    "unused":"0",
    "customergroup_ID":"",
    "generictype_ID_referencing":"2",
    "generictype_ID_distribution":"SELF",
    "generictype_ID_market":"BIG",
    "area":"",
    "baseuser_ID_favoriteTechnician":"TECH-01",
    "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":""
  }

verb: GET

resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables generictype_thirdpartyfamily, baseuser, generictype_country, generictype_province, productdepot, generictype_civility, baseculture, baseuser_favoriteTechnician, branchoffice, productdepot et generictype_thirdpartyType

Bloc de code
languagejson
"related":[
{
  "generictype_thirdpartyFamily":{
    "codegenerictype":"CUSTOMER_FAMILY-Est",
    "label":"Grand est",
    "originalCode":"Est",
    "dataType":"CUSTOMER_FAMILY",
    "description":"",
    "translationKey":"GenType_CUSTOMER_FAMILY-Est",
    "generictype_ID_parent":"",
    "tag":"",
    "orderNumber":""
  },
  "baseuser":{
    "codebaseuser":"25",
    "lastName":"MOREL",
    "firstName":"Vincent",
    "initials":"MV",
    "baseusertree_ID":"Région 2",
    "productdepot_ID":"Dépôt Vincent MOREL",
    "productdepot_ID_current":"",
    "email":"vincent@morel.com",
    "phoneNumber":"",
    "faxNumber":"",
    "address1":"",
    "address2":"",
    "postalCode":"",
    "city":"",
    "position":"Représentant",
    "department":"Commercial",
    "structureNav":"1",
    "supervisor":"0",
    "useMileageRate":"",
    "account":"",
    "analyticSection":"",
    "lastGPSDate":"",
    "gpsLongitude":"",
    "gpsLatitude":"",
    "gpsPrecision":"",
    "gpsUpdateDate":"",
    "gpsManual":"",
    "generictype_ID_country":"",
    "generictype_ID_province":"",
    "baseculture_ID":"",
    "branchoffice_ID":"",
    "resourcetype_ID":"",
    "teamtype_ID":""
  },
  "generictype_country": {
    "codegenerictype": "COUNTRY-FR",
    "label": "FRANCE",
    "originalCode": "FR",
    "dataType": "COUNTRY",
    "description": "",
    "translationKey": "GenType_COUNTRY-FR",
    "generictype_ID_parent": "",
    "tag": "",
    "orderNumber": ""
  },
  "generictype_province": {
    "codegenerictype": "",
    "label": "",
    "originalCode": "",
    "dataType": "",
    "description": "",
    "translationKey": "",
    "generictype_ID_parent": "",
    "tag": "",
    "orderNumber": ""
  },
  "baseculture": {
    "codebaseculture": "FR-FR",
    "label": "French - France",
    "codelanguage": "FR"
  },
  "generictype_civility": {
    "codegenerictype": "",
    "label": "",
    "originalCode": "",
    "dataType": "",
    "description": "",
    "translationKey": "",
    "generictype_ID_parent": "",
    "tag": "",
    "orderNumber": ""
  },
  "baseuser_favoriteTechnician": {
    "codebaseuser": "TECH-01",
    "lastName": "TECH-01",
    "firstName": "Tango",
    "initials": "",
    "email": "tech01@test.fr",
    "phoneNumber": "",
    "faxNumber": "",
    "address1": "2 Allée de Strasbourg",
    "address2": "",
    "postalCode": "91300",
    "city": "Massy",
    "position": "",
    "department": "",
    "generictype_ID_country": "",
    "generictype_ID_province": "",
    "baseculture_ID": "FR-FR",
    "branchoffice_ID": "Agence-01",
    "resourcetype_ID": "",
    "supervisor": "",
    "useMileageRate": "",
    "account": "",
    "analyticSection": "",
    "productdepot_ID": "",
    "lastGPSDate": "",
    "gpsLongitude": "2.2922000000000353",
    "gpsLatitude": "48.73596000000003",
    "fullView": "",
    "changeAuthorization": "",
    "productdepot_ID_current": "",
    "techSyncRule": "0",
    "homePage": "",
    "teamtype_ID": "",
    "customer_ID_subcontractor": "",
    "techIsSedentary": ""
  },
  "branchoffice": {
    "codebranchoffice": "SXB",
    "name": "Strasbourg",
    "address1": "10 Rue de l'Outre",
    "address2": "",
    "postalCode": "67000",
    "city": "Strasbourg",
    "generictype_ID_country": "FR",
    "phoneNumber": "0388123456",
    "faxNumber": "0388123400",
    "email": "noreply-weavysxb@divalto.com",
    "website": "",
    "bankholidayparamheader_ID": "FRANCE-ALSACE-MOSELLE",
    "gpsLongitude": "7.7475",
    "gpsLatitude": "48.58367",
    "baseusergroup_ID": "#SXB-Strasbourg",
    "interventionTeamLifetime": "4"
  },
  "productdepot": {
    "codeproductdepot": "",
    "label": "",
    "vehicle": "",
    "main": "",
    "vehicleRegistration": "",
    "vehicleBrand": "",
    "vehicleModel": "",
    "automaticReception": ""
  },
  "generictype_thirdpartyType": {
    "codegenerictype": "CUSTOMER_TYPE-CTC",
    "label": "Customer",
    "originalCode": "CTC",
    "dataType": "CUSTOMER_TYPE",
    "description": "",
    "translationKey": "GenType_CUSTOMER_TYPE-CTC",
    "generictype_ID_parent": "",
    "tag": "CTC",
    "orderNumber": ""
  }
}]

verb: GET

resultType: simple, extended, extendedRelated
getIndicators: 1

Bloc de code
languagejson
"thirdparty": {
    ...
  },
"indicators": [{
  "codethirdpartyextension": "30000000493",
  "thirdparty_ID": "2033",
  "dataQualityIndicator": "5", /* Indice qualité*/
  "turnoverN": "", /* CA N*/
  "turnoverN1": "", /* CA N-1*/
  "turnoverN2": "", /* CA N-2*/
  "lastOrder": "2019-05-17 08:47:47", /* Dernière commande*/
  "lastIntervention": "2020-08-17 15:00:00", /* Dernière intervention*/
  "openedContract": "0", /* Contrats en cours*/
  "openedQuote": "26", /* Devis en cours*/
  "openedOpportunity": "0", /* Opportunités en cours*/
  "credit": "", /* Encours*/
  "generictype_ID_thirdpartypotential": "B", /* Potentiel client*/
  "lastVisit": "", /* Dernière visite*/
  "companyTurnover": "22839140", /* Dernier chiffre d'affaire*/
  "companyTurnoverDate": "2018-11-23 00:00:00", /* Date du dernier chiffre d'affaire*/
  "generictype_ID_companyTurnoverSlice": "CA 20 à 50 M€", /* Tranche CA*/
  "generictype_ID_companyWorkforceSlice": "Effectif 100 à 199", /* Tranche effectif*/
  "companyWorkforce": "180", /* Dernier effectif*/
  "companyWorkforceDate": "2018-03-30 00:00:00", /* Date du dernier effectif*/
  "anonymizationDate": "", /* Date d'anonymisation*/
  "openedTask": "0" /* Tâches en cours*/
  }]

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

Bloc de code
languagejson
"filters:" {
  "codeThirdParty": "value", filter is equal
  "name": "value", filter is contains
  "codeThirdPartyType": "value", filter is equal
  "codeThirdPartyFamily": "value", filter is equal
  "codeCountry": "value", filter is equal
  "codeBaseuser": "value", filter is equal
  "codeBranchoffice": "value", filter is equal
  "email": "value", filter is equal
  "emailDomain": "value", filter is endswith (ie "emailDomain": "@domaine.extension")
  "siretNumber": "value", filter is equal
  "city": "value" filter is startsWith
},
"orderBy": "value"

Valeurs possibles pour le tri "orderBy" :

  • nameAsc : par nom ascendant