carlchen | 2020-02-18 11:35:45 UTC | #1
Hello,
I’m trying to use the historical adherence endpoint to pull historical adherence data for all agents in my org. I’m hitting a bit of a snag, in that I can’t seem to get the Notifications piece of this puzzle working.
I am debugging this using the Purecloud Notification Tester, and Postman for REST request debugging. Right now, I am trying:
- Subscribe to historical adherence query notifications for a single user. My topic looks like:
v2.users.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.workforcemanagement.historicaladherencequery where the x’d out string is an agent User ID.
- POST to the historical adherence query endpoint for the Management Unit which contains the above user:
POST https://api.mypurecloud.com/api/v2/workforcemanagement/managementunits/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/historicaladherencequery body: { "startDate": "2020-02-10T00:00:00.000Z", "endDate": "2020-02-11T00:00:00.000Z", "userIds": "4ac416bd-**-**-**-****"], "timeZone": "America/Los_Angeles", "includeExceptions": true } When I check the Notification Tester log, I only see Heartbeat events. like below: ![image|690x410 From the documentation, it sounds like I should eventually see a notification with a download url. Is anyone able to tell me if I’m doing something obviously wrong here? I’m happy to provide more information here if needed.
in addition I can run similar query quickly through the PureCloud UI,my user id like: c8e37328-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Thanks in advance
tim.smith | 2020-02-18 15:55:49 UTC | #2
I'm guessing you're using the wrong ID in the topic. See this post: https://developer.mypurecloud.com/forum/t/problems-getting-historical-adherence/6622/8?u=tim.smith
canderson, post:8, topic:6622
It turns out that instead of subscribing to notification topics that contain the user IDs of the users for which I am requesting data, I need to subscribe to a topic that contains my own user ID, or in my case the client ID of the client credentials I am using for make the call (since it's from a console application).
carlchen | 2020-02-19 00:11:39 UTC | #3
o.... got it,thanks
carlchen | 2020-02-22 07:53:30 UTC | #4
hi , tim
I have other questiton, can get data in purecloud site but notification return download url don't have any data
api query parameter same as purecloud site
tim.smith | 2020-02-24 22:37:21 UTC | #5
If you are having issues with the specific data being returned, please open a case with Genesys Cloud Care to investigate further.
system | 2020-03-26 22:37:24 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 7147