Skip to Content

Use Service Ticket Intelligence and Postman to Classify Service Requests

test
0 %
Use Service Ticket Intelligence and Postman to Classify Service Requests
Details

Use Service Ticket Intelligence and Postman to Classify Service Requests

July 9, 2020
Created by
July 9, 2020
Train a machine learning model based on historical service requests in order to classify new requests.

You will learn

  • How to authorize your client to communicate with your Service Ticket Intelligence service instance
  • How to upload training data and train a machine learning model to classify service requests
  • How to classify service requests into categories

Service Ticket Intelligence provides machine learning functionalities to effectively deal with service requests. Thereby, the service offers two main functionalities:

  1. The service is able to analyze the unstructured information in service requests and classify the requests into categories.

  2. The service is able to recommend solutions for service requests based on historical data.

Find more details on the Service Ticket Intelligence concepts here.


Step 1: Get an access token

First, you need to retrieve an OAuth access token which will grant you access to the Service Ticket Intelligence APIs and allows you to communicate with your service instance. This access token is added to all your service instance requests.

Open Postman and make sure that the Env for STI sample collection environment is selected. For detailed steps, see Set Up Postman Environment and Collection to Call Service Ticket Intelligence APIs.

On the left, expand the STI sample collection. Select the request, Get Access Token.

In the request, select the tab Authorization and make sure that for the authorization type Basic Auth is selected. Now enter the following values from your service key into the authentication fields Username and Password:

Service key property Field in Postman
clientid (inside the uaa section of the service key) Username
clientsecret (inside the uaa section of the service key) Password

Click Send to send the request to your service instance.

Get Access Token

The response includes your access_token that is valid for 1799 seconds (30 minutes). After that time, you will need to generate a new one. There is no need to copy the access token as the collection automatically adds the token to all requests.

If you send a request and receive a response, as in the image below, with a status of 401 Unauthorized, your access token has expired. In this case please redo this step in order to get a new access token.

Unauthorized Response
Log on to answer question
Step 2: Upload training data

Now, you can upload data that will be used to train a machine learning model. The training data contains historical service requests that the model can use to learn from. The dataset contains travel-related data and has the following three possible categories: Complaint, Compliment and Request.

Select the request Upload Classification Training File (travel data - small). The training data is already included in the Body of the request. Click Send to upload the training data.

Upload Training File

The service now automatically creates a new model and sets its status to NEW. That indicates that the model was just created and has not been trained yet. Both the ID of the new model, as well as its status, can be found in the response of the request.

Upload Training File Response
Log on to answer question
Step 3: Train model

Next, you can start training the model based on the data that was uploaded in the previous step.

Therefore, select the request Start model training and click Send. This will trigger the model training process.

Start Model Training

To observe the current status of your model, select the request Get model status and click Send.

Inspect Model Status

The response of the request includes all the details of your model along with its current status. When training is triggered, the status is PENDING_TRAINING which indicates that the model is queued for training. Once training has started, the status changes to IN_TRAINING. When training is done, the status changes to READY. Make sure to send the request Get model status every couple of minutes until training is completed. Training time varies depending on data size and infrastructure resource utilizations. In this example, it should take approximately 10 to 20 minutes to complete.

Model Status
Log on to answer question
Step 4: Activate model

To actually classify new service requests using the trained machine learning model, it is necessary to activate (deploy) the model.

Select the request Activate model and click Send. This will start the activation process of the model.

Activate Model

Use the request Get model status from the previous step again to observe the process. Once the status of the model changes to ACTIVE, the model is ready and activated.

Log on to answer question
Step 5: Classify requests

Finally, the model can be used to classify requests.

Select the request Classify single message (without options). Open the Body tab to see the service request message that will be sent to the service. Feel free to change the message to whatever you like. Click Send to classify the request.

Classify Requests

The response of the request includes the predicted category which, for this training data, can be Complaint, Compliment and Request. In this example, the predicted category is Complaint. The prediction is made with a probability indicated by the confidence field which represents how certain a model is about its prediction across all other categories. A confidence of 1 means that the model is 100% sure of its prediction.

Classify Requests

Feel free to try different service request messages in the Body tab and find out which category the service predicts.

You can also try out the other POST /Classify requests.

Classify Requests

You have now successfully used Service Ticket Intelligence to classify new service requests.

Log on to answer question
Step 6: Test yourself
Choose the correct model status to classify new service requests.
×

Next Steps

Back to top