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é  CustomerContact (Contacts des clients)  en lecture/écriture/suppression via un objet métier depuis une application externe.

...

Les tables utilisées sont :

  • sw_data_customercontact

     

    : Table des contacts des tiers

Critères d'activation

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

Fonctionnement

verb: GET
resultType: simple

Infocode
languagejson
  "customercontact":{
    "codecustomercontact":"C0000001-DJ",
    "customer_ID":"C0000001",
    "generictype_ID_civility":"M",
    "lastName":"DENEIR",
    "firstName":"Jacques",
    "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",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "baseculture_ID":""
,

  }

verb: GET
resultType: extended

info
Bloc de code
language
json
  "customercontact":{
    "codecustomercontact":"C0000001-DJ",
    "customer_ID":"C0000001",
    "generictype_ID_civility":"M",
    "lastName":"DENEIR",
    "firstName":"Jacques",    
    "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",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "baseculture_ID":"",
    "gpsLongitude":"",
    "gpsLatitude":"",
    "description":"Acheteur direct",
    "generictype_ID_position":"Responsable commercial",
    "birthday":"1980-09-18",
    "mainContact":"0",
    "generictype_ID_service":"Commercial",
    "skype":"",
    "bouncedEmailDetected":"",
    "closedDate":"",
    "twitter":"",
    "linkedin":"",
    
}

Verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables generictype_civility, customer, generictype_position, generictype_country, generictype_province, generictype_service et baseculture.

Info
"related":[ { "generictype_civility":{
"decisionMaker":"",
    "customercontact_ID_superior":"",
    "
codegenerictype
topFlowchartLevel":
"CIVILITY-M",
 
"label":
"
Monsieur
",
    "
originalCode
erpContactID":"
M
"
,

  
"dataType":"CIVILITY
}

verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables customer, generictype_civility, generictype_position, generictype_country, generictype_ID_province, generictype_service et baseculture

Bloc de code
languagejson
"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":"FR",
    "
description
generictype_ID_province":"",
    "
translationKey
generictype_ID_customerType":
"GenType_CIVILITY-M
"CTC",
    "generictype_ID_customerFamily":"",
    "confirmationEmail":"contact@guichard.com",
    "confirmationFax":"03 90 11 22 44",
    "generictype_ID_
parent
taxCode":"",
    "
tag
productdepot_ID":"",
    "
orderNumber
generictype_ID_accountingCategory":""
}
,
"customer":{

    "
codecustomer
generictype_ID_customerPotential":"
C0000001
B",
    "
name
generictype_ID_civility":"
ENTREPRISE DIJON GUICHARD
",
    "
baseuser_ID
skype":"contact@guichard.com",
    "
address1":"33 Avenue du Drapeau
generictype_ID_role":"",
    "
address2
unused":"0",
    "
address3
customergroup_ID":"",
    "
postalCode
generictype_ID_referencing":"
21000
2",
    "
city
generictype_ID_distribution":"
DIJON
SELF",
    "
phoneNumber
generictype_ID_market":"
03 90 11 22 33
BIG",
    "
faxNumber
area":"
03 90 11 22 44
",
    "
mobilePhoneNumber
baseculture_ID":"
06 90 11 22 33
FR-FR",
    "
email
baseuser_ID_favoriteTechnician":"
contact@guichard.com
TECH-01",
    "
deliveryDays
branchoffice_ID":"
1A;1B;2A;2B;3A;3B;4A;4B;5A;5B
SXB",
    "
openingDays
emailFormat":"
1A;1B;2A;2B;3A;3B;4A;4B;5A;5B
",
    "
siretNumber
isIndividual":"0",
    "
vatIntra
facebook":"https://www.facebook.com/guichard/",
    "
apeCode
twitter":"
516K
https://twitter.com/guichard",>
    "
comment
youtube":"https://www.youtube.com/watch?v=6jGbnEwQJ54",
    "
blocked
linkedin":"
0
https://www.linkedin.com/company/guichard",
    "
blockedComment
activity":""
,

  },
  "
message
generictype_civility":
"",
{
    "
vacationStart
codegenerictype":"CIVILITY-M",
    "
vacationEnd
label":"Monsieur",
    "
gpsLongitude
originalCode":"
5.04372
M",
    "
gpsLatitude
dataType":"
47.33222
CIVILITY",
    "
gpsPrecision
description":"
8
",
    "
gpsUpdateDate
translationKey":"
2020-09-03 23:02:12
GenType_CIVILITY-M",
    "
gpsManual
generictype_ID_parent":"",
    "
accountNumber
tag":"
C0000001
",
    "
contactName
orderNumber":""
,

  },
  "
currency
generictype_
ID
country":
"",
 {
    "
authorizedCredit
codegenerictype": "
0
COUNTRY-FR",
    "
risk
label": "
1
FRANCE",
    "
language
originalCode": "FR",
    "
underSurveillance
dataType": "COUNTRY",
    "
workforce
description": "
25
",
    "
customer_ID_paying
translationKey": "GenType_COUNTRY-FR",
    "
pricecategory
generictype_ID_parent": "",
    "
discountRate
tag": "
0
",
    "
website
orderNumber":
"https://www.guichard.com",
 ""
  },
  "
legalStatus
generictype_province":
"Société
 
Anonyme avec Directoire",
{
    
"
generictype_ID_brand
codegenerictype": "",
    "
generictype_ID_deliveryMode
label": "",
    "
generictype_ID_paymentMean
originalCode": "",
    "
generictype_ID_country
dataType": "
FR
",
    "
generictype_ID_province
description": "",
    "
generictype_ID_customerType
translationKey": "
CTC
",
    "generictype_ID_
customerFamily
parent": "",
    "
confirmationEmail
tag": "
contact@guichard.com
",
    "
confirmationFax
orderNumber": "
03 90 11 22 44",
"
  },
  "baseculture": {
    "
generictype_ID_taxCode
codebaseculture": "FR-FR",
    "
productdepot_ID
label": "French - France",
    "
generictype_ID_accountingCategory
codelanguage": "FR"
,

  },
  "generictype_
ID_customerPotential
position":
"B",
 {
    "
generictype_ID_civility
codegenerictype": "CONTACT_POSITION-2",
    "
skype
label":
"contact@guichard.com
 "Responsable commercial",
    "
generictype_ID_role
originalCode": "2",
    "
unused
dataType": "
0
CONTACT_POSITION",
    "
customergroup_ID
description": "",
    "
generictype_ID_referencing
translationKey": "GenType_CONTACT_POSITION-2",
    "generictype_ID_
distribution
parent": "
SELF
",

   
"generictype_ID_market
 "tag": "
BIG
",
    "
area
orderNumber": ""
,

  },
  "
baseculture
generictype_
ID
service":
"FR-FR",
 {
    "
baseuser_ID_favoriteTechnician
codegenerictype": "
TECH
SERVICE-
01
COMM",
    "
branchoffice_ID
label": "
SXB
Commercial",
    "
emailFormat
originalCode": "COMM",
    "
isIndividual
dataType": "
0
SERVICE",
    "
facebook":"https://www.facebook.com/guichard/
description": "",
    "
twitter
translationKey":
"https://twitter.com/guichard
 "",
    "
youtube
generictype_ID_parent":
"https://www.youtube.com/watch?v=6jGbnEwQJ54
 "",
    "
linkedin
tag":
"https://www.linkedin.com/company/guichard
 "",
    "
activity
orderNumber": ""
  }
}]

