Forums

Expand all | Collapse all

Change "Customer" based on email body

  • 1.  Change "Customer" based on email body

    Posted 04-23-2021 16:34
    We're onboarding a 3rd party IT support company who escalate tickets to us using a standard email template. We'd like to use a field in that email template named "Email: " to identify the user who submitted the ticket originally. We then want Cherwell to use that template to set the customer based on that template instead of the email address that the email actually came in on.

    We also want regular users to be able to create tickets without the 3rd party so we need to keep the out of the box ticket creation workflow in place.

    Ideally the logic would play out like this:
    • If body of email contains "Email: " then assign the customer based on the value in that line
    • Else if body of email does not contain that then assign the customer based on the address that the email came in from


    What's the best way to achieve this?

    Thanks


    #EmailMonitor

    ------------------------------
    Corbin Nielsen
    ------------------------------


  • 2.  RE: Change "Customer" based on email body

    Expert
    Posted 04-23-2021 18:05
    Run a One-Step in your email monitor after creating the initial ticket, and set a condition on it to check for the 'Email:' value - if blank, leave the ticket as it is (logged  under the default customer), if it isn't blank, then update the ticket with the customer from the body. 

    Here's an example of one I have which creates the initial ticket, then has two separate One-Step actions to update that ticket afterwards (the benefit of doing it in the monitor rather than automation is that you can directly parse the email variables like 'body', 'subject' etc.).



    ------------------------------
    Graham Moore
    ------------------------------



  • 3.  RE: Change "Customer" based on email body

    Posted 29 days ago
    I am trying to accomplish this same thing from a third party system but struggling to get it to work.  Graham, can you share the Add Customer portion of your one step?
    Thank you in advance

    ------------------------------
    Brian Thoms
    Purpose Financial
    ------------------------------



  • 4.  RE: Change "Customer" based on email body

    Expert
    Posted 29 days ago
    Hey Brian,

    Some of this might depend on how you've configured any auto-populate on your object. For example, if the 'Customer Email' field is validated and your 'Customer Name' field is auto-populated whenever the email changes, then the method below would work fine. If it doesn't work that way, or maybe it's the opposite, then you might find it easier to create some new temp fields on the object to capture the email and then capture the name associated with it (i.e. temp_email & temp_name, and then populate the 'Customer Name' with 'temp_name'). 

    The One-Step is as simple as grabbing the email address from the body text and putting it into a variable:




    Then once you have that you can throw it into the 'Customer Email' field (or the 'temp_email' field if you're going that route):



    ------------------------------
    Graham Moore
    ------------------------------