Genesys Cloud - Main

 View Only

Sign Up

  • 1.  How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 08-22-2025 17:53

    I'm trying to capture a customer's IP address when they start a web conversation using the Genesys web messaging widget.

    Do I first need to create a custom field in the website's JavaScript to capture the IP?  If so, what action and expression should I use in an Architect flow to access that value?

    Is this sufficient in the flow to get the customer's IP address?


    #API/Integrations
    #Routing(ACD/IVR)
    #Unsure/Other

    ------------------------------
    Jean Lam
    ------------------------------


  • 2.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 08-22-2025 18:02

    You should probably post this question in the Developer community...



    ------------------------------
    George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
    Technical Adoption Champion
    Genesys
    2024 Community Member of the Year
    ------------------------------



  • 3.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?
    Best Answer

    Posted 08-25-2025 08:42

    Hello Jean, 

    I will echo George's response, this is a question for the dev community. 

    But I think you can with JavaScript and custom attributes. You can add JavaScript to capture the IP address API service, like ipiyf.org or capture it from your web server. 

    Once you have the IP address you will need to set a custom attribute using the Messenger JavaScript SDK. Something like the below:

    // Assuming you've already captured the IP address
    const ipAddress = "xxx.xxx.xxx.xxx";  // Your IP capture logic here
    
    // Set the custom attribute
    Genesys("command", "Database.set", {
      messaging: {
        customAttributes: {
          customerIP: ipAddress
        }
      }
    });

    Then in your architect flow you can access this custom attribute using the expression: 

    ${Messaging.CustomAttributes.customerIP}

    Cheers, 



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 4.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 08-26-2025 14:08

    Thank you Cameron!



    ------------------------------
    Jean Lam
    ------------------------------



  • 5.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 08-25-2025 09:26
    Edited by Jason Kleitz 08-25-2025 11:02

    Hello - a good approach worth exploring is to enable Journey Tracking via Messenger snippet: once you do that, you'll be able to access the Journey Session variable within the Inbound Message Flow, which already includes the client's Public IP-address that is visible only externally (you cannot detect this via pure JavaScript only, it is not exposed to browsers for good privacy reasons).



    ------------------------------
    Angelo Cicchitto
    Genesys - Employees
    ------------------------------



  • 6.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 09-19-2025 16:39

    Thank you Angelo.



    ------------------------------
    Jean Lam
    ------------------------------



  • 7.  RE: How do you capture a customer's IP address in a Inbound Message Architect flow?

    Posted 09-20-2025 00:56

    Something else to consider here Jean is what you're wanting to do with that IP address.  You'll have to consider the scenarios where a website visitor is behind something like ZScaler where the IP address will be the same for everybody on that same corporate/zscaler connection.



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