Genesys Cloud (formerly PureCloud)

Discussion Thread View
Expand all | Collapse all

Insert Row into Data Table

Jump to Best Answer
  • 1.  Insert Row into Data Table

    Top 25 Contributor
    Posted 02-24-2021 03:22
    hi there, i am looking to insert New Rows into a Blank Data Table via an API.
    Table has no rows but need to create a row via Agent script by clicking an Submit button which will write data into a Data Table.
    i have tried "/api/v2/flows/datatables/${input.dataTableId}/rows/${input.rowId}" but this requires a unique rowid which i do not have as it would be a new row entered.
    could some advise if this is possible and if so, which API do use?
    #Integrations

    ------------------------------
    Reginald Sheraton
    ------------------------------


  • 2.  RE: Insert Row into Data Table

    Top 25 Contributor
    Posted 02-24-2021 03:26
    HI Reginald

    I seem to recall that's looking for the key rather than an actual row ID, so the id in this case would be the unique key for that particular row you're looking to add.

    ------------------------------
    Vaun McCarthy
    NTT New Zealand Limited
    ------------------------------



  • 3.  RE: Insert Row into Data Table

    Top 25 Contributor
    Posted 02-24-2021 03:49
    Hi there thanks for response, but my problem is that i do not have any rows in my Table and would like to insert and row when agent clicks submit button on Script which will create a row with a rowid being the Conversation ID of the call, hope this makes sense?

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 4.  RE: Insert Row into Data Table
    Best Answer

    Top 25 Contributor
    Posted 02-24-2021 04:10
    Sorry now I'm with you.  Go with this and put your fields and key into the body:



    ------------------------------
    Vaun McCarthy
    NTT New Zealand Limited
    ------------------------------



  • 5.  RE: Insert Row into Data Table

    Top 25 Contributor
    Posted 02-24-2021 04:14
    thanks will give it a try

    ------------------------------
    Reginald Sheraton
    ------------------------------



  • 6.  RE: Insert Row into Data Table

    Top 25 Contributor
    Posted 02-24-2021 10:58
    Not to jump in here and you may have already considered this but data tables (out-of-the-box) do have limitations:
    https://help.mypurecloud.com/articles/work-with-data-tables/

    Notes:
    • The number of data tables allowed in a single organization is 50.
    • The number of data rows allowed in a single table is 5000.
    • The number of fields allowed in a single table is 50.
    • The number of characters allowed in a single reference key is 256.
    • To request a higher limit of data rows, contact Genesys Cloud Customer Care.


    ------------------------------
    Dan Fontaine
    ConvergeOne, Inc.
    ------------------------------



  • 7.  RE: Insert Row into Data Table

    Top 25 Contributor
    Posted 02-25-2021 02:47
    Thanks for the info

    ------------------------------
    Reginald Sheraton
    ------------------------------