Showing results for 
Search instead for 
Did you mean: 

Question to Recommendation Result Scope


Hello community,

I'm acutally wondering about the Result Scope of a recommendation (hash).

By requesting any Recommendation results via <MarketingCloudURL>/sap/opu/odata/sap/PROD_RECO_RUNTIME_SRV/ I get a scenario hash for optimized recommendations. This hash information also contains the expiry date and a result scope.


                    <content type="application/xml">

In all my tests the result scope was G for Generic Reco.

In the standard SAP Commerce intergration these generic recommendations are used for every customer and are displayed fo every customer.

But in our use case we using a recommendation based on "Recently Purchased Items". So it's necessary that the recommendation results are only displayed for the correct user. Therfore the result scope must be R for Restricted.

Is there any way to define the result scope of a recommendation scenario in the SAP Marketing Cloud?

I would be grateful for any help.

Best Regards


0 Kudos

Torsten, there is no way to define the result scope of a recommendation scenario in the SAP Marketing Cloud. It should be automatic. Can you clarify, upon what documentation do you base your assumption, "Therefore the result scope must be R for Restricted"?

0 Kudos

Hi theodore.schachter2

i did not follow any documentation, because I did not found any about the result scope.

I followed the source code of SAP Commerce. The logic there is, if it is a restricted (R) recommendation, the recommendation result will only be displayed for the given customer / contact. If it is a gerneric (G) recommendation, the recommendation result will be displayed to everyone.

Maybe I misunderstood the meaning of generic / restricted recommendations:

  • Generic / G: recommendation is independend of used customer / contact. Results will be same for everyone
  • Restricted / R: recommendation depends on customers / contacts activity. Result will be different for each

In our use case, we have a recommendation scenario based on recently purchased items:

The result is used to generate recommendations by often bought together items of these recently purchased items.

So in my understanding, recently viewed items only works with a given customer / contact and therfore it must be restricted, Else (like I can reproduce it on our storefront) the recommendation will be displayed also after log out of the customer, and will be displayed for all other anonymous user. And then it get's overwritten after the next customer logs in and visits the same site with the given recommendation.

So if the SAP Commerce logic should work properly, the result scope from SAP Marketing Cloud needs to be R.

Can you tell me what logic the Marketing Cloud uses to decide when a recommendation is marked as R or G?

Does it depend on the recommendation algorithm used?

Example Payload for the recommendation from our SAP Commerce:

  "UserId": "ce045828-4b3a-442e-a24c-0cb87f42dbe6",
  "ExternalTracking": true,
  "ScenarioHashes": [],
  "Scenarios": [
      "ScenarioId": "MY_OWN_RECO",
      "BasketObjects": [],
      "LeadingObjects": []
  "ResultObjects": []

BR Torsten

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos


Unfortunately, no further information on this topic can be found. And since it is not clear when a recommendation from the SAP Marketing Cloud is marked as Generic or Restricted, we decided to adapt the source code in SAP Commerce.

When parsing the response from the SAP Marketing Cloud, we check the Recommendation Scenario ID, and as soon as it is an ID that the shop should act as Restricted, we write an 'R' in the Result Scope.

Answers (0)