Systèmes externes soumettant une demande de ticket

  • Rversion finale: Australia
  • Mis à jour 31 juil. 2025
  • 2 minutes de lecture
  • Ce cas d’utilisation illustre comment le produit (FSO) peut recevoir des demandes de tickets à partir d’un système externe, tel qu’une ServiceNow Opérations des services financiers application bancaire en ligne ou mobile, des systèmes bancaires centraux ou d’autres outils CRM.

    Tout système capable de gérer les appels d’API REST peut implémenter ce scénario pour créer des tickets clients dans FSO. Dans ce scénario, les champs consommateur, compte financier, catégorie, description courte et notes sont envoyés depuis le système externe.

    La table accessible dans ce scénario est Ticket du service de prêt [sn_bom_loan_service].

    Le diagramme suivant montre le flux des appels de l’API REST pour ce scénario et fournit de brèves remarques sur le traitement.

    1. Dans l’application de la banque, définissez les informations nécessaires pour créer l’enregistrement du ticket de prêt, puis appelez le point de terminaison REST POST /now/table/{table_Name} sur votre ServiceNow instance.
    2. L’API de table tente d’écrire les informations publiées dans la table Ticket du service de prêt [sn_bom_loan_service].
    3. L’API de table renvoie les résultats de la demande POST.

    Exemple de code

    L’exemple JavaScript suivant génère les informations d’appel de l’API REST nécessaires, puis envoie la requête POST à votre ServiceNow instance.
    // Construct the REST call to POST the creation of the loan service case on the ServiceNow instance
    // 
    function createRecord(tableName, requestBody) {
    
      var client = new XMLHttpRequest();
      client.open('post', 'http://<instance.servicenow.com>/api/now/tableName);
      client.setRequestHeader('Accept', 'application/json');
      client.setRequestHeader('Content-Type', 'application/json');
    
      client.onreadystatechange = function() {
        if (this.readyState == this.DONE) {
          console.log(this.status + this.response);
        }
      };
    
      client.send(JSON.stringify(requestBody)); // Send the POST request to the ServiceNow instance
    }
    
    // Create the requestBody object to send to the Table API to create the loan service case.
    // This is the typical minimum data that should be passed. You can write to any of the record fields except those
    // starting with 'sys_' - these are system generated read-only fields.
    
    var tableName = ‘sn_bom_loan_service’;
    var requestBody = {
      'consumer': '8938984kljhkhg34j5689903498u5',  // Sys_id of the associated consumer
      'sold_product': '9590349760hkjhi3450983405033', // Sys_id of the customer loan account. 
      'assignment_group': '5469813sae32135s5d55d5d6s6sdd',  // Sys_id of the group to assign the case to
      'contact_type': 'web',  // Communication method used by customer to contact agent
      'product': '54666s6s46s6d6e4116b1f3rgt',  // Sys_id of the product model of the asset associated to the case.
      'service_definition': '989300jfkh8403jf87uj3h9-03i984n4', // Sys_id of the definition of service associated with this account. 
      'short_description': 'Request for loan forgiveness' // Short description for the loan case
    };
    
    createRecord(tableName, requestBody);