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é

...

Customer (Clients)

...

en lecture/écriture/suppression via un objet métier depuis une application externe.

Tables

Les tables utilisées sont :

  • sw_data_customer

...

  • : Table des tiers

Les tables liées sont :

  • sw_data_customerextension

...

  • : Table des indicateurs tiers

  • sw_data_customeruser : Table des utilisateurs liés aux tiers

Critères d'activation

WHK_Customer

...

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

Fonctionnement

Ajout d'un paramètre Settings (configuation) 

...

Règles métier

verb: PUT

  • Le type de tiers est mis par défaut à ‘Client' (generictype_ID_customerType = ‘CTC’) si non fourni lors d’une création

  • Les types de tiers gérés sont CTC : Client et CTE : Temporaire

Fonctionnement

settings parameters

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

verb: GET
resultType: simple

Infocode
languagejson
  "customer":{
    "codecustomer":"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_customerType":"CTC",
    "generictype_ID_country":"FR",
    "generictype_ID_province":"",
    "generictype_ID_civility":"",
    "baseculture_ID":"FR-FR",
    "branchoffice_ID":"SXB"
  }

verb: GET
resultType: extended

Info
Bloc de code
languagejson
  "customer":{
    "codecustomer":"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_customerType":"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",
    "customer_ID_paying":"",
    "pricecategory_ID":"",
    "discountRate":"0",
    "website":"
https
<https://www.guichard.com",>
    "legalStatus":"Société Anonyme avec Directoire",
    "generictype_ID_brand":"",
    "generictype_ID_deliveryMode":"",
    "generictype_ID_paymentMean":"",
    "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",
    "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":""
  }

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

...

, branchoffice et productdepot

Bloc de code
languagejson
"related":[
{
  "generictype_customerFamily":{
    "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":""
  }
}]

Verb: GET
resultType: simple, extended, extendedRelated

Avec paramètre getIndicators = 1

Info
"customer
,
  "generictype_country": {
    
... }, "indicators": [{
"codegenerictype": "COUNTRY-FR",
    "
codecustomerextension
label": "
30000000493
FRANCE",
    "
customer_ID
originalCode": "
2033
FR",
    "
dataQualityIndicator
dataType": "
5
COUNTRY",
/*

Indice
 
qualité*/
   "
turnoverN
description": "",
/*
 
CA
 
N*/
  
"
turnoverN1
translationKey": "GenType_COUNTRY-FR",
/*
 
CA N-1*/
   "
turnoverN2
generictype_ID_parent": "",
/*
 
CA
 
N-2*/
  
"
lastOrder
tag": "
2019-05-17 08:47:47
",
/*

Dernière
 
commande*/
   "
lastIntervention
orderNumber": "
2020-08-17 15:00:00
"
,

/*
 
Dernière
 
intervention*/
},
  "
openedContract
generictype_province": 
"0", /* Contrats en cours*/ "openedQuote
{
    "codegenerictype": "
26
",
/*
 
Devis en cours*/
   "
openedOpportunity
label": "
0
",
/*
 
Opportunités
 
en
 
cours*/
 
"
credit
originalCode": "",
/*
 
Encours*/
   "
generictype_ID_customerpotential
dataType": "
B
",
/*
 
Potentiel client*/
   "
lastVisit
description": "",
/*
 
Dernière
 
visite*/
  
"
companyTurnover
translationKey": "
22839140
",
/*
 
Dernier
 
chiffre
 
d'affaire*/
 
"companyTurnoverDate
"generictype_ID_parent": "
2018-11-23 00:00:00
",
/*
 
Date
 
du
 
dernier chiffre d'affaire*/
 "
generictype_ID_companyTurnoverSlice
tag": "
CA 20 à 50 M€
",
/*
 
Tranche CA*/
   "
generictype_ID_companyWorkforceSlice
orderNumber": "
Effectif 100 à 199", /* Tranche effectif*/
"
  },
  "baseculture": {
    "
companyWorkforce
codebaseculture": "
180
FR-FR",
/* Dernier
 
effectif*/
   "
companyWorkforceDate
label": "
2018
French -
03-30 00:00:00
 France",
/*
 
Date
 
du
 
dernier
 
effectif*/ "anonymizationDate
"codelanguage": "FR"
,

/*
 
Date d'anonymisation*/
 },
  "
openedTask
generictype_civility": 
"0" /* Tâches en cours*/ }]

