My Source Material: Create Point Transaction Point Transaction REST Endpoint - API Documentation - Verint Community 11.x - Verint | Telligent Community
What I'm trying to do:
Create a mechanism to handle points assignments based around a document or list.
What I've got working:
I've written a few PowerShell functions that'll handle this processing in bulk which works 99% (the 1% described below). Only the functions are posted in my GitHub. The process is:
- Open CSV.
- Find Username, Description, Points to be Awarded, and (optional) the Date for the assignment.
- Search for each user in the community via Username (GET)
- Capture their User ID, their ContentID, and their ContentTypeID.
- Build a body to send to the Create Points endpoint via POST.
- Execute the POST and capture the point transaction Id and transaction time.
- Store them back into the CSV file.
This works correctly with a minor exception. The Create Point transaction doesn't seem to honor the "CreatedDate" field.
What's not working:
I'm trying to do this 'better' by doing it in SharePoint and using a list with Power Automate.
It's working correctly for pulling the user's id, ContentType, and ContentTypeID.
I build the JSON body for the POST to Create Point Transaction (and I'm also saving a copy to a file share for good measure).
{ "Description": "<p>Completion of Automated Points Awarding Process [427 Points]</p>", "UserId": "2109", "Value": "427", "ContentId": "e936538a-891a-451a-9982-037099b9dbf4", "ContentTypeId": "e9ed4118-60ed-4f2b-a026-5705b8793d05", "CreatedDate": "2021-03-08T00:00:00" }
Note: The actual JSON is linearized, the above is formatted for easier reading.
I make the call with the appropriate headers, but get the error I get returned is:
{ "": null, "Errors": [ "Description is required" ] }
I know for a fact that "Description" is defined, so there's another error, but something else is off. I recall seeing a similar message when I wrote the PowerShell scripts - which was also wrong.
What I've tried to no avail: removing the quotes from around the integer elements (UserId, Value).
I'd appreciate any assistance I can get on this!