Skip to Content

Hi All,

First of all, I would like to heartfully appreciate the efforts of Data Scientists, Machine Learning and Artificial Intelligence enthusiasts around the world.

Machine Learning is the new ideation and focal point of all the IT industry now.

Innovation at SAP is always superb and their efforts in bringing up a wonderful intelligent solution like SAP Service Ticket Intelligence (based on deep learning neural networks) in SAP Hybris Cloud for Customer deserves kudos from all the development fraternity.

Inspired and motivated by their efforts, I started designing a small, intelligent ticketing tool that classifies the tickets into relevant queues (of course only after a quality learning).

To achieve this I implemented Multinomial Naive Bayes Classifier using scikit-learn Python library.

I won’t go in-depth into the technical part of the implementation in this post. I would share the complete implementation details in my further posts. I would like to share my experience of implementing Machine Learning.


Problem statement

Most of the ticketing tools in any company have varied teams to process the issues. In most of the tools we see, the component to which the ticket to be sent is manually chosen. A team or some human effort is being employed to route this tickets to relevant teams in case if they are raised to wrong queues. Is there any way to automatically route the tickets to exactly appropriate components while raising tickets?

Answer to this problem

Yes, possible. Having a history of tickets and other KBAs at our disposal, we can now not only simply route the tickets but also give recommended solutions to issues. Simply, to achieve this employ Machine Learning.


Ideation…

As depicted above, the machine learning model (a Python program) leverages the data present in the database to classify the incoming new ticket or service request to appropriate queues.

Going into some technical aspects…

The user interface for my custom ticketing tool is built using SAPUI5. I am using SAP HANA for storing the tickets and processing team queues.

Python model uses this history of tickets and queues to learn the word-category probabilities. So, when a new ticket is raised from this ticketing tool, the model predicts the best category to which the ticket can be fed. Awesome! No more hassle.

So, when a new ticket is raised from this ticketing tool, the model predicts the best category to which the ticket can be fed using Scikit-learn MultinomialNB algorithm.

To know how it works:

http://scikit-learn.org/stable/modules/naive_bayes.html#multinomial-naive-bayes

But, are the predictions always accurate?

When we feed in the quality data for training of the model, we can expect the best outcomes. The model scales to best outcomes eventually after learning on more number of quality tickets.

Sneak peek at my tool:

Results:

With the best quality of data (tickets) in learning, the model classified the new tickets fed to it into correct queues.


This is just a basic idea and implementation. I would like to explore more possibilities. I would like to work out the same on Google Tensorflow(An open-source software library for Machine Intelligence).

I really enjoyed looking at Machine Learning in action!

I will share all the code and more ideas in my further blogs.

Thank you for reading!