verb: PUT

Info
{
{
    "codegenerictype": "",
    "
customer
label": 
{
"",
    "
codecustomer
originalCode": "
C0000001
",
/*
  
Code
 
globalement
 
unique du client (Varchar (255))*/ "name
"dataType": "",
    "description": "
ENTREPRISE DIJON GUICHARD
",
/*
 
Nom
 
du
 
client (Varchar (255))*/
 "translationKey": "",
    "
address1
generictype_ID_parent": "
33 Avenue du Drapeau
",
/*
  
Adresse
 
1 (Varchar (255))*/
 "tag": "",
    "
address2
orderNumber": 
null
""
  },
/*
 
Adresse 2 (Varchar (255))*/
 "baseuser_favoriteTechnician": {
    
"
address3
codebaseuser": 
null
"TECH-01",
 
/*
 
Adresse
 
3 (Varchar (255))*/
 "lastName": "TECH-01",
    "
postalCode
firstName": "
21000
Tango",
/*
  
Code
 
postal (Varchar (16))*/
 "initials": "",
    "
city
email": "
DIJON
tech01@test.fr",
/*
 
Ville
 
(Varchar (64))*/
  
"phoneNumber": "
03 90 11 22 33
",
/*
 
 
de
 
téléphone (Varchar (64))*/
 "faxNumber": "",
    "
faxNumber
address1": "
03
2 
90
Allée 
11
de 
22 44
Strasbourg",
/*
 
 
de
 
télécopie (Varchar (64))*/
 "address2": "",
    "
mobilePhoneNumber
postalCode": "
06
91300",
 
90
 
11
 
22
 
33
"city"
, /* N° de portable (Varchar (64))*/
: "Massy",
    "position": "",
    "
email
department": "
contact@guichard.com
",
/* Email

(Varchar
 
(255))*/
   
"website
"generictype_ID_country": "
https://www.guichard.com
",
 
/*
 
Site
 
internet (Varchar (255))*/
 "generictype_ID_province": "",
    "
siretNumber
baseculture_ID": 
null
"FR-FR",
/*
  
 
siret (Varchar (40))*/
 "branchoffice_ID": "Agence-01",
    "
generictype
resourcetype_ID
_customerType
": "
CUSTOMER_TYPE-CTC
",
/*
 
Code
 
type
 
de tiers. Mettre CUSTOMER_TYPE-CTC pour un client. (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_TYPE)*/
 "supervisor": "",
    "useMileageRate": "",
    "account": "",
    "
generictype_ID_country
analyticSection": "
COUNTRY-FR
",
/*
 
Code
 
pays
 
(ForeignKey () - sw_data_generictype.codegenerictype avec datatype = COUNTRY)*/ "baseuser_ID
 "productdepot_ID": "",
    "lastGPSDate": "
GRO-OUES
",
/*
 
Code
 
utilisateur
 
(ForeignKey () - sw_data_baseuser.codebaseuser)*/
 "gpsLongitude": "2.2922000000000353",
    "
deliveryDays
gpsLatitude": "
1A;1B;2A;2B;3A;3B;4A;4B;5A;5B;", /* Jours de livraison (Varchar (255))*/ "openingDays": "1A;1B;2A;2B;3A;3B;4A;4B;5A;5B;", /* Jours d'ouverture (Varchar (255))*/
48.73596000000003",
    "fullView": "",
    "
comment
changeAuthorization": "",
/*
  
Commentaires (Text (65535))*/
  "productdepot_ID_current": "",
    "
blocked
techSyncRule": "0",
/*
 
Client
 
bloqué
 
(Valeurs possibles
 "homePage": 
0
"",
1)

(Bool
 
())*/
   
"
blockedComment
teamtype_ID": "",
/*
 
Commentaires
 
client
 
bloqué (Text (65535))*/
 "customer_ID_subcontractor": "",
    "
message
techIsSedentary": ""
  },
/*
 
Message (Text (65535))*/
 "branchoffice": {
    "
vacationStart
codebranchoffice": "SXB",
/*
 
Début
 
des
 
congés (Date ())*/
 "name": "Strasbourg",
    "
vacationEnd
address1": "10 Rue de l'Outre",
/*
 
Fin
 
des
 
congés (Date ())*/
 "address2": "",
    "
underSurveillance
postalCode": "
0
67000",
/*
 
Client
 
sous
 
surveillance (Valeurs possibles : 0,1) (Bool ())*/
 "city": "Strasbourg",
    "generictype_ID_
customerFamily
country": "
CUSTOMER_FAMILY-GROSARTG
FR",
/*
 
Code
 
famille
 
client (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_FAMILY)*/
 "phoneNumber": "0388123456",
    "faxNumber": "0388123400",
    "
generictype_ID_paymentMean
email": "
PAYMENT_MEAN-N30
noreply-weavysxb@divalto.com",
/*
 
Code
 
mode
 
de
 
règlement (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = PAYMENT_MEAN)*/ "generictype_ID_deliveryMode": "DELIVERY_MODE-CHRO", /* Code mode de livraison (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = DELIVERY_MODE)*/
"website": "",
    "bankholidayparamheader_ID": "FRANCE-ALSACE-MOSELLE",
    "gpsLongitude": "7.7475",
    "gpsLatitude": "48.58367",
    "
pricecategory
baseusergroup_ID": "
GR
#SXB-Strasbourg",
/*
 
Code
 
catégorie
 
tarifaire (ForeignKey () - sw_data_pricecategory.codepricecategory)*/
 "interventionTeamLifetime": "4"
  },
  
"
discountRate
productdepot": 
"0.00", /* Taux de remise (Double ())*/
{
    "codeproductdepot": "",
    "
authorizedCredit
label": "
0
",
/*
 
Encours autorisé
 
(Valeurs
 
possibles
 "vehicle": 
0
"",
1)

(Bool
 
())*/
   
"
apeCode
main": "
516K
",
/*
 
Code
 
APE
 
(Varchar
 
(64))*/ "vatIntra
"vehicleRegistration": 
null
"",
/* TVA intracommunautaire (Varchar (64))*/
    
"
legalStatus
vehicleBrand": "
Société Anonyme avec Directoire
",
/* Forme juridique

(Varchar
 
(64))*/
   
"
workforce
vehicleModel": "
23
",
 
/*
 
Effectif
 
(Int ())*/
 "automaticReception": ""
  
"customer_ID_paying
}
}]

verb: GET
resultType: simple, extended, extendedRelated
getIndicators: 1

Bloc de code
languagejson
"customer": 
null,
{
/*
 
Code
 
client
 
payeur
 
(ForeignKey () - sw_data_customer.codecustomer)*/
...
  },
"indicators": [{
  "
generictype_ID_taxCode
codecustomerextension": "
TAX_CUSTOMER-0
30000000493",
/*
 
Code TVA client (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = TAX_CUSTOMER)*/
 "customer_ID": "2033",
  "dataQualityIndicator": "5", /* Indice qualité*/
  "
risk
turnoverN": "
1
", /* 
Risque (Varchar (64))
CA N*/
  
"
language
turnoverN1": "
FR
", /* 
Code langue (ForeignKey () - sw_sys_language.codelanguage)*/
CA N-1*/
  "
accountNumber
turnoverN2": "
C0000001
", /* 
N° de compte principal (Varchar (64))*/
CA N-2*/
  "lastOrder": "2019-05-17 08:47:47", /* Dernière commande*/
  "
currency_ID
lastIntervention": "
EUR
2020-08-17 15:00:00", /* 
Code devise ForeignKey () - sw_data_currency.codecurrency)*/
Dernière intervention*/
  "
generictype_ID_province
openedContract": 
null
"0", /* 
Code
Contrats 
province (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = PROVINCE)
en cours*/
  "openedQuote": "26", /* Devis en cours*/
  
"generictype_ID_civility
"openedOpportunity": "
CIVILITY-SA
0", /* 
Code
Opportunités 
civilité (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CIVILITY)*/
en cours*/
  "credit": "", /* Encours*/
  "
customergroup
generictype_ID_customerpotential": "B", /* 
Code
Potentiel 
groupe client (ForeignKey () - sw_data_customergroup.codecustomergroup)*
client*/
  
"
confirmationFax
lastVisit": "
03 90 11 22 44
", /* 
N° de télécopie de confirmation (Varchar (64))
Dernière visite*/
  
"
confirmationEmail
companyTurnover": "
contact@guichard.com
22839140", /* 
Email
Dernier 
de confirmation (Varchar (255))
chiffre d'affaire*/
  
"generictype_ID_accountingCategory
"companyTurnoverDate": "
", /* Code catégorie comptable (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = ACCOUNTING_CATEGORY)*/
2018-11-23 00:00:00", /* Date du dernier chiffre d'affaire*/
  "generictype_ID_companyTurnoverSlice": "CA 20 à 50 M€", /* Tranche CA*/
  "generictype_ID_
customerPotential
companyWorkforceSlice": "
CUSTOMER_POTENTIAL-B
Effectif 100 à 199", /* 
Code
Tranche 
potentiel
effectif*/
client
 
(ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_POTENTIAL)*/
 "companyWorkforce": "180", /* Dernier effectif*/
  "
generictype_ID_role
companyWorkforceDate": "2018-03-30 00:00:00", /* 
Code
Date du 
rôle (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = ROLE)
dernier effectif*/
  "anonymizationDate": "", /* Date d'anonymisation*/
  
"
unused
openedTask": "0"
,
 /* 
Client inactif (Valeurs possibles : 0,1) (Bool ())*/
Tâches en cours*/
  }]

