Symptom
This KBA explains how to retrieve Visit Score and Surveys in Perfect Store Visits using C4C OData API.
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 separately 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
Keywords
Perfect Store Visit, Visit Score, Survey, OData collection. , KBA , LOD-CRM-INT-API , OData API (C4C Only) , LOD-LE-PSP , Perfect Store , How To
SAP Knowledge Base Article - Public