Genesys Cloud - Developer Community

 View Only

Discussion Thread View
  • 1.  How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 06-13-2025 08:05

    Hi everyone,

    I'm currently working on an integration with Genesys Cloud where I need to invoke a REST API just  before an outbound call is placed. The goal is to pass both the caller and callee phone numbers to the API and wait for its response before proceeding with the call.

    I've experimented with Data Actions and Campaign settings, but haven't found a way to automatically trigger the API call prior to dialing. Additionally, I couldn't locate where the system exposes the caller/callee numbers in a usable form before the call starts.

    Has anyone implemented something similar or know which Genesys Cloud features could help enable this kind of pre-call logic?

    Thanks in advance for any insights!


    #Integrations

    ------------------------------
    Bendeguz Cseresnyes
    ------------------------------


  • 2.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 29 days ago

    Hi Bendeguz,

    I think that you can add a pre-call rule with a type of data action:

    https://help.mypurecloud.com/articles/add-rule/



    ------------------------------
    --Jason
    ------------------------------



  • 3.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 20 days ago

    Hi Jason,

    Thank you for the suggestion, with pre-call rules it seems I can trigger a data action before the call occurs, but I still have some missing pieces:

    1. I wasn't able to find the caller's phone number (Genesys system's phone number) among the rule attributes. Is this information available in any way?

    2. I had to assign a condition to the rule, but we'd like it to run in all cases. To work around this, I used an inverted rule with a condition that's never met. Is there a better way to achieve this?

    3. It seems the data action is triggered when the call enters the queue or is routed to an agent. However, since call initiation depends on the campaign configuration / agent, it's not guaranteed that the call will actually start. Ideally, we'd like to trigger the API call when the call actually begins. Is that possible?

    4. Is there a way to configure something similar to direct outbound calls (when the agent directly calls a customer without a campaign) or scheduled callbacks as well? It seems the rule with data action can only be assigned to a campaign.

    Thanks in advance for your help-any guidance you can provide would be greatly appreciated!



    ------------------------------
    Bendeguz Cseresnyes
    ------------------------------



  • 4.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 20 days ago

    While I am an expert in data actions, I don't have any experience in the areas that you are asking about, so hopefully someone else can contribute suggestions.



    ------------------------------
    --Jason
    ------------------------------



  • 5.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 19 days ago

    What is the goal of passing the caller and callee numbers via an reset API call?

    1.This wouldn't be in the rules. If you are firing off a data action in a pre-call rule, you will need to include a column in your contact list with the phone number.

    2. You can assign a condition that will always be met so you can fire off an action. For example the column with the phone number is not 0. That should always be met as you will have phone numbers in the column. This will meet the condition and execute the action.

    3. Are you testing with preview campaign?

    4. Maybe going back to my question on the top: what is the goal or your use case?

    Also might be work checking out: https://help.mypurecloud.com/articles/pre-call-rules/



    ------------------------------
    Hermina Cosic
    Senior Solution Architect
    ------------------------------



  • 6.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 13 days ago
    Edited by Prateek Saxena 13 days ago

    Hi Hermina, we are building an app to allow Genesys customers to register outgoing calls with our company (Hiya), which we will then verify at a terminating carrier where we are integrated. The purpose of this is to prevent fraudsters from impersonating a business by spoofing a phone number. If we can't verify that a call was made by a legitimate enterprise, we will have the ability to perform further action on the call, including appropriate labelling and stripping brand identity. For this purpose, it is important for us to know the phone number that the call originated from on the enterprise's Genesys dialer, as without it, our verification will weaken.

    And hence, as Bende on my team mentioned earlier, ideally, we need to be able to invoke Hiya's Secure Branding API (API and payload defined here) just before the call is initiated for all outbound dialling scenarios. The payload must contain the below:

    • originatingPhone: Phone number of the calling party (in this case the Genesys phone number used by the calling enterprise)
    • terminatingPhone: Phone number of the called party.
    • timeToLiveSeconds: specifies the lifespan of the auth request (in seconds).


    ------------------------------
    Prateek Saxena
    Sr. Product Manager
    ------------------------------



  • 7.  RE: How to Invoke a REST API Before Outbound Calls in Genesys Cloud

    Posted 4 hours ago

    Hi Genesys team,

    Following up again to see if anyone can suggest a solution to help us meet our use case.

    Thanks,



    ------------------------------
    Prateek Saxena
    Sr. Product Manager
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources