SAP Knowledge Base Article - Public

2984125 - How To Get the Visit Score And Surveys From Perfect Store Visits Using OData

Symptom

You want to retrieve Visit Score and Surveys in Perfect Store Visits using OData.

Environment

SAP Cloud for Customer

Resolution

The field "This Visit Score" is available in the OData collection StoreValuationCollection, as field TotalScoreValue (Total score value).

For visits of type Perfect Store, ValuationCollection survey instances have to be reached differently because Survey is not directly linked to visits in this scenario. The association by which Survey is linked to Perfect Store Visits is:

Visit > StoreValuation > SellingPointValuation > Surveys.

Below, there are OData calls needed to reach out to Surveys:

1. Call StoreValuationCollection using Visit ID as ReferenceVisitID:

https://<myTenantURL>/sap/c4c/odata/v1/c4codataapi/StoreValuationCollection?$filter=ReferenceVisitID eq '<Visit ID>'

2. Call SellingPointValuation using StoreValuationCollection Object ID:

https://<myTenantURL>/sap/c4c/odata/v1/c4codataapi/StoreValuationCollection('<StoreValuationCollection ObjectID>')/SellingPointValuation

3. Call Surveys using SellingPointValuationCollection (This has ValuationCollectionUUID -> Runtime instance of Survey):

https://<myTenantURL>/sap/c4c/odata/v1/c4codataapi/SellingPointValuationCollection('<ValuationCollectionUUID>')/Surveys

See Also

2330688 - How to Use Methods And Filters in OData Services

Keywords

Perfect Store Visit, Visit Score, Survey, OData collection. , KBA , perfect store visit , visit score , odata collection , survey , LOD-CRM-INT-API , OData API (C4C Only) , LOD-LE-PSP , Perfect Store , How To

Product

SAP Cloud for Customer core applications all versions