Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Post WorkItem

    Posted 07-29-2025 16:16

    Hi

    Is there something that I'm missing, but into the API Explorer when I try to create (POST) workitem, the custom attributes field is asking an additional Key... and I can't create the workitem because of that and I can't figure out what's missing.

    {
      "name": "Workitem with custom attributes",
      "typeId": "1982a05e-567a-4243-bf2b-993c7fdsa9d",
      "customFields": {
        "": {
          "Field_1": "TestValue"
        }
      }
    }


    #PlatformAPI

    ------------------------------
    Sebastien Arpin
    Sales engineer
    ------------------------------


  • 2.  RE: Post WorkItem

    Posted 07-29-2025 17:50

    Hi Sebastien, a bit of a known defect in API explorer with this one in particular.  Take a look at this older thread on it:

    https://community.genesys.com/discussion/workitem-custom-fields-not-able-to-be-added-post-workitem



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 3.  RE: Post WorkItem

    Posted 09-20-2025 14:06

    Use the promode in API explorer, like example under. Then it works

    {
      "name": "Workitem with custom attributes",
      "typeId": "1982a05e-567a-4243-bf2b-993c7fdsa9d",
      "customFields": {
        
          "Field_1": "TestValue"
        
      }
    }



    ------------------------------
    Eystein Kylland
    Systemutvikler Genesys Applikasjonsspesialist
    ------------------------------



  • 4.  RE: Post WorkItem

    Posted 09-21-2025 10:02

    I complained about this when it was first released.  I'll see if I can get someone to fix it.  



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



  • 5.  RE: Post WorkItem

    Posted 09-22-2025 01:48

    This has been a problem during the preview and even post release. A fix would be highly appreciated.



    ------------------------------
    Somik Mukherjee
    Engineer
    ------------------------------



  • 6.  RE: Post WorkItem

    Posted 09-22-2025 11:58

    Hi Sebastien, 

    A work ticket has been created for this issue



    ------------------------------
    Ewomazino Onokpise
    Software Engineer
    ------------------------------



  • 7.  RE: Post WorkItem

    Posted 09-30-2025 14:59

    Hi Sebastien, 

    I looked into this personally and here's what I have for you. 

    This is a feature, not a bug. The customFields field exhibits this "Add Object Property" behavior because of how the OpenAPI schema is defined.
    Why this happens:
    • The customFields schema has additionalProperties set to type: "object"
    • This creates a nested structure where each custom field can have its own key-value pairs
    • I'm assuming this behavior is intentional because custom fields can contain different data types
    What you're seeing:
    • The empty key "" at the top level is the field name for your custom field
    • The nested "Field_1""TestValue" is the actual data within that custom field
    • Ultimately, in your case "Field_1" would go into that top level key, and your expectation is to be able to input "TestValue" as the value instead of clicking another button for the Add Object Property
    Workaround:
    Similar to some other comments, for this specific case, I'd recommend using Pro mode and creating your JSON data directly in the text area. This way you can specify the field structure appropriately.
    Next steps:
    You could bring this up in the ideas portal, Many support cases will encourage the appropriate team to look into this and possibly provide their own reasoning for why they defined the swagger this way. Hope this helps


    ------------------------------
    Ewomazino Onokpise
    Software Engineer
    ------------------------------