Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

Handling pagination of data action outputs in Architect flow

  Thread closed by the administrator, not accepting new replies.
  • 1.  Handling pagination of data action outputs in Architect flow

    Posted 09-11-2023 12:05
    No replies, thread closed.

    I'm working on building an implementation of the WFM/HRIS integration, specifically against Workday.  The sample provided in the blueprint uses Bamboo, and seems to assume that "HRIS Get Agents" can be done in a single API call.  WFM/HRIS blueprint

    This isn't practical or scalable for large companies, so real-world implementations have to deal with pagination.  Since the data action itself can't do this, that means it needs to happen in the Architect workflow.

    At a high level, I understand that I need to re-call the data action as many times as I need, in order to get a full set of results.  What I'm stuck on, is how I can append the full set of results to the String Collections in an efficient way.

    The AddItem function only supports one item at a time, and the Loop architect step only works for a max of 99 times, so I can't combine those if my page size is 100.

    The WFM/HRIS integration expects flow output variables as String Collections for `externalIds` and `emails`.  How can I efficiently append String Collections?  If I have to, I can reduce the page size in the Data Action/API call so I can loop through each response's externalIds and emails variables, but this is incredibly inefficient when I know my overall user count to iterate is over 4300 so that'd be ~43 API calls minimum (plus authentication) with the max page size of 100 and then I'd have to use a loop to use AddItem for both collections 100x for each follow-up API call.


    #ArchitectureandDesign
    #Integrations

    ------------------------------
    Paul McGurn
    Manager, Telecom & DevOps
    GoTo
    ------------------------------


  • 2.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-11-2023 12:16
    No replies, thread closed.

    I ran into the same things as I used the blueprint to use Data Tables in GCx.  Our Get Users is limited to 500, so I had to iterate through 2 pages for the call and put them into a single call.  Also, the blueprint assumes an API with multiple searching or multi-field strings, so the get time off type stuff was a bear and I had to use multiple data tables.  Trying to simplify by hard-coding only certain codes to be used just for this demo.  I believe the blueprint will only give us a start and will only work for smaller organizations.  Now that I have it working with a data table, it will translate easier to other platforms.  



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-11-2023 12:40
    No replies, thread closed.

    Thanks Robert, I hadn't thought of using Data Tables as a caching mechanism.  Do you drop the contents at the start of your workflow, and then write it fresh on each iteration of the workflow?  I assume it doesn't matter if this is null as long as you have a safety net to not output empty results at the end of the workflow.

    I agree that this blueprint is not really built for larger HRIS orgs, which is kind of funny since that's really the target audience for an integration of this calibre.  



    ------------------------------
    Paul McGurn
    Manager, Telecom & DevOps
    GoTo
    ------------------------------



  • 4.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-11-2023 13:02
    No replies, thread closed.

    I just ran that data action through a loop twice.  I guess I could check for the number of pages and just run through loop if there is more than one or exit at end of pages.  The data actions do need some work as well.    



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 5.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-11-2023 13:07
    No replies, thread closed.

    Right but the HRIS workflow needs one big list for outoput, no?  How are you merging the results of the two API calls into one set of output collections?

     

    Paul McGurn

    Music lover. Amateur woodworker. Pandemic gardener. 

    Manager, Telecom & DevOps 
    New Hampshire 

    GoTo.com | O: +1.781.897.1320

     






  • 6.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 01:39
    No replies, thread closed.

    Yes, on the Get Agents, I just merge the two data actions into the same collection.  For me, that is less than the 2000, which I believe is the max. 



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 7.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 09:26
    No replies, thread closed.

    I guess I'm going to hit that as a bottleneck, too, since my full HRIS list is over 4K.  I'll have to build a custom collection after looping through the API calls, since Workday's REST API is rather pathetic at filtering on its own.  I guess the alternative would be to build a Workflow that instead takes all the Genesys users and gets their Workday ID, then sets that on their WFM configuration.  That's likely to be more efficient than paging through 4k+ Workday records just to cover <1K agents.

     






  • 8.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 10:17
    No replies, thread closed.

    Agreed.  I looked at ADP and UKG APIs as well and am going to see trouble when integrating with them. I can see why Genesys started with Bamboo - it seems to offer the best options for getting users and writing back requests.  As for the 4K of users, I guess you could have the Get Users just loop for 4-6 different calls if you can paginate in the API.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 9.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 10:34
    No replies, thread closed.

    Workday's API response limit is 100 users at a time, so more like 43 API calls in our org if we were to go exactly by the Bamboo example.

     

    What I'm thinking to do instead is get all the WFM agents in GCCX via the Genesys Data Actions, and then iterate through them to get their Workday ID's that way.  I'd have to sync their employee ID's via SCIM to query based on that since Workday's query API only supports searching by case-sensitivie name or what we use for Employee ID.  Even then I have to sanity check the results because it's a search, not a query, so overlapping numeric ID's will give me multiple results in a response.  Short of that, I may just write a script outside Genesys and schedule it as middleware instead, since all I really need to do is get their Workday ID's if not set in Genesys WFM.  Those ID's never change, so this process will likely be easier when not constrained by the heavy limitations of trying to jam a restrictive user query API into Architect flows that are also restrictive on looping max counts (99).

     

    Is there any actual documentation on how the WFM HRIS integration works, or are we expected to reverse engineer the sample Bamboo architect flows and cross our fingers?  I'm struggling on getting the agent balances formatting to work in a way that the UI doesn't just throw a generic error when trying to display balances during a time off request submission.  I know under the covers this is calling /api/v2/workforcemanagement/timeoffbalance/jobs , which in turn is calling the configured Architect Workflow for Get Agent Balances. 

     

    But that API has non-existent error handling, so if the underlying Architect Workflow does have a runtime error, it doesn't pass back any info from the flow exit code/variable I have set.

     

    The lack of ability to do any meaningful debugging of Workflows in Architect is a pretty big hurdle for this type of complex integration.

     






  • 10.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 10:48
    No replies, thread closed.

    Yes, you are in a pickle.  I suggest just exporting all users with their ID's to a Data Table and use that in the workflow.  Those as you mentioned should not change and new users can be added easily.  Another thing is how that workflow actually relates to the entries for agents in WFM - that is where the disconnect is for me.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 11.  RE: Handling pagination of data action outputs in Architect flow

    Posted 09-12-2023 10:57
    No replies, thread closed.

    I'm just going to write a script that dumps all users from Genesys WFM then looks for any WFM users with missing HRIS ID's, get that from Workday iteratively, and do GCCX updates on just those.  I can then just de-configure the "Get HRIS Agents" workflow on the GCCX HRIS Integration entirely.

     

    I can schedule that script to run once a day and park it in Azure Automation alongside all our other "scripts that do stuff GCCX doesn't do out of the box" stuff like my "create WebRTC phones for all GCCX users because Genesys doesn't do that" script.  ��

     






  • 12.  RE: Handling pagination of data action outputs in Architect flow

    Posted 05-27-2025 20:46
    No replies, thread closed.

    I am now in the same pickle.  I have workday/HRIS integration working functionally, however getting the workday agent ID's (from workday) is becoming a real problem.  Was wondering if i could do real time (when agent checks balance, i would see if they have hris id or not, if empty query workday from Arch flow to get id based on name).  In reality, i am not sure how the get agents is supposed to work with workday.  If anyone has step by step guide that would be great. 



    ------------------------------
    Clayton Curtis
    Tech manager
    ------------------------------



  • 13.  RE: Handling pagination of data action outputs in Architect flow

    Posted 05-28-2025 08:51
    No replies, thread closed.

    Hello Clayton, 

    I dont believe we have anything like this and Robert's solution from 2023 is going to be the best way to approach this.  "I suggest just exporting all users with their ID's to a Data Table and use that in the workflow.  Those as you mentioned should not change and new users can be added easily.". 

    I would be interested in seeing what the community has to offer, I would recommend making a new thread as this thread is older and may not get the views you are looking for. I will be closing this thread and waiting for your new one to keep an eye on it for a solution.



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------