verb: PUT

Bloc de code
languagejson
{
  "customer": {
    "
generictype_ID_referencing
codecustomer": "
PRODUCT_REFERENCING-NOTSTRICT
C0000001", /* Code 
mode
globalement 
de
unique 
référencement
du 
articles
client (
ForeignKey
Varchar (
) - sw_data_generictype.codegenerictype avec datatype = PRODUCT_REFERENCING
255))*/
    "
generictype_ID_distribution
name": "
DISTRIBUTION-SELF
ENTREPRISE DIJON GUICHARD", /* 
Code
Nom 
type
du 
de distribution
client (
ForeignKey
Varchar (
) - sw_data_generictype.codegenerictype avec datatype = DISTRIBUTION
255))*/
    "
generictype_ID_market
address1": "
MARKET-BIG
33 Avenue du Drapeau", /* 
Code type de magasin
Adresse 1 (
ForeignKey
Varchar (
) - sw_data_generictype.codegenerictype avec datatype = MARKET
255))*/
    "
area
address2": 
""
null, /* 
Superficie
Adresse 2 (
Double
Varchar (255))*/
    "
baseculture_ID
address3": 
"FR-FR"
null, /* 
Code
Adresse 
culture
3 (
ForeignKey
Varchar (
) - sw_data_baseculture.codebaseculture
255))*/
    "
