Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Agent Status Timeline Detail - Not summary

    Posted 3 hours ago

    Hi,

    I am trying to pull agent status timeline data including custom secondary statuses via the API. I have read the earlier post about using organizationPresenceId from /api/v2/analytics/users/details/query and have successfully retrieved primary presence data.

    My issue is with custom secondary statuses configured under Busy - specifically statuses like "Extended After Call Work" and "Follow-up" that are set up under Status Management in Organization Settings. These do not appear in /api/v2/presencedefinitions even though they are active and in use.

    When an agent is in eACW the primaryPresence array shows systemPresence: BUSY but there is no secondary status breakdown in the response. The organizationPresenceId for these events resolves to the standard Busy definition, not the specific secondary status.

    Questions:

    1. Is there an API endpoint that returns the GUIDs for custom secondary statuses configured under Busy?
    2. Does /api/v2/analytics/users/details/query return the secondary status GUID anywhere in its response, or is secondary status simply not available historically through this endpoint?
    3. If not available via the analytics API, is there another endpoint that provides individual agent status events including secondary status with timestamps for historical data (not real-time)?

    We are building an internal tool and currently have to export the Agent Status Timeline Details CSV manually from the UI. Any guidance on getting this data via the API would be greatly appreciated.

    Thank you


    #API/Integrations

    ------------------------------
    Sarah Johnston
    Network Engineer
    ------------------------------


  • 2.  RE: Agent Status Timeline Detail - Not summary

    Posted 2 hours ago

    Hi, @Sarah Johnson

    For secondary statuses, I would first validate the permissions/divisions side.

    Custom secondary statuses created under Status Management are presence definitions, so the endpoints I would use to get their IDs are:

    • GET /api/v2/presence/definitions

    or, if you already have the definition ID:

    • GET /api/v2/presence/definitions/{definitionId}

    If some secondary statuses are not appearing there, check whether the user or OAuth client calling the API has the required Presence > Presence Definition > View permission and access to the division where those secondary statuses are assigned. Secondary statuses are division-aware, so this can affect what is returned or visible.

    For historical data, /api/v2/analytics/users/details/query should be the right place to check the timeline. The secondary status will not usually appear as a separate secondaryStatus field. Instead, it should appear in the primaryPresence array as the organizationPresenceId, while systemPresence still shows the parent primary status, such as BUSY.

    So the mapping should be:

    primaryPresence[].organizationPresenceId → GET /api/v2/presence/definitions/{definitionId}

    If the organizationPresenceId is only resolving to the standard Busy definition and not the custom Busy status, I would test with one agent changing to that exact secondary status during a known interval and query only that user/time range. If the UI timeline shows the secondary status but the API still does not return the expected organizationPresenceId, I would open a Genesys Care case with the user ID, interval, and API response example.

    For totals by status, a user aggregate query with tOrganizationPresence may help, but for a detailed timeline I would still start with the user details query.



    ------------------------------
    Arthur Pereira Reinoldes
    ------------------------------