Symptom
You created a service ticket and attached email interactions but when retrieving it through the OData Service (ServiceRequestCollection) only the first email interaction is visible.
Environment
SAP Cloud for Customer
Reproducing the Issue
- Creating a service ticket and attaching at least two email interactions
- Using OData Service for ServiceRequestCollection to retrieve the email interactions attached with the service ticket
Cause
This is the expected behavior of the application.
The manner in which we treat relevant e-mails to a ticket is by maintaining only the first e-mail as a BTD reference to the ticket, with the following e-mails keeping track of the first e-mail referenced in the ticket.
Resolution
The endpoint "ServiceRequestInteractions" can be consumed in the V1 version of OData to get all interactions associated with a ticket.
To use, please have the end point with filter parameter as shown in the below example:
https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codata/ServiceRequestInteractionCollection?$filter=ServiceRequestObjectID eq '<servicerequest_uuid>'.
This will give you uuids of all interactions associated to the ticket with their types ( Fields d:InteractionUUID and d:InteractionType respectively)
If you do not have the service request uuid available but only the ID, then you will have to use ServiceRequestCollection endpoint to retrieve the same and pass it onto the above call.
Currently, the endpoint 'ServiceRequestInteractionCollection' is part of V1 version of the OData. We are in the process of providing an equivalent for the V1 version of interactions odata in a future release.
The recommended way in this scenario for the V2 version of the OData is to build a custom OData service using the ServiceRequest business object and the association ServiceRequestInteraction. This should give all the email and internal memo interactions associated to the ticket. Both the BO and associations are PSM released and can be used to build the custom OData service.
Keywords
Email Interactions, list of interaction, only first email, service ticket, , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem