Use triggers to send different mail to customers registred and not registred in zammad

Infos:

  • Used Zammad version: ZAMMAD V3.6
  • Used Zammad installation source: (source, package, …) package
  • Operating system: Centos7
  • Browser + version: Chrome

Expected behavior:

Info:

  • Tickets received Through email channel
  • Emails towards customers are sent using triggers

Scenario:
on ticket creation I have 2 types of mails should be sent :

  • if a customer is registred in zammad as a user ( with role customer): he will receive an email conatain a link to zammad web
  • if a customer is not registred in zammad as a user : he will receive just an a mail with text (your request is received…)

So I have to had 2 triggers on new tickets creation

Actual behavior:

I have a trigger on new ticket that send an email to customers

  • I dont know how to create a trigger that sent a different email to a customer not registerd in zammad

it didnt work when I had with the following test:

sender is not customer
or
customer is not set

Steps to reproduce the behavior:

  • create a 2 trigger to sent different emails on a new ticket creation
  • one with condition customer is not set and the other with customer not set
  • always with customer set is sent (because when a customer sent an email he will be added as a user)

Sorry but you can’t differentiate users like that.
Zammad will always create a new customer account if the user that drops a support request is yet unknown to Zammad. This is a core function and required for Zammad to function.

So you can go for option one and send the same trigger upon any ticket creation.
Zammad provides a default trigger that by default is enabled that does the same. May need adjustment through.

Please also have a look into our documentation, it explains the backgrounds a bit better:
https://admin-docs.zammad.org/en/latest/manage/users/index.html

Hi,
maybe this here is an approach to differentiate between users that are already known in ZAMMAD and “new users” in a different way:

Because Zammad registers all new Users and creates an account for them (which normally is pretty cool) you might identify them because they are not assigned to an organization (if you do not use “Domain-based assignment” for the organizations).
So that means for turning “unknown users” into “known users” you have to bring a process in place (e.g. manually) to add all known user to an organization when they should be treated as “known users”, while the new users are not assigned to an organization.

Then you can use a condition in triggers “Customer-Organization” “is not” “not set (not defined)” to identify the existing, validated users to send a different mail to them.
In the trigger for the new, unknown users you then use the condition “Customer-Organization” “is” “not set (not defined)” and send them a different mail (until you assign them to an organization and they become a “known user”.

Just an idea… Does this make sense?

Regards
Marco.

Hi mviehl
This what I am doing now , I am testing on user’s organization , I wanted to know if there is another way to do it.

Thank you for your advice.

1 Like

Thank you for you time,
For know I am testing on user organization

While I understand your idea and it technically makes sense this is currently out of triggers scope.
Its main focus is Ticket which is why it ignores such user parts.

However, a feature request on this board may help if more people do agree with you.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.