Résumé
Manipulation de l'entité DealElement (Eléménts d'opportunité/affaire) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
- sw_data_dealelement : Table des éléments d'opportunité/affaire
Critères d'activation
WHK_DealElement est défini dans la gestion des webhooks du studio.
Fonctionnement
verb: GET
resultType: simple
"dealelement": {
"codedealelement": "PJ000011-0-1.1",
"deal_ID": "PJ000011",
"label": "Elément 1.1",
"originalCode": "1.1"
}
verb: GET
resultType: extended
"dealelement": {
"codedealelement": "PJ000011-0-1.1",
"deal_ID": "PJ000011",
"label": "Elément 1.1",
"originalCode": "1.1",
"DataOrder": "11",
"dealelementstructure_ID": "",
"dealelement_ID_parent": "PJ000011-0-1"
}
Verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables deal et dealelement_parent
"related":[
{
"deal":{
"codedeal": "PJ000011",
"customer_ID": "C0000001",
"label": "Vitrine de magasin",
"generictype_ID_dealType": "DEAL_DEALTYPE-PRJ",
"dealNumber": "PJ000011",
"description": "",
"creationDate": "2020-09-18 00:00:00",
"closingDate": "",
"amount": "300",
"probability": "55",
"generictype_ID_lossReason": "",
"customer_ID_introducer": "",
"baseuser_ID": "",
"amount2": "",
"generictype_ID_status": "DEAL_STATUS-PRJ-1",
"lossReasonComment": "",
"realClosingDate": "",
"dealstep_ID_current": "",
"deal_ID_origin": "",
"isProject": "1",
"manualProbability": "0",
"marketinglead_ID_origin": "",
"customercontact_ID": "C0000001-DJ"
},
"dealelement_parent": {
"codedealelement": "PJ000011-0-1",
"deal_ID": "PJ000011",
"label": "Elément 1",
"originalCode": "1",
"DataOrder": "10",
"dealelementstructure_ID": "",
"dealelement_ID_parent": ""
}
}]
verb: PUT
{
"dealelement": {
"codedealelement": "PJ000011-0-1.1", /* Code globalement unique de l'élément d'affaire (Varchar (255))*/
"deal_ID": "PJ000011", /* Code affaire (ForeignKey () - sw_data_deal.codedeal)*/
"label" : "Elément 1.1", /* Libellé (Varchar (255))*/
"DataOrder": "11", /* Ordre d'affichage (Int ())*/
"originalCode": "1.1", /* Code de l'élément d'affaire à afficher (Varchar (255))*/
"dealelementstructure_ID": "", /* Code structure (ForeignKey () - sw_data_dealelementstructure.codedealelementstructure)*/
"dealelement_ID_parent": "PJ000011-0-1" /* Code élément d'affaire parent (nécessite que le parent a été créé avant celui-ci) (ForeignKey () - sw_data_dealelement.codedealelement)*/
}
}
verb: LIST
resultType: simple, extended, extendedRelated reprendre les définitions du GET
"filters:" {
"codeDealElement": "value", filter is equal
"label": "value", filter is contains
"originalCode": "value", filter is equal
"codeDeal": "value" filter is equal
}