Legacy Dev Forum Posts

 View Only

Sign Up

create lightning web component button For cutting call

  • 1.  create lightning web component button For cutting call

    Posted 06-05-2025 19:25

    CarlosDiaz | 2023-12-04 16:34:13 UTC | #1

    Hello, good afternoon, I am writing to you since I am looking for the best way to carry out a development with LWC in salesforce, which allows me to cut the call in which the executive is, and send a code to genesys. Please could you guide me how I could do it, since in Salesforce I understand what to do, but I don't know how Genesys Cloud works in that regard. I would greatly appreciate your help.


    tim.smith | 2023-12-04 16:42:45 UTC | #2

    What sort of code are you wanting to send to Genesys Cloud and what are you expecting to happen as a result of that happening?


    CarlosDiaz | 2023-12-04 17:30:43 UTC | #3

    The idea is that when the button that we will create with lightning web component is pressed, the call in which the executive is located, the call must be cut off or disconnected and then become available again, in addition to sending a value of a picklist field that we want to send to genesys


    tim.smith | 2023-12-04 17:32:24 UTC | #4

    CarlosDiaz, post:3, topic:23492
    the call must be cut off or disconnected

    use PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId} to disconnect

    CarlosDiaz, post:3, topic:23492
    in addition to sending a value of a picklist field that we want to send to genesys

    what are you expecting to happen as a result of that happening?


    CarlosDiaz | 2023-12-04 17:35:12 UTC | #5

    tim.smith, post:4, topic:23492
    what are you expecting to happen as a result of that happening?
    value that we will send is saved in genesys, associated with the call, since the codes will be sent, only when the call presents the value, "Client has already canceled debt", which will be identified with the code C0

    thank you so much!!


    tim.smith | 2023-12-04 18:13:30 UTC | #6

    CarlosDiaz, post:5, topic:23492
    saved in genesys, associated with the call

    PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes


    CarlosDiaz | 2023-12-04 18:30:07 UTC | #7

    Thank you very much Tim, then according to what you tell me, when I press the button created in lwc, should the sending be triggered to the two APIs that you tell me?.

    Maybe I explained myself wrong. According to what you indicate, when pressing the button, should we fire towards both APIs to be able to cut the call and additionally save the data?


    tim.smith | 2023-12-04 18:46:09 UTC | #8

    quote="tim.smith, post:4, topic:23492"] use [PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId} to disconnect [/quote]

    When you make the request to this endpoint and set the state to disconnected, it will disconnect the participant.

    tim.smith, post:6, topic:23492
    PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes

    When you make the request to this endpoint with your custom attribute data, it will update the attributes on that participant.


    CarlosDiaz | 2023-12-04 18:48:12 UTC | #9

    tim.smith, post:8, topic:23492
    When you make the request to this endpoint and set the state to disconnected, it will disconnect the participant.

    [quote="tim.smith, post:6, topic:23492"] PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/attributes

    When you make the request to this endpoint with your custom attribute data, it will update the attributes on that participant. [/quote]

    perfect Tim, I really appreciate your guidance and help. thank you so much


    system | 2024-01-04 18:49:08 UTC | #10

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 23492