on ‎2020 Nov 24 9:29 PM
Hi SAP community,
I am trying to get the ticket survey answers from the C4C ODATA. However, I am unable to find the correct object with the details I am looking for. SurveyQuestionAnswersCollection only contains UUID and is not displaying all questions. Also, in order to connect a ticket to a survey, will I need to connect Object id with parent object id in the survey tables?Could you please provide some direction on this?
Thanks very much in advance
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello,
You can use the following way to get the Survey Answers for ticket using OData c4codataapi.
1. Get the Ticket UUID using ServiceRequestCollection?$filter=ID eq '132163' .
2. Use the UUID from Step 1 to get the survey submitted using following:
SurveyResponseCollection?$filter=BusinessTransactionDocumentUUID eq <TicketUUID>
3. Now access the navigation property SurveyResponseItem from the response of step 2. and further navigate to SurveyQuestionAnswers. Here you will find all the responses to each question. Get the QuestuinUUID from here.
5. Now launch QuestionsCollection('<question UUID from Step 4>'). It will give you the entire information of question text.
BR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I am not sure what you are missing, therefore I am writing here the full URLs to be used:
Navigation property ServiceRequestCollection will only work in case of a survey is already added to the ticket. If the survey is not yet added to the ticket then SurveyResponseCollection will be empty.
Hi Saurabh, I really appreciate your detailed response. I am executing the exact query that you posted for a ticket that has survey added to it. I found this ticket using report with Ticket Survey Answers as the datasource. When I do step 1 and 2 and filter for Object ID of my ticket in surveyresponsecollection, I receive no response.
Steps: 1. Found a ticket that has survey attached to it (cant see the survey in Ticket UI under surveys but can be seen in reports)
2. I use the queries as below
Hmmm. I can't see it beyond this without system access. Therefore I would suggest you to open a ticket to SAP Support and let them check this issue.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.