WebHook Intervention Request

Résumé

Manipulation de l'entité InterventionRequest (Demandes d'interventions) en lecture/écriture/suppression via un objet métier depuis une application externe.

Tables

Les tables utilisées sont :

  • sw_data_interventionrequest : Table des demandes d'interventions

Les tables liées sont :

  • sw_data_interventionrequestequipment : Table des équipements d'une demande d'intervention

Critères d'activation

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

Fonctionnement

verb: GET
resultType: simple

"interventionrequest": { "codeinterventionrequest": "EXT00000001", "customeraddress_ID": "C0000001-BDX", "customer_ID": "C0000001", "label": "Fuite gaz", "requestDate": "2021-06-04 11:03:50", "generictype_ID_source": "PHONE", "generictype_ID_type": "INCIDENT", "generictype_ID_status": "NEW" }

verb: GET
resultType: extended

"interventionrequest": { "codeinterventionrequest": "EXT00000001", "customeraddress_ID": "C0000001-BDX", "customer_ID": "C0000001", "label": "Fuite gaz", "requestDate": "2021-06-04 11:03:50", "generictype_ID_source": "PHONE", "generictype_ID_type": "INCIDENT", "generictype_ID_status": "NEW", "contactName": "Igor Grannienski", "contactEmail": "igra@soc.com", "contactPhoneNumber": "06....", "description": "Forte odeur de gaz sur l'échappement du brûleur", "baseuser_ID_internalRequest": "BERNARD", "customercontact_ID_externalRequest": "", "customercontact_ID": "C0000001-IG", "interventionrequestpriority_ID": "BLOCKING", "requestInterventionDate": "2021-06-04 00:00:00", "contract_ID_equipment": "", "equipmentwarrantytype_ID": "", "symptom_ID": "A", "externalID": "", "orderheader_ID": "" }

verb: GET
resultType: extendedRelated
en complément du résultat pour resultType: extended on aura le détail pour les tables customeraddress, customer, generictype_type, generictype_source, generictype_status, interventionrequestpriority, customercontact, baseuser_internalRequest, customercontact_externalRequest et symptom

"related":[ { "customeraddress":{ "codecustomeraddress":"C0000001-BDX", "customer_ID":"C0000001", "name":"ENTREPÔT GUICHARD", "site":"1", ... }, "customer":{ "codecustomer":"C0000001", "name":"ENTREPRISE DIJON GUICHARD", ... }, "generictype_type": { "codegenerictype": "INTERVENTION_REQUEST_TYPE-INCIDENT", "label": "Incident", "originalCode": "INCIDENT", "dataType": "INTERVENTION_REQUEST_TYPE", "description": "", "translationKey": "GenType_INTERVENTION_REQUEST_TYPE-INCIDENT", "generictype_ID_parent": "", "tag": "", "orderNumber": "" }, "generictype_source": { "codegenerictype": "INTERVENTION_REQUEST_SOURCE-PHONE", "label": "Phone", "originalCode": "PHONE", "dataType": "INTERVENTION_REQUEST_SOURCE", "description": "", "translationKey": "GenType_INTERVENTION_REQUEST_SOURCE-PHONE", "generictype_ID_parent": "", "tag": "", "orderNumber": "" }, "generictype_status": { "codegenerictype": "INTERVENTION_REQUEST_STATUS-NEW", "label": "New", "originalCode": "NEW", "dataType": "INTERVENTION_REQUEST_STATUS", "description": "", "translationKey": "GenType_INTERVENTION_REQUEST_STATUS-NEW", "generictype_ID_parent": "", "tag": "NEW", "orderNumber": "0" }, "interventionrequestpriority": { "codeinterventionrequestpriority": "BLOCKING", "label": "Blocking", "orderNumber": "3", "generictype_ID_style": "BO-STYLE-label-warning", "urgent": "1" }, "customercontact": { "codecustomercontact":"C0000001-IG", "customer_ID":"C0000001", "lastName":"Grannienski", "firstName":"Igor", "generictype_ID_civility":"Monsieur", ... }, "baseuser_internalRequest": { "codebaseuser": "1", "lastName": "BERNARD", "firstName": "Dominique", "initials": "BC", ... }, "customercontact_externalRequest": { "codecustomercontact": "", "customer_ID": "", "generictype_ID_civility": "", "lastName": "", "firstName": "", ... }, "symptom": { "codesymptom": "A", "label": "Défaut général", "equipmentkind_ID": "", "equipmenttype_ID": "", "interventionDuration": "", "externalLink": "", "endDate": "", "symptom_ID_parent": "", "resolution": "", "internalUse": "" } }]

verb: PUT

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

Valeurs possibles pour le tri "orderBy" :

  • requestDateDesc : par date de demande descendant

  • requestDateAsc : par date de demande ascendant

  • requestInterventionDateDesc : par date d'intervention souhaitée descendant

  • requestInterventionDateAsc : par date d'intervention souhaitée ascendant

verb: DELETE
Une suppression d'une demande d'intervention (sw_data_interventionrequest) va supprimer en cascade les éléments dans les tables liées sw_data_interventionrequestequipment et sw_data_interventionrequestdocument.