baseuser_ID_favoriteTechnician
postalCode": "
TECH-01
21000", /* Code 
technicien
postal 
préféré
(
ForeignKey
Varchar (
) - sw_data_baseuser.codebaseuser
16))*/
    "
branchoffice_ID
city": "
SXB
DIJON", /* 
Code de l'agence de rattachement (ForeignKey
Ville (Varchar (
) - sw_data_branchoffice.codebranchoffice
64))*/
    
"
emailFormat
phoneNumber": "03 90 11 22 33", /* 
Format d'email
N° de téléphone (Varchar (
255
64))*/
    "
isIndividual
faxNumber": "
0
03 90 11 22 44", /* 
Client
 
est
de 
un
télécopie 
particulier
(Varchar (
Valeurs possibles : 0,1) (Bool (
64))*/
    "mobilePhoneNumber": "06 90 11 22 33", /* N° de portable (Varchar (64))*/
    "
skype
email": "contact@guichard.com", /* 
Skype
Email (Varchar (255))*/
    "
facebook
website": "
https
<https://www.
facebook
guichard.com
/guichard/
",> /* Site 
Facebook
internet (Varchar (255))*/
    "
twitter
siretNumber": 
"https://twitter.com/guichard"
null, /* 
Twitter
siret (Varchar (
255
40))*/
    "
youtube
generictype_ID_customerType": "
https://www.youtube.com/watch?v=6jGbnEwQJ54
CUSTOMER_TYPE-CTC", /* Code 
YouTube
type 
(Varchar (255))*/ "linkedin": "https://www.linkedin.com/company/guichard", /* LinkedIn(Varchar (255))
de tiers. Mettre CUSTOMER_TYPE-CTC pour un client. (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_TYPE). Si non transmis, initialisé par défaut à CTC.*/
    "
activity
generictype_ID_country": "COUNTRY-FR", /* Code 
Activité
pays (
Text
ForeignKey (
65535
)
)*/
 - sw_data_generictype.codegenerictype avec datatype 
"internalCodeCustomer": null, /* CodeCustomer original de weavy s'il y a eu transcodage (Varchar (255)) */
= COUNTRY)*/
    
/* Champs supplémentaires en surcharge DIVINF */ "divinf_t035_
"baseuser_ID": "
RG
GRO-OUES", /* Code 
remise
utilisateur (ForeignKey () - sw_data_
divinf_t035.codedivinf_t035
baseuser.codebaseuser)*/
    "
divinf_t072_ID_promotacod
deliveryDays": "
"
1A;1B;2A;2B;3A;3B;4A;4B;5A;5B;", /* 
Code
Jours de 
promotion
livraison (
ForeignKey
Varchar (
) - sw_data_divinf_t072.codedivinf_t072
255))*/
    "
divinf_t072_ID_promoremcod
openingDays": "1A;1B;2A;2B;3A;3B;4A;4B;5A;5B;",
 /* 
Code remise promotion
Jours d'ouverture (
ForeignKey
Varchar (255))*/
- sw_data_divinf_t072.codedivinf_t072
    "comment": "", /* Commentaires (Text (65535))*/
    "
divinf_t001_ID_tafam
blocked": "
GMS
0", /* 
Code famille de tarification (ForeignKey () - sw_data_divinf_t001.codedivinf_t001
Client bloqué (Valeurs possibles : 0,1) (Bool ())*/
    "
divinf_t001_ID_tafamx
blockedComment": "", /* 
Code
Commentaires 
famille
client 
de tarification exceptionnelle
bloqué (Text (
ForeignKey () - sw_data_divinf_t001.codedivinf_t001
65535))*/
    "
divinf_t002_ID_refam
message": "", /* 
Code classe de remise
Message (
ForeignKey
Text (
) - sw_data_divinf_t002.codedivinf_t002
65535))*/
    "
divinf_t002_ID_refamx
vacationStart": "", /* 
Code
Début 
classe de remise exceptionnelle
des congés (
ForeignKey
Date ()
- sw_data_divinf_t002.codedivinf_t002
)*/
    "