Best,
Sai Giridhar Varanasi

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

    Hello Sai,

    We have a similar situation and we would like to ask you some questions.

    We want to build a smart ticketing environment. We already build a SAPUI5 app which is connected to the ticketing system (Jira). But between the app and Jira we want to implement SAP service ticket intelligence.

    SAPUI5 >> Machine Learning Services (classification and/or recommendation >> Jira ticketing system.

    The amount of information from SAP is very limited and in the SAP community as well, as far as I know.

    Do you know more about this?

    • How can we train the models?
    • Do we need to implement the code of the Services (classification and recommendation) in the SAPUI5 app?
    • if not how do we have to build this solution?
    • Do you know a step by step approach (it doesn’t have to be sapui5 and jira included) something similar?

    Thank you very much!

    Kind regards,

    Rozh Salih

    (0) 
    1. Sai Giridhar Varanasi
      Post author

      Dear Rozh,

      Thank you for writing a comment on my blog. In this comment, I’m including all the information that I’ve found that could help you.

      As you mentioned, your project(SAPUI5 – JIRA) is pretty same as our project (Automatic IT Ticket Classifier) except the data staging part (In yours, JIRA is being used. We used SAP HANA database to store tickets and SAPUI5 for UI).

      Now, coming to Machine Learning (or) Intelligence part of our project, we did not use SAP Service Ticket Intelligence which is provided as a solution in SAP Hybris Cloud for Customer and as a standalone SAP Leonardo Machine Learning service on SAP Cloud Platform and accessible through REST APIs. Our motive is to create something similar using opensource libraries like as in this project, I’ve utilized a Scikit-learn based Multinomial Naive Bayes algorithm to classify my tickets.

      Also, as I studied and observed, SAP Service Ticket Intelligence has majorly two parts.

      Part 1: Classification of tickets to queues based on Sentiment (Complaint/Support etc.,)

      Part 2: Solution recommendation to agents solving these tickets with learning from the history of solutions provided to these tickets.

      For our project, we are totally classifying our tickets into queues based on the text written in the tickets (the reason behind using Bag of Words / Multinomial Naive Bayes + DNN using Tensorflow).

      We achieved an efficiency of 80% using Scikit-learn based Multinomial Naive Bayes algorithm.

      We are currently working on Multinomial Naive Bayes + Deep Neural Net using Tensorflow to do classification and solution recommendation.

      Answering to your queries –

      1. How can we train the models?: We are training our Tensorflow model using tickets stored in SAP HANA database using Python scripts. Once the model is trained, we send the test tickets and the appropriate queue would be suggested by the model. This total workflow could be articulated in the python script.
      2. Do we need to implement the code of the Services(classification and recommendation) in the SAPUI5 app?: No. SAPUI5 app is only for the UI and functionality. We are converting the Scikit-learn based classification script we’ve written into a web service using Flask and from SAPUI5, we could easily call this web service using JQuery. So, when you write the classification or recommendation code in python (Tensorflow/Scikit-learn/any other) we could expose it as a web service. Please keep SAPUI5 and all the python parts apart in your project.
      3. if not how do we have to build this solution? My project structure is as follows, SAPUI5 for UI, Python files containing the Tensorflow/Scikit-learn based classification and recommendation, Flask. Flask is used to run the model as a web service. SAPUI5 calls to the Flask web service with the test ticket data and the classification is done by the Tensorflow Model / Scikit-learn python script and results will be returned. We are showing the results onto SAPUI5 again.
      4. Do you know a step by step approach (it doesn’t have to be sapui5 and jira included) something similar? Instead of SAPUI5 we could also use Angular JS/ React JS to build the UI. In our case, instead of JIRA, we are using SAP HANA to store our tickets.

      The documentation for SAP Sevice Ticket Intelligence is limited at this moment. But, this is what I could find

      SAP Service Ticket Intelligence (https://leonardo.tools.sap.corp/sap-service-ticket-intelligence)

      Demo Store for this application (https://sapdemostore.com/sap/bc/ui5_ui5/sap/yunifiedstore/index.html#/scenario/13337)

      JAM Page link (https://jam4.sapjam.com/wiki/show/nMZIcHTn9oxcWJ52AP3MYN?_lightbox=true)

      SAP Help Portal (https://help.sap.com/viewer/product/SAP_SERVICE_TICKET_INTELLIGENCE/)

      SAP Help Portal (https://help.sap.com/viewer/934ccff77ddb4fa2bf268a0085984db0/1712/en-US)

      SAP Help Portal (https://help.sap.com/viewer/855ed357003642aca6bca8f6e1fafad9/1712/en-US)

      SAP Service Ticket Intelligence as SAP Business Services – API (https://api.sap.com/shell/discover/contentpackage/SAPLeonardoMLBusinessServices/api/sap_service_ticketing_classification_api?section=OVERVIEW)

      Sorry for writing a long comment. Please contact me if you need more insights.

      Thank you.

      Sai Giridhar Varanasi (C5232886)

      +91 7382016785

       

      (0) 
  2. Remi ASTIER

    Hello Sai,

    You can do it all inside HANA, no need for python or tensorflow. It’s not as sexy because you don’t waive the flag of Machine Learning but it’s easier, faster and more accurate.

    Check out the text mining categorization feature of SAP HANA. The comparison between word vectors is more flexible because the comparison can be based on stems, grammatical part of speech or entity types.

    Remi.

     

     

    (0) 

Leave a Reply