Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Inbound Email reply

    Posted an hour 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 an hour ago
    Edited by Phaneendra Avatapalli an hour 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 an hour 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 an hour 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
    ------------------------------