Genesys Cloud - Main

 View Only

Sign Up

  • 1.  Missing Filter - Columns - Phone Management

    Posted 20 hours ago

    Hi, 

    This is my first post in the community. I hope I'm following the rules correctly :).


    I'm missing a filter option for columns in Phone Management. We have more than five thousand phones in our enviroment, and sometimes there are phones without a Default Person associated or without a WebRTC Person assigned. usually, this means the user has been deactivated.

    I've already automated the phone deletion process, but we still have a legacy list of phones that need to be removed manually. 


    A feature that allows filtering by column would be great.

    PS.: We already retrieve this information through the API, but it's still a bit cumbersome to identify and manage the phones this way.


    #Telephony

    ------------------------------
    Bruno Mascitti
    Telecom Engineer
    ------------------------------


  • 2.  RE: Missing Filter - Columns - Phone Management

    Posted 19 hours ago

    Hello, @Bruno Mascitti

    Unfortunately, you can only add the column, but there is no filter for this. For sure, it would be great...

    I recomment to open an idea about this, if implemented can help us a lot! 

    Portal idea:

    Genesys Cloud Ideas Portal





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



  • 3.  RE: Missing Filter - Columns - Phone Management

    Posted 16 hours ago

    Sure! I'll try!

    Thanks for the reply.



    ------------------------------
    Bruno Mascitti
    Telecom Engineer
    ------------------------------



  • 4.  RE: Missing Filter - Columns - Phone Management
    Best Answer

    Posted 15 hours ago
    Edited by Bruno Mascitti 5 hours ago

    Hi Bruno, welcome to the community! Arthur is right that native column filtering does not exist today, so the ideas portal submission is definitely worth doing.

    In the meantime, the API gives you everything you need, and you can take this further than just identifying the orphaned phones. I actually had to build something similar before; I figured I would share it here.

    Using GET /api/v2/telephony/providers/edges/phones with the fields parameter set to webRtcUser and lines.defaultForUser you can pull your full phone inventory. Phones with a user assigned return a WebRTCUser object with the user name and ID. Phones with no user assigned have neither field in the response at all, making orphaned phones easy to identify programmatically. This would be before you implemented the deletion process, finding the older orphaned phones.

    From there, you build two data actions and an Architect Workflow to handle the cleanup automatically.

    WebRTC - Find Orphaned Phones

    Go to Menu > Admin > Integrations > Actions > Add Action and select Genesys Cloud Data Actions. Name it WebRTC - Find Orphaned Phones.

    Request Type: GET

    Request URL Template: /api/v2/telephony/providers/edges/phones?fields=webRtcUser,lines.defaultForUser&sortBy=id&pageSize=500

    Request Body Template:
    {}
     
    Input Contract:
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Input",
      "description": "No input required",
      "type": "object",
      "properties": {},
      "additionalProperties": true
    }
     
    Output Contract:
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Output",
      "type": "object",
      "properties": {
        "pageCount": { "type": "integer" },
        "total": { "type": "integer" },
        "phoneIds": {
          "type": "array",
          "items": { "type": "string" }
        },
        "phoneNames": {
          "type": "array",
          "items": { "type": "string" }
        },
        "webRtcUserIds": {
          "type": "array",
          "items": { "type": "string" }
        }
      },
      "additionalProperties": true
    }
     
    Response Translation:
    {
      "translationMap": {
        "pageCount": "$.pageCount",
        "total": "$.total",
        "phoneIds": "$.entities[*].id",
        "phoneNames": "$.entities[*].name",
        "webRtcUserIds": "$.entities[*].webRtcUser.id"
      },
      "translationMapDefaults": {
        "pageCount": "0",
        "total": "0",
        "phoneIds": "[]",
        "phoneNames": "[]",
        "webRtcUserIds": "[]"
      },
      "successTemplate": "{\"pageCount\": ${pageCount}, \"total\": ${total}, \"phoneIds\": $output.phoneIds, \"phoneNames\": $output.phoneNames, \"webRtcUserIds\": $output.webRtcUserIds}"
    }

    Results should look like this:

    You probably already have this one, but I am adding it just in case!

    WebRTC - Delete Phone

    Add another action and name it WebRTC - Delete Phone.
     
    Request Type: DELETE
     
    Request URL Template:
    /api/v2/telephony/providers/edges/phones/${input.phoneId}
     
    Request Body Template:
    {}
     
    Input Contract:
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Input",
      "description": "Phone ID to delete",
      "type": "object",
      "required": ["phoneId"],
      "properties": {
        "phoneId": {
          "type": "string",
          "description": "The ID of the phone to delete"
        }
      },
      "additionalProperties": true
    }
     
    Output Contract:
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Output",
      "type": "object",
      "properties": {
        "success": { "type": "boolean" }
      },
      "additionalProperties": true
    }
     
    Response Translation (Default):
    {
      "translationMap": {},
      "translationMapDefaults": {},
      "successTemplate": "{\"success\": true}"
    }

    Then build a Workflow:

    You may already have this as part of your automatic deletion, so you can add it there or make a one-time workflow for it!

    Go to Menu > Orchestration > Architect > Flows > Workflow and create a new workflow named Delete Orphaned Phones.

    Call Data Action 1 to get the full phone list. Loop through the phoneIds array using a For Each action. For each phone, check if the corresponding position in the webRtcUserIds array is empty or null. If empty, call Data Action 2, passing that phoneId to delete it. If populated, skip it and move to the next.

    Schedule this workflow via a Scheduled Trigger to run once during off-hours until your legacy list is clean. That gives you the same automated cleanup you already have for new phones, but covering everything that existed before your automation was in place.

    Worth submitting that ideas portal idea too for native column filtering, since that would make day-to-day management much cleaner without needing the API at all.

    I hope this helps! 

    Edit: sorry, the HTML is not liking this code, so I had to edit it a bunch of times for this to stick😅



  • 5.  RE: Missing Filter - Columns - Phone Management

    Posted 5 hours ago

    Hello, Chris!

    Thank you. I really like the workaround you showed here. I'll take a closer look.



    ------------------------------
    Bruno Mascitti
    Telecom Engineer
    ------------------------------