divinf_rem1
vacationEnd": "
0.00
", /* Fin 
Remise
des 
1
congés (
Double
Date ())*/
    "
divinf_rem2
underSurveillance": "0
.00
", /* 
Remise 2 (Double
Client sous surveillance (Valeurs possibles : 0,1) (Bool ())*/
    "
divinf
generictype_ID_
rem3
customerFamily": "
0.00
CUSTOMER_FAMILY-GROSARTG", /* Code 
Remise
famille 
3
client (
Double
ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_FAMILY)*/
    "
divinf
generictype_ID_
remtyp1
paymentMean": "
2
PAYMENT_MEAN-N30", /* Code 
Type
mode de 
remise
règlement 
1
(
Valeurs possibles : 1 (Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int ())
ForeignKey () - sw_data_generictype.codegenerictype avec datatype = PAYMENT_MEAN)*/
    "
divinf
generictype_ID_
remtyp2
deliveryMode": "
2
DELIVERY_MODE-CHRO", /* 
Type
Code mode de 
remise
livraison 
2
(ForeignKey (
Valeurs
) 
possibles : 1 (Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int ()
- sw_data_generictype.codegenerictype avec datatype = DELIVERY_MODE)*/
    "pricecategory_ID": "GR", /* Code catégorie tarifaire (ForeignKey () - sw_data_pricecategory.codepricecategory)*/
    "
divinf_remtyp3
discountRate": "
2
0.00", /* 
Type
Taux de remise 
3
(Double (
Valeurs
))*/
possibles
 
:
 
1
 
(Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int
 "authorizedCredit": "0", /* Encours autorisé (Valeurs possibles : 0,1) (Bool ())*/
    "
divinf_pricecategory_ID_tarCod
apeCode": "516K", /* Code 
tarif TTC
APE (
ForeignKey
Varchar (
) - sw_data_pricecategory.codepricecategory
64))*/
    "
divinf_dev
vatIntra": 
"EUR"
null, /* 
Code
TVA 
devise
intracommunautaire (Varchar (64))*/
    "
divinf_rftctrcod
legalStatus": "
1
Société Anonyme avec Directoire", /* 
Tiers soumis au référencement (Valeurs possibles : 1 (Non), 2 (Oui))
Forme juridique (Varchar (64))*/
    "workforce": "23", /* Effectif (Int ())*/
    "customer_ID_paying": null, 
/* 
Optionnel
Code 
:
client 
pour
payeur 
mettre
(ForeignKey 
à
() 
jour les champs dynamiques selon paramétrage
- sw_data_customer.codecustomer)*/
    
/* Exemple 1 : */ "dynamicfields": [{
"generictype_ID_taxCode": "TAX_CUSTOMER-0", /* Code TVA client (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = TAX_CUSTOMER)*/
    "
fieldname
risk": "
CLI40
1", /* Risque (Varchar (64))*/
    "
fieldvalue
language": "
7" }
FR", /* Code langue (ForeignKey 
{
() 
- sw_sys_language.codelanguage)*/
    "
fieldname
accountNumber": "
CLI50
C0000001", /*  de compte principal (Varchar 
"fieldvalue
(64))*/
    "currency_ID": "
8
EUR", /* Code devise ForeignKey () - sw_data_currency.codecurrency)*/
 
},
   "generictype_ID_province": null, 
{
/* Code province (ForeignKey () - 
... }]
sw_data_generictype.codegenerictype avec datatype = PROVINCE)*/
    "generictype_ID_civility": "CIVILITY-SA", /* 
Exemple
Code 
2
civilité 
: */ /* A partir de la version SUMMER'21, le mappage direct des champs dynamiques est possible en utilisant le nom du champ en bdd */ "v_CLI40": "7
(ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CIVILITY)*/
    "customergroup_ID": "", /* Code groupe client (ForeignKey () - sw_data_customergroup.codecustomergroup)*/
    "confirmationFax": "03 90 11 22 44", /* N° de télécopie de confirmation (Varchar (64))*/
    "confirmationEmail": "contact@guichard.com", /* Email de confirmation (Varchar (255))*/
    "generictype_ID_accountingCategory": "", /* Code catégorie comptable (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = ACCOUNTING_CATEGORY)*/
    "generictype_ID_customerPotential": "CUSTOMER_POTENTIAL-B", /* Code potentiel client (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMER_POTENTIAL)*/
    "generictype_ID_role": "", /* Code rôle (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = ROLE)*/
    "unused": "0", /* Client inactif (Valeurs possibles : 0,1) (Bool ())*/
    "generictype_ID_referencing": "PRODUCT_REFERENCING-NOTSTRICT", /* Code mode de référencement articles (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = PRODUCT_REFERENCING)*/
    "generictype_ID_distribution": "DISTRIBUTION-SELF", /* Code type de distribution (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = DISTRIBUTION)*/
    "generictype_ID_market": "MARKET-BIG", /* Code type de magasin (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = MARKET)*/
    "area": "", /* Superficie (Double ())*/
    "baseculture_ID": "FR-FR", /* Code culture (ForeignKey () - sw_data_baseculture.codebaseculture)*/
    "baseuser_ID_favoriteTechnician": "TECH-01", /* Code technicien préféré (ForeignKey () - sw_data_baseuser.codebaseuser)*/
    "branchoffice_ID": "SXB", /* Code de l'agence de rattachement (ForeignKey () - sw_data_branchoffice.codebranchoffice)*/ 
    "emailFormat": "", /* Format d'email (Varchar (255))*/
    "isIndividual": "0", /* Client est un particulier (Valeurs possibles : 0,1) (Bool ())*/
    "skype": "contact@guichard.com", /* Skype (Varchar (255))*/
    "facebook": "https://www.facebook.com/guichard/", /* Facebook (Varchar (255))*/
    "twitter": "https://twitter.com/guichard", /* Twitter (Varchar (255))*/
    "youtube": "https://www.youtube.com/watch?v=6jGbnEwQJ54", /* YouTube (Varchar (255))*/
    "linkedin": "https://www.linkedin.com/company/guichard", /* LinkedIn(Varchar (255))*/
    "activity": "", /* Activité (Text (65535))*/
    "internalcodecustomer": null, /* CodeCustomer original de weavy s'il y a eu transcodage (Varchar (255)) */	
 
    /* Champs supplémentaires en surcharge DIVINF */
    "divinf_t035_ID": "RG", /* Code remise (ForeignKey () - sw_data_divinf_t035.codedivinf_t035)*/
    "divinf_t072_ID_promotacod": "", /* Code promotion (ForeignKey () - sw_data_divinf_t072.codedivinf_t072)*/
    "divinf_t072_ID_promoremcod": "",  /* Code remise promotion (ForeignKey () - sw_data_divinf_t072.codedivinf_t072)*/
    "divinf_t001_ID_tafam": "GMS", /* Code famille de tarification (ForeignKey () - sw_data_divinf_t001.codedivinf_t001)*/
    "divinf_t001_ID_tafamx": "", /* Code famille de tarification exceptionnelle (ForeignKey () - sw_data_divinf_t001.codedivinf_t001)*/
    "divinf_t002_ID_refam": "", /* Code classe de remise (ForeignKey () - sw_data_divinf_t002.codedivinf_t002)*/
    "divinf_t002_ID_refamx": "", /* Code classe de remise exceptionnelle (ForeignKey () - sw_data_divinf_t002.codedivinf_t002)*/
    "divinf_rem1": "0.00", /* Remise 1 (Double ())*/
    "divinf_rem2": "0.00", /* Remise 2 (Double ())*/
    "divinf_rem3": "0.00", /* Remise 3 (Double ())*/
    "divinf_remtyp1": "2", /* Type de remise 1 (Valeurs possibles : 1 (Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int ())*/
    "divinf_remtyp2": "2", /* Type de remise 2 (Valeurs possibles : 1 (Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int ())*/
    "divinf_remtyp3": "2", /* Type de remise 3 (Valeurs possibles : 1 (Cumulé), 2 (Succesif), 3 (Différé PB), 4 (Différé PN)) (Int ())*/
    "divinf_pricecategory_ID_tarCod": "", /* Code tarif TTC (ForeignKey () - sw_data_pricecategory.codepricecategory)*/
    "divinf_dev": "EUR", /* Code devise (Varchar (64))*/
    "divinf_rftctrcod": "1", /* Tiers soumis au référencement (Valeurs possibles : 1 (Non), 2 (Oui)) (Int ())*/
    
    /* Optionnel : pour mettre à jour les champs dynamiques selon paramétrage */
    /* Exemple 1 : */
    "dynamicfields": 
    [{
      "fieldname": "CLI40",
      "fieldvalue": "7"
    },
    {
      "fieldname": "CLI50",
      "fieldvalue": "8"    
    },
    {
      ...
    }]
    /* 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 */
    "v_CLI40": "7",
    "v_CLI50": "8",
    ...
  },
  "customeruser": [
  {
    "codecustomeruser": "C0000001-95", /* Code utilisateur lié au tiers (Varchar (255))*/
    "customer_ID": "C0000001", /* Code tiers. Optionnel : reprendre le code tiers du bloc json "customer", si non fourni reprend automatiquement le code tiers (ForeignKey () - sw_data_customer.codecustomer)*/
    "baseuser_ID": "95", /* Code utilisateur (ForeignKey () - sw_data_baseuser.codebaseuser)*/
    "generictype_ID_category": "CUSTOMERUSER_LINK-1" /* Code catégorie (ForeignKey () - sw_data_generictype.codegenerictype avec datatype = CUSTOMERUSER-LINK)*/
  },
  {
    "codecustomeruser": "C0000001-TECH1",
    "customer_ID": "C0000001",
    "baseuser_ID": "TECH1",
    "generictype_ID_category": "CUSTOMERUSER_LINK-2"
  }]
}
Info

Exemple de recodification d’un prospect en client

J’ai un prospect ‘P0000001’ (type de tiers : CTP), que je veux recodifier en client ‘C0000001’ (type de tiers : CTC)

Ci-dessous les informations minimales à fournir en mode PUT :

Bloc de code
languagejson
{
  "customer": {
    "codecustomer": "C0000001", // code destination
    "name": "CHEZ SOI",
    "generictype_ID_customerType": "CUSTOMER_TYPE-CTC",
    "
v_CLI50
internalcodecustomer": "
8
P0000001"
,
 // code 
...
origine
  }
}

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

info
Bloc de code
language
json
"filters:" {
  "codeCustomer": "value", filter is equal
  "name": "value", filter is contains
  "customerType": "value", filter is equal
  "customerFamily": "value", filter is equal
  "codeCountry": "value", filter is equal
  "codeBaseuser": "value", filter is equal
  "codeBranchoffice": "value", filter is equal
  
"email
"email": "value", filter is equal
  "emailDomain": "value", filter is endswith (ie "emailDomain": "@domaine.extension")
  "siretNumber": "value", filter is equal
  "
emailDomain
city": "value", filter is 
endswith
startsWith
},
"
siretNumber
orderBy": "value"
, filter is equal }

Valeurs possibles pour le tri "orderBy" :

  • nameAsc : par nom ascendant

Compléments :

  • Pour les verb LIST et GET, on ne renvoie pas les tiers de type "Temporaire"

verb: DELETE
Une suppression d'un tiers (sw_data_customer) va supprimer en cascade les éléments dans la table liée sw_data_customeruser.