Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Inbound Email reply

    Posted 6 hours ago

    Hi Team,

    Good day

    I have created an email flow that creates a ServiceNow Incident, Request, or Interaction based on the email subject and body.

    However, I am facing one challenge. When a user sends an email for the first time, it correctly creates a ticket. But when the user replies to the same email asking for an update, it creates a new ticket again instead of adding a comment to the existing ticket.

    I have been thinking about the logic  but I have not been able to figure it out. If you have any ideas or suggestions, please let me know.

    Regards

    Nikhil


    #Architect

    ------------------------------
    Nikhil Mokhashi
    Senior IT Telecom Engineer
    ------------------------------


  • 2.  RE: Inbound Email reply

    Posted 6 hours ago
    Edited by Phaneendra Avatapalli 6 hours ago

    Hi Nikhil,

    I think the key is to add a lookup step before creating the ServiceNow record.

    When the first email creates an Incident/Request/Interaction, you could store or return the ServiceNow number and include it in the acknowledgement email subject/body, for example:

    INC0012345 - Your request has been logged

    Then, when the customer replies, the email flow can check the incoming subject/body for an existing ServiceNow number. If one is found, call the ServiceNow API to update that existing record or add a comment instead of creating a new ticket.

    A possible flow would be:

    1. Email arrives in Genesys.

    2. Check subject/body for an existing INC/REQ/Interaction number.

    3. If found, call ServiceNow API to update/comment on that record.

    4. If not found, create a new ServiceNow record.

    5. Store/send the created ticket number so future replies can be matched.

    If available, using email threading/message IDs would be even better than relying only on subject text, but including the ticket number in the reply subject is usually a practical starting point.

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 3.  RE: Inbound Email reply

    Posted 6 hours ago

    Hello Phaneendra,

    Good Morning,

    Thank you for your update

    But in my email flow i am not updating use once case created. means i am not sending any ACK email.  that process service now taking care.

    For example 

    First email  I have sent email to ACD@xx.com ---it will create case INC123.
    Second email Again Same loop i will ask update 


    On this case which logic will use

    Regards

    Nikhil



    ------------------------------
    Nikhil Mokhashi
    Senior IT Telecom Engineer
    ------------------------------



  • 4.  RE: Inbound Email reply

    Posted 6 hours ago

    Hi Nikhil,

    In that case, the important part is whether the customer reply contains the ticket/reference number that was originally sent in the acknowledgement email (for example INC123 or REQ123).

    If the customer replies to the same email thread, the subject will usually still contain that reference number. Your inbound email flow can then:

    • check the incoming subject/body for the existing reference number

    • call ServiceNow API to retrieve/update that existing record

    • add the new email content as a comment/work note instead of creating a new ticket

    If no reference number is found, then the flow would not reliably know which existing ticket to update, so it would either:

    • search ServiceNow using sender email/open tickets

    • or create a new ticket depending on your logic.

    So the key logic is usually:

    1. Check for existing ticket/reference number.

    2. If found → update existing ticket.

    3. If not found → create new ticket/search existing records.

    I am just using INC/REQ as an example reference format here.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 5.  RE: Inbound Email reply

    Posted 4 hours ago

    Hello Phaneendra,

    Good day,

    Thank you,

    Customer will reply email dont have any reference number /Ticket number. But same subject.

    Regards

    Nikhil



    ------------------------------
    Nikhil Mokhashi
    Senior IT Telecom Engineer
    ------------------------------



  • 6.  RE: Inbound Email reply

    Posted 2 hours ago

    Hello Nikhil,

    Since the ServiceNow ticket is being created successfully as INC123, can your create-ticket API/Data Action return that ticket number back to the Genesys email flow?

    If yes, one option could be:

    • create the ticket in ServiceNow

    • return the ticket number/reference back to Genesys

    • store it if needed

    • have ServiceNow include the same ticket number/reference in its acknowledgement email subject or body

    Then, when the customer replies, the inbound email flow can read that reference and update the existing ServiceNow ticket instead of creating a new one.

    If the reply email continues to have only the same subject and no unique reference, then the only option is a less reliable lookup, such as sender email + subject + open ticket status.

    Hopefully someone else from the community may also have a different or cleaner approach for handling this type of email-to-ticket correlation.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 7.  RE: Inbound Email reply

    Posted an hour ago

    Thank you very much for a solution.

    I have one doubt

    If i store all Generated  tickets on genesys data table in few days it going full but we can do one automation for this.

    Regards

    Nikhil



    ------------------------------
    Nikhil Mokhashi
    Senior IT Telecom Engineer
    ------------------------------



  • 8.  RE: Inbound Email reply

    Posted an hour ago

    Hello Nikhil,

    Just to clarify, I would not recommend storing every generated ticket permanently in Genesys Data Tables.

    Instead, when a new email arrives in the inbound email flow, Genesys (via a Data Action or Function) could first search ServiceNow using details such as:

    • sender email
    • same/similar subject
    • active/open ticket status

    If a matching open ticket is found, update/add comments to that existing ticket. Otherwise create a new one.

    So the lookup/search still happens from Genesys, but the actual source of truth remains in ServiceNow rather than storing all ticket mappings long term inside Genesys.

    If possible, having ServiceNow include a ticket/reference number or correlation ID in the acknowledgement email subject/body would still be the most reliable long-term solution for correlating future replies.

    Hope this helps.



    ------------------------------
    Phaneendra
    Technical Solutions Consultant
    ------------------------------



  • 9.  RE: Inbound Email reply

    Posted an hour ago

    Thank you very much i got it.

    Have a great day. 



    ------------------------------
    Nikhil Mokhashi
    Senior IT Telecom Engineer
    ------------------------------