# More than one condition on campaign

**URL:** <https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569>\
**Category:** Product Support\
**Created:** [July 11, 2023, 12:41pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569 "2023-07-11T12:41:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [July 11, 2023, 12:41pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/1 "2023-07-11T12:41:46Z")

</div>

Hi, i am trying to create a campaign.  
In the campaign i want to check if the user has product value of ‘product’ or value of ‘product-number2’.

Is there a way for me to do that without create 2 different condition boxes?

At the moment it doesn’t seems like i can do complex query, is there a way to make it work with comma or something like this?

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/67c4f019e2a5ac824bcb5f7db50da057dfba048a.png)

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 11, 2023, 12:53pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/2 "2023-07-11T12:53:30Z")

</div>

Hi, you have to use 2 boxes.  
If you are tech savy you can write a mysql querry and use the SQL Conditions plugin.

> **[GitHub - mtcextendee/mautic-sql-conditions-bundle: Custom SQL condition for...](https://github.com/mtcextendee/mautic-sql-conditions-bundle)**
>
> Custom SQL condition for campaigns. Contribute to mtcextendee/mautic-sql-conditions-bundle development by creating an account on GitHub.

Joey

---

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [July 11, 2023, 12:58pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/3 "2023-07-11T12:58:48Z")

</div>

> [@joeyk](#):
>
> Hi, you have to use 2 boxes.

Hey thanks, that is unfortunate.  
I will check the sql option.

if you had a chance to check it, in terms of how it works does it take more resources from the hosting compre to regualr mautic query?

It seems another option that might work as well and i just thought about is to create segement for each product with a user and filter. On segment you can use more than one value.

But from my experience it seems like the filter update is not always reliable.

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 12, 2023, 6:26am UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/4 "2023-07-12T06:26:01Z")

</div>

I am not sure if it would work, but have you tried regex operator using a pipe | to separate your values?

---

<div class="post-metadata">

**Author:** ![weasam](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/weasam/32/679_2.png) [@weasam](https://forum.mautic.org/u/weasam)\
**Post date:** [May 12, 2024, 4:24pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/5 "2024-05-12T16:24:36Z")

</div>

If you one condition could contains more than one value in the field could save tons of time compare to create many condition. for example i need to change the segment to a segment name “Public Email Provider” that contact field contains “`gmail,yahoo,hotmail`” in the email field. I’m not sure comma could be a separator in the condition field.

Senario 1  
I have a list have many email are end with [gmail.com](http://gmail.com), [yahoo.com](http://yahoo.com), [hotmail.com](http://hotmail.com), these are the public email provider. I don’t want to use mautic standard way to broadcasting email in the cronjob by sending 100 email every time, it will trigger the spam abuse, because we sending 100 emails in 1 minutes to [gmail.com](http://gmail.com), google might think i’m insane, sending too much email from one hostname with same IP

I’ve overviewed the Mautic documentation, % is the operator for the field, if i didn’t made misunderstaned it. the value could be like `%gmail%%yahoo%%hotmail%`

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [May 12, 2024, 8:20pm UTC](https://forum.mautic.org/t/more-than-one-condition-on-campaign/28569/6 "2024-05-12T20:20:19Z")

</div>

You can use regex for this.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b2f68e11e34f25a8e40616c8b24b39be1e120431.png)
