SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Get Recommendations Based on Users' Browsing History

Use the Personalized Recommendation service to give visitors to your website recommendations based on their browsing history.

Overview

🎓 beginner 40 min. Machine LearningBeginnerArtificial IntelligenceCloudSAP Business Technology PlatformSAP Ai ServicesPersonalized RecommendationFree Tier

You will learn

  • โœ”How to call and test the Personalized Recommendation service
  • โœ”How to access and use Swagger UI (User Interface)
  • โœ”How to submit a training job and trigger model serving
  • โœ”How to get recommendations based on users’ browsing history
  • โœ”How to delete serving and resource
Juliana Morais J Juliana Morais December 11, 2023
Created by April 4, 2022
Contributors

Prerequisites

Steps

Intro

The Personalized Recommendation service uses state-of-the-art machine learning techniques to give visitors to your website highly personalized recommendations based on their browsing history and/or item description. Train and use machine learning models to deliver these recommendations across a wide range of business scenarios. With Personalized Recommendation, you can elevate user experience and engagement, enhance item discovery and conversion, retain business control, curate relevance, and meet key performance indicators.

To try out the Personalized Recommendation service, the first step is to upload data that will be used to train a machine learning model. For more information, see Personalized Recommendation SAP Help Portal documentation. For further definition of specific terms, see Concepts. See also Free Tier Option Technical Constraints.

In this tutorial, you will use a dataset that contains users’ browsing history to train a machine learning model to get next-item recommendations, similar-item recommendations, smart-search results, and user-affinity recommendations. For more information, see Inference Options.


Step 1 Authorize Swagger UI
โ€”

You will use Swagger UI, via any web browser, to call the Personalized Recommendation service APIs. Swagger UI allows developers to effortlessly interact and try out every single operation an API exposes for easy consumption. For more information, see Swagger UI.

In the service key you created for Personalized Recommendation in the previous tutorial: Use the Free Tier Service Plan to Set Up Account for Personalized Recommendation and Get Service Key, you should find (outside the uaa section of the service key) an entry called url (as highlighted in the image below).

  1. To access the Personalized Recommendation Swagger UI, add /doc to the url value, paste it into any web browser and press Enter.

    PRS
    PRS

  2. To be able to use the Swagger UI endpoints, you need to authorize yourself. In the top right corner, click Authorize.

    PRS
    PRS

  3. Get the access_token value created in the previous tutorial: Get OAuth Access Token for Personalized Recommendation via Web Browser, then add Bearer in front of it, and enter in the Value field.

    Code
    Bearer <access_token>

    PRS
    PRS

  4. Click Authorize and then click Close.

    PRS
    PRS

Step 2 Upload training data
+
Step 3 Get training job status
+
Step 4 Get deployment status for model serving
+
Step 5 Get next-item recommendations
+
Step 6 Get similar-item recommendations
+
Step 7 Get smart-search results
+
Step 8 Get user-affinity recommendations
+
Step 9 Delete serving
+
Step 10 Delete resource
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 10
1. Authorize Swagger UI 2. Upload training data 3. Get training job status 4. Get deployment status for model serving 5. Get next-item recommendations 6. Get similar-item recommendations 7. Get smart-search results 8. Get user-affinity recommendations 9. Delete serving 10. Delete resource

Learn more →