# Auto Assign Contact "Owner" Programatically

**URL:** <https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161>\
**Category:** Ideas and Feature Requests\
**Created:** [June 28, 2016, 5:13pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161 "2016-06-28T17:13:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rich](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rich/32/45_2.png) [@Rich](https://forum.mautic.org/u/Rich)\
**Post date:** [June 28, 2016, 5:13pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/1 "2016-06-28T17:13:29Z")

</div>

Please provide a simple way to update a contacts owner by any number of options. Through specific campaign triggers, embedded into forms (maybe as a hidden field). In general, the idea is to have a way to automatically set the owner ID before an email is sent preventing sending emails with the default admin email before an owner can be assigned. Changing a contacts owner is currently a manual process.  
  
  
  
Also: understandably more complex but allowing the contact to have multiple owners depending on the condition. The reason for this comes about because I run several web properties. A for profit [http://iaddicshelters.net](http://iaddicshelters.net) and a non-profit [http://sheltertheworld.org](http://sheltertheworld.org). Many of the for profit contacts visit and register on the non-profit site.  
  
  
  
Everything in the campaign and segmenting works great, however; the contact will get the emails from whichever single owner is set.  
  
  
  
So, if the owner id for a for-profit contact is set as the for-profit owner, and a campaign is set to go to a non-profit contacts segment which the contact is in, the contact will get picked up in the campaign and sent the email from the non-profit campaign with the for-profit owners email address.  
  
  
  
Thank you, Rich

---

<div class="post-metadata">

**Author:** ![Rich](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rich/32/45_2.png) [@Rich](https://forum.mautic.org/u/Rich)\
**Post date:** [June 28, 2016, 5:13pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/2 "2016-06-28T17:13:29Z")

</div>

Please provide a simple way to update a contacts owner by any number of options. Through specific campaign triggers, embedded into forms (maybe as a hidden field). In general, the idea is to have a way to automatically set the owner ID before an email is sent preventing sending emails with the default admin email before an owner can be assigned. Changing a contacts owner is currently a manual process.

Also: understandably more complex but allowing the contact to have multiple owners depending on the condition. The reason for this comes about because I run several web properties. A for profit [http://iaddicshelters.net](http://iaddicshelters.net) and a non-profit [http://sheltertheworld.org](http://sheltertheworld.org). Many of the for profit contacts visit and register on the non-profit site.

Everything in the campaign and segmenting works great, however; the contact will get the emails from whichever single owner is set.

So, if the owner id for a for-profit contact is set as the for-profit owner, and a campaign is set to go to a non-profit contacts segment which the contact is in, the contact will get picked up in the campaign and sent the email from the non-profit campaign with the for-profit owners email address.

Thank you, Rich

---

<div class="post-metadata">

**Author:** ![alainarae](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@alainarae](https://forum.mautic.org/u/alainarae)\
**Post date:** [March 26, 2017, 5:32am UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/3 "2017-03-26T05:32:16Z")

</div>

Any updates on this? Would be awesome if this was an action (to assign owner) in the campaign builder pr if the creator of the form was the owner (and therefore the person in the “from” field of subsequently sent emails)

Thanks!

---

<div class="post-metadata">

**Author:** ![nimbletoad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/nimbletoad/32/142_2.png) [@nimbletoad](https://forum.mautic.org/u/nimbletoad)\
**Post date:** [April 3, 2017, 11:24pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/4 "2017-04-03T23:24:04Z")

</div>

We are looking for a solution to this as well. It seems like there would have to be someway to programmatically assign leads to different users. Is that not the point of marketing automation? What am I failing to see? Is contact ownership not the way to go?

---

<div class="post-metadata">

**Author:** ![manageit](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@manageit](https://forum.mautic.org/u/manageit)\
**Post date:** [April 3, 2017, 11:37pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/5 "2017-04-03T23:37:45Z")

</div>

Under the `ma_companies` table is an ‘owner\_id’ field, which you can adjust with a simple SQL query.

---

<div class="post-metadata">

**Author:** ![hrouissi](https://avatars.discourse-cdn.com/v4/letter/h/58956e/32.png) [@hrouissi](https://forum.mautic.org/u/hrouissi)\
**Post date:** [July 23, 2017, 6:51pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/6 "2017-07-23T18:51:45Z")

</div>

It would be great if a feature can allow this.

---

<div class="post-metadata">

**Author:** ![GoGo](https://avatars.discourse-cdn.com/v4/letter/g/9de0a6/32.png) [@GoGo](https://forum.mautic.org/u/GoGo)\
**Post date:** [October 31, 2017, 1:22pm UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/7 "2017-10-31T13:22:34Z")

</div>

Yes, please!!

---

<div class="post-metadata">

**Author:** ![mark.phillips](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mark.phillips/32/1527_2.png) [@mark.phillips](https://forum.mautic.org/u/mark.phillips)\
**Post date:** [January 25, 2020, 5:24am UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/8 "2020-01-25T05:24:14Z")

</div>

> [@Rich](#):
>
> provide a simple way to update a contacts owner by any number of options. Through specific campaign triggers, embedded into forms (maybe as a hidden field). In general, the idea is to have a way to automatically set the owner ID before an email is sent preventing sending emails with the default admin email before an owner can be assigned. Changing a contacts owner is currently a manual process.

I ran across this behavior when sending emails on a campaign the email from is from the owner and not the configured email, I then created campaign pre-preprocessor jobs which checked if the email is valid and assigned the email to a new owner. In effect, I have various stages, segments, and campaigns which run as ingestion pre-processors and post-processors to handle these types of maintenance tasks. Other tasks are, adding and removing tags, deleting contacts. Perhaps this solves this feature request.

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [January 25, 2020, 10:43am UTC](https://forum.mautic.org/t/auto-assign-contact-owner-programatically/4161/9 "2020-01-25T10:43:31Z")

</div>

Indeed - as Mautic allows you to assign a contact owner as a campaign action, there is a lot of freedom to assign leads to owners programmatically.
