on ‎2021 Jan 29 4:13 PM
Hi SAP associate,
I hope that you are safe and healthy. I am unable to get created By UserID/UUID from the service request collection. Is there any other table that has this information? Or any suggestions on how this can be achieved?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello,
ServiceRequestCollection donot return the UUID of the employee who made the change. However it still contains the name of the employee/service agent who made that change.(see field LastChangedBy)
So now, you can use the value from "LastChangedBy" of ServiceRequestCollection OData response and pass it as a filter to the EmployeeCollection entityset in the field BusinessPartnerFormattedName and get IdentityUUID from there.
Example: OData to request Last Changed by Field: https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection('00163EAF873D1EEB88C7925745077E7C')?$select=ID,LastChangedBy
Sample Response: service-request.png
Now copy the value of LastChangedBy from response of last odata call and pass it as filter:
https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/EmployeeCollection?$filter=BusinessPa... eq 'Saurabh Kabra BU'&$select=IdentityUUID
Sample Reponse: employeeidentityuuid.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Saurabh, but this will give me the UUID of the user who last made the change. This can be different from the user who actually created the ticket which is in the 'Created By' field. If I use name from this field to get UUID in Employee Collection, it will create issues for associates with duplicate names
Hello,
It was just an example of how to deal with such a case when you have just the "Employee Name" in the service request collection.
Nevertheless, in your case you need to replace "LastChangedBy" with "CreatedBy" to retrieve the employee who created the ticket. A sample URL would be as follow:
https://my3XXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ServiceRequestCollection('00163EAF873D1EEB88C7925745077E7C')?$select=ID,CreatedBy
Rest everything for getting the employee UUID still remains the same.
I get that Saurabh and appreciate your advise 🙂 The problem here is that name is not a unique identifier and thus we cannot rely on it to get accurate results, especially in case where we have users with duplicate names. Is there any other way to do the join from service request to employee table?
As LastChangedBy or CreatedBy is not really any "business" party but rather "changelog/audit relevant" party hence SAP do not offers any standard association for them to drill down to the level of details for ticket BO.(why? That I do not know)
But with just the standard Odata offering,based on my analysis, it is not possible to read the UUID. If needed then you can inlcude a new KUT/PDI field and copy the content from ServiceRequest.SystemAdministrativeData.CreationIdentityUUID to your customer field. Now you can expose this field to OData (standard or custom) and consuje it outside of SAP C4C.
| User | Count |
|---|---|
| 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.