SAP Knowledge Base Article - Public

2923720 - How to get the Data of OWL Filter Queries in the System Using OData

Symptom

You have created filter Queries in your system like My Accounts, My Team's Account. But, you don't know how to get the data for these filter Queries using Odata.

Environment

SAP Cloud for Customer

Resolution

1. Get the technical name of your filter Query.

  • Execute the below URL to get the technical name of the Filter Query :

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/owlquery/GetOWLQueriesByEntityType?ServiceName=%27c4codata%27&EntityTypeName=%27Account%27

XXXXXXXX  - Tenant ID
Account -  Entity Type name

  • Suppose, if you want to get the filter queries for Opportunity, you need to pass the EntityType as Opportunity instead of Account
  • In the Result, you will get the Description and the Name for each Filter Queries

Name  - Technical Name of the Filter Query ( ex : MyDirectAccounts )
Description -  Saved Filter Query in your system ( ex : My Account Team's Accounts )

2. Once you get the Technical name of the OWL Query, you have to pass the parameter in the Header in POSTMAN Tool.

Key    as c4c-odata-def-set-name
Value as Technical name of the OWL Query, Which you have got from the first step ( ex : MyDirectAccounts , if you want to get the data for My Account Team's Accounts filter )

  • Once you execute the above query, you will get the data for My Account Team's Accounts filter, exactly like the one in the UI

Keywords

Odata, Filter Query, OWL Query. , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer add-ins all versions