verb: PUT

...

PUT

Bloc de code
languagejson
{
  "customercontact": {
    "codecustomercontact": "C0000001-DJ", /* Code globalement unique de contact client (Varchar (255))*/
    "customer_ID": "C0000001", /* Code client (ForeignKey () - sw_data_customer.codecustomer)*/
    "generictype_ID_civility": "CIVILITY-Mr", /* Code civilité (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CIVILITY)*/
    "lastName": "DENEIR", /* Nom (Varchar (255))*/
    "firstName": "Jacques", /* Prénom (Varchar (255))*/
    "address1": "1b rue Darwin", /* Adresse 
Nom
1 (Varchar (255))*/ 
    "
firstName
address2": 
"Jacques"
null, /* Adresse 
Prénom
2 (Varchar (255))*/ 
    "
address1
address3": 
"1b rue Darwin"
null, /* Adresse 
1
3 (Varchar (255))*/ 
    "
address2
postalCode": 
null
"21000", /* 
Adresse
Code 
2
postal (Varchar (
255
16))*/

    "
address3
city": 
null
"DIJON", /* 
Adresse 3
Ville (Varchar (
255
64))*/

    "
postalCode
phoneNumber": "05 55 79 56 92"
21000"
, /* 
Code
N° de 
postal
téléphone (Varchar (
16
64))*/
    "
city
mobilePhoneNumber": "
DIJON
06 07 08 09 10", /* N° de 
Ville
portable (Varchar (64))*/
    "
phoneNumber
faxNumber": "05 55 79 56 
92
11", /* N° de 
téléphone
télécopie (Varchar (64))*/
    "
mobilePhoneNumber
email": 
"06 07 08 09 10
"jdeneir@nebout.div", /* Email (Varchar (255))*/
    "description": "Acheteur direct", /* 
Description 
de portable
(Varchar (
64
255))*/
    "
faxNumber
generictype_ID_position": "
05 55 79 56 11
CONTACT_POSITION-rcom", /* 
Code 
de
fonction 
télécopie
(ForeignKey (
Varchar (64)
) - sw_data_generictype.codegenerictype avec datatype = CONTACT_POSITION)*/
    "
email
generictype_ID_country": "
jdeneir@nebout.div
COUNTRY-FR", /* Code 
Email
pays (
Varchar
ForeignKey (
255)
)
*/
 - sw_data_generictype.codegenerictype avec datatype 
"description": "Acheteur direct", /* Description (Varchar (255)
= COUNTRY)*/
    "generictype_ID
_position": "CONTACT_POSITION-rcom"
_province": null, /* Code 
fonction
province (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = 
CONTACT_POSITION
PROVINCE)*/
    "generictype_ID_
country
service": "
COUNTRY
SERVICE-
FR
CIAL", /* Code 
pays
service(ForeignKey () - sw_data_generictype.codegenerictype avec datatype =
COUNTRY
 SERVICE)*/
    "birthday": "1980-09-18", /* Date d'anniversaire (DateTime ())*/
    "
generictype_ID_province
mainContact": 
null
"0", /* 
Code
Contact 
province
principal (
ForeignKey
Valeurs 
()
possibles 
- sw_data_generictype.codegenerictype avec datatype = PROVINCE
: 0,1) (Bool ())*/
    "
generictype
baseculture_ID
_service
": "
SERVICE-CIAL
", /* Code culture 
service
(ForeignKey () - sw_data_
generictype.codegenerictype avec datatype = SERVICE
baseculture.codebaseculture)*/
    "
birthday
bouncedEmailDetected": "
1980-09-18
", /* Date
d'anniversaire
 email NPAI (N'habite Pas/Plus à l’Adresse Indiquée) (DateTime ())*/
    "
mainContact
closedDate": "
0
", /* 
Contact
Date 
principal
d'archivage (
Valeurs possibles : 0,1) (Bool
DateTime ())*/
    "
baseculture_ID
skype": "", /* 
Code culture
Skype (
ForeignKey
Varchar (
) - sw_data_baseculture.codebaseculture
255))*/
    "
bouncedEmailDetected
twitter": "", /* 
Date
Twitter 
email NPAI (N'habite Pas/Plus à l’Adresse Indiquée) (DateTime (
(Varchar (255))*/
    "
closedDate
linkedin": "", /* 
Date
LinkedIn 
d'archivage
(
DateTime
Varchar (255))*/
    "
skype
decisionMaker"
:
, "0"
,
 /*
Skype
 Décideur (Valeurs possibles : 0,1) (
Varchar
Bool (
255
))*/
    "
twitter
customercontact_ID_superior": "", /* 
Twitter
Supérieur hiérarchique (
Varchar
ForeignKey (
255)
) - sw_data_customercontact.codecustomercontact)*/
    "
linkedin
topFlowchartLevel": "0", /*
LinkedIn (Varchar (255
 Niveau supérieur de l'organigramme (Valeurs possibles : 0,1) (Bool ())*/
    "
internalCodeCustomerContact
erpContactID": 
null
"", /
* CodeCustomerContact original de weavy s'il y a eu transcodage
* ID contact ERP (Varchar (255))
*/
    "
internalcustomer_ID
internalcodecustomercontact": null, /* 
CodeCustomer
CodeCustomerContact original de weavy s'il y a eu transcodage (Varchar (255)) */


    
/* Optionnel : pour mettre à jour les champs dynamiques selon paramétrage */
    /* Exemple 1 : */
    "dynamicfields": 
    [{
      "fieldname": "t10",
      "fieldvalue": "Formation marketing 2.0"
    },
    {
      "fieldname": "t20",
      "fieldvalue": "Formation commerciale expert"    
    },
    {
      ...
    }]
    /* Exemple 2 : */
    /* A partir de la version 
{
SUMMER'21, le mappage direct des champs dynamiques 
...
est possible en utilisant le 
}]
nom du champ en bdd */
*

  
Exemple
 
2
 "v_t10": 
*/
"Formation marketing 2.0",
  
/*
 
A partir de la version SUMMER'21, le mappage direct des champs dynamiques est possible en utilisant le nom du champ en bdd */ "v_t10": "Formation marketing 2.0", "v_t20": "Formation commerciale expert", ... } }

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

Info
"filters:" { "codeCustomerContact
 "v_t20": "Formation commerciale expert",
    ...	
  }
}

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

Bloc de code
languagejson
"filters:" {
  "codeCustomerContact": "value", filter is equal
  "codeCustomer": "value", filter is equal
  "lastName": "value", filter is contains  
  "firstName": "value", filter is contains
  "birthday": "value", filter is greater or equal to
  "
codeCustomer
birthdayBetween": "
value
value1|value2", filter is
equal
 between value1 and value2
  "
lastName
codeCountry": "value", filter is 
contains
equal
  "
firstName
email": "value", filter is 
contains
equal
  "
birthday
emailDomain": "value", filter is 
greater
endswith 
or equal to
(ie "emailDomain": "@domaine.extension")
  "
birthdayBetween
notClosedBefore": "
value1|value2
value", filter is 
between value1 and value2
(closedDate is null OR closedDate > value)
  "
codeCountry
closedAfter": "value", filter is closedDate > 
equal
value
  "
email
closedBefore": "value" filter is closedDate 
equal
< value
},
"
emailDomain
orderBy": "value
" filter is endswith }
"

Valeurs possibles pour le tri "orderBy" :

  • lastNameAscfirstNameAsc : par nom et prénom ascendant