Skip to main content
Inspiring
December 13, 2012
Question

Sending Conditional Emails based on a Type field.

  • December 13, 2012
  • 1 reply
  • 1216 views

What is the best solution to send e-mails to a list of recipients for only certain Ticket Types?

- I've already created a table/form that connects each User/Email to the Ticket Types (see image below)

- My problem is how to create the Query that will "filter" and create the list of email address?

     - Every new ticket gets assigned a TicketType..

     - Every user has been setup ahead of time with the appropriate types checked..

     - But each user only wants their emails and NOT any unchecked types?

- Here is my idea of a tblEmailAction that indicates which Ticket Types a recipient is interested in and then it saves the ID of that ticket type into the table. Now just need to match up the  values in the original ticket and generate the email list..?

    This topic has been closed for replies.

    1 reply

    Inspiring
    December 13, 2012

    The text on your screen shot can't be read.  However, the crux of your problem seems to be identifying who should get what email.

    You say that each new ticket gets assingned a ticket type.  Does it also get assigned to a user?  If so, you need to find the applicable tables and fields.  If not, what you are attempting can't be done.

    jligAuthor
    Inspiring
    December 13, 2012

    If you click the picture it should open in full, it does when I click it..

    Here is the normal of flow..

    1) New ticket is Created and always assigned one of the Ticket Types (see image above)

         -Email is sent out: "New Ticket# 1001 has been created"

    2) Ticket is Accepted by a User

         -Email is sent out: "Ticket# 1001 has been accepted by Joe_User"

    3) Ticket is Updated periodically

         -Email is sent out: "Ticket# 1001 has been updated"

    4) Ticket is eventually Closed

         -Email is sent out: "Ticket# 1001 has been closed by Joe_User"

    Currently I have the emails going out to every user at each step.. but wanting to send "conditional" emails depending on the Ticket Type of the Ticket.

    If I create the following query I do get just the users, that have that Ticket Type, for that Ticket#..

    but not sure how to expand this query to allow for all Cases of Types?

    (this ticket has ADSL as the Ticket Type)

    Inspiring
    December 13, 2012

    This forum has clickable images?  Who knew?

    In any event, step 2 - Ticket is accepted by user.  What happens on the database during this step?