C4C Utilities Custom OData To Fetch Premise Info and Related Tickets
Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the topic.
The Objective this blog is to explain how C4C Utilities Premise Object can be exposed through Custom OData. Blog will also explain how someone can expose Premise Address Info and Premise related Tickets.
Below is the detailed scope of this Blog: –
- Create a Custom OData.
- Create an entity called PremiseInfo with Premise related data.
- Create another entity called TicketInfo with Ticket basic info.
Implementation Details: –
- Navigate to Administrator->OData Service Explorer
- Create a new Custom OData Service.
- Select the Premise BO to create base entity.
- Select the correct Premise Info.
- Create & Select Ticket entity.
- Activate Custom OData.
Exact steps and details of creating Custom OData through C4C is explained Admin Guide focus will be more about how to expose Premise Data.
1. Navigate to OData Service Explorer
Navigate to Administrator->OData Service Explorer
Select the option to create a Custom OData Services
2. Create a new Custom OData Service
3. Select the Premise BO to create base entity
4. Select the correct Premise Info
4.1 Premise Address Info -:-
Premise Address info is split between associated Installation Point association and it’s hierarchical Upper installation Point ( Installation Point Created for Connection Object during replication). Below table explains the split of information.
5. Create & Select Ticket entity
Use the association from premise to Service Request called Ticket, to create an entity called TicketInfo.
Select the required information from Service Request (Ticket) needed as part of Custom OData. In this example i have selected ID and Name.
6. Activate Custom OData
When you Save the custom OData it will be “Inactive” state. We have to Activate it for it to be used.
Once Activated there will be dedicated URL created for the new OData service.
Premise end point to fetch record with Premise External ID = ‘12345’
To fetch the Ticket for the above related to the above Premise
https://<Tenant_URL>/sap/c4c/odata/cust/v1/premisedata/PremiseInfoCollection(‘<Unique ID’) /TicketInfo