# Mautic Custom Objects Plugin

**URL:** <https://forum.mautic.org/t/mautic-custom-objects-plugin/24058>\
**Category:** Product Support\
**Created:** [May 11, 2022, 1:33pm UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058 "2022-05-11T13:33:19Z")\
**Posts on this page:** 11\
**Page:** 1

<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:** [May 11, 2022, 1:33pm UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/1 "2022-05-11T13:33:19Z")

</div>

Has anyone any experience with this plugin ?

How to install ?

> **[GitHub - acquia/mc-cs-plugin-custom-objects: Mautic plugin adding Custom...](https://github.com/acquia/mc-cs-plugin-custom-objects)**
>
> Mautic plugin adding Custom Objects feature. Contribute to acquia/mc-cs-plugin-custom-objects development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 11, 2022, 1:35pm UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/2 "2022-05-11T13:35:37Z")

</div>

Hi Mike,

We’re currently in a closed beta as there are some relatively complex steps you have to go through to install and work with the plugin until a bunch of PRs are merged into a release.

If you want to join, please ping me on Slack and I can add you to the channel.

---

<div class="post-metadata">

**Author:** ![jlbs](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jlbs](https://forum.mautic.org/u/jlbs)\
**Post date:** [May 20, 2022, 11:43am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/3 "2022-05-20T11:43:45Z")

</div>

This is the first I’ve seen of this plugin, and it looks amazing! I can see so many potential uses for it.

Best of luck with the development @silavapi - is there any roadmap for when it might come out of private beta?

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 20, 2022, 11:51am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/4 "2022-05-20T11:51:56Z")

</div>

Thanks to a herculean effort from everybody who has been involved with our Open Source Friday sprints and the Community Sprint a few weeks ago, we managed to get all the dependent PRs merged into the 4.2.1/4.2.2/4.3.0 releases, so we’re aiming for a formal announcement to coincide with the 4.3.0 General Availability release on Monday next week! 🥳 🚀 🎉

It will remain a third party extension which you will have to selectively install like any other plugin, maintained by Acquia but also accepting PRs from the community.

---

<div class="post-metadata">

**Author:** ![biggala2310](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/biggala2310/32/694_2.png) [@biggala2310](https://forum.mautic.org/u/biggala2310)\
**Post date:** [May 30, 2022, 10:04am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/5 "2022-05-30T10:04:17Z")

</div>

I started using this plugin. At the moment, I have ambivalent feelings. On the one hand we have got more data and possible powerful tool. On the other: adding custom objects in campaigns doesn’t work. Also I can’t find documentantion for connect via API. In the end - we can’t link via forms and use Custom obejcts data dynamic in emails. So - now It is little useless.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [May 30, 2022, 10:10am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/6 "2022-05-30T10:10:01Z")

</div>

> [@biggala2310](#):
>
> I can’t find documentantion for connect via API

Please find all the developer documentation in the wiki here: [Home · acquia/mc-cs-plugin-custom-objects Wiki · GitHub](https://github.com/acquia/mc-cs-plugin-custom-objects/wiki)

---

<div class="post-metadata">

**Author:** ![biggala2310](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/biggala2310/32/694_2.png) [@biggala2310](https://forum.mautic.org/u/biggala2310)\
**Post date:** [May 30, 2022, 11:21am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/7 "2022-05-30T11:21:47Z")

</div>

Thanks. One more question - linking custom objects to contact in campaign editor doesn’t work only on my instance? I start typing and haven’t any list or something.

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

Of cource I have got created products and done m:a:g

---

<div class="post-metadata">

**Author:** ![biggala2310](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/biggala2310/32/694_2.png) [@biggala2310](https://forum.mautic.org/u/biggala2310)\
**Post date:** [June 8, 2022, 12:30pm UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/8 "2022-06-08T12:30:14Z")

</div>

@silavapi @escopecz

Are you planning a feature that allows you link custom objects with contacts via forms? I need this feature and I want to outsource this to our developer. I wonder if you would like to contribute or do this feature will be accepted.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [June 9, 2022, 10:38am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/9 "2022-06-09T10:38:43Z")

</div>

@biggala2310 I’m glad for this question. We did refactoring of Mautic forms in 2020 to support the Custom Objects plugin in forms. I pushed it here:

> <https://github.com/mautic/mautic/pull/11234>
>
> \*\*Please be sure you are submitting this against the \_staging\_ branch.\*\*
> 
> \[//\]…: # ( Please answer the following questions: )
> 
> | Q | A
> | --- | ---
> | Bug fix? | N
> | New feature? | Y
> | Automated tests included? | Y
> | Related user documentation PR URL | /
> | Related developer documentation PR URL | TODO (update the API to not use the deprecated field)
> | Issues addressed (#s or URLs) | https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/8?u=escopecz
> | BC breaks? | N
> | Deprecations? | Y
> 
> \[//\]: # ( Note that all new features should have a related user and/or developer documentation PR in their respective repositories. )
> 
> \[//\]: # ( Required: )
> \#### Description:
> 
> The final goal is that Custom Objects will be able to inject their objects and fields into the form field mapping form.
> 
> \- \[x\] Objects and fields must be subscribed by a listener. One event for objects, the other to get all fields for a specific object.
> \- \[x\] New select box for objects
> \- \[x\] The fields select box will update its options based on selected object in the previous select box via AJAX.
> \- \[x\] Create new columns in the form\_fields table: mapped\_object, mapped\_field
> \- \[x\] In the migration populate the new columns with the value from the lead\_field column. Fill in the right object (lead, company) based on the value prefix.
> \- \[x\] Deprecate the lead\_field column in the entity.
> \- \[x\] Replace usage of deprecated lead\_field with mapped\_field and mapped\_object values.
> \- \[x\] Replace usages of 'contactFields' and 'companyFields'
> \- \[x\] Still save the value to the deprecated field for API BC compatibility.
> \- \[x\] Make sure that if a form is created/modified with the legacy field that it will populate the replacement fields for API BC compatibility.
> \- \[x\] Store field ~~IDs~~ or aliases?
> 
> Contains also migration that will create the columns and migrates data from lead\_field column.
> 
> I cleaned the entity a bit too. It was full of verbose syntax, strings over constants and comments that did not bring any value.
> 
> \#### Steps to test this PR:
> 1. Before you checkout this branch:
> 2. Create a form with at least 4 fields. One mapped to the contact email field, one mapped to the company field under the contact opt group, one mapped to the primary company city field. The fourth field should not be mapped to any field.
> 3. Run the migration. Go to the \`form\_fields\` table and check that the last 2 columns are \`mapped\_object\` and \`mapped\_field\`. The field that was mapped to the contact email field should have \`mapped\_object = 'lead'\` and \`mapped\_field = 'email'\`. The one that was mapped to the company field under the contact opt group should have \`mapped\_object = 'lead'\` and \`mapped\_field = 'company'\`. The one that was mapped to the primary company city field should have \`mapped\_object = 'company'\` and \`mapped\_field = 'companycity'\`. The form field that was not mapped at all should have null values there.
> 4. When you map one field then it should be removed from mapping of other fields. Example: Map contact email field to a form field. Create another field. The contact email field is not in the mapping list.
> 5. Test submissions of different field types.
> 6. Test conditional fields
> 7. Test progressive profiling (behaviours)
> 
> \#### List deprecations along with the new alternative:
> 1. \`form\_fields.lead\_field\` column is deprecated. Use \`mapped\_object\` and \`mapped\_field\` instead.
> 2. \`Mautic\\FormBundle\\Entity\\Field::getLeadField()\` and \`setLeadField()\`. Use getters and setters on \`mappedObject\` and \`mappedField\` properties instead.
> 3. \`Mautic\\FormBundle\\Event\\Service\\FieldValueTransformer::isIsTransformed()\` is deprecated as not used.
> 
> \<a href="https://gitpod.io/#https://github.com/mautic/mautic/pull/11234"\>\<img src="https://gitpod.io/button/open-in-gitpod.svg"/\>\</a\>

The priorities shifted and we didn’t finish the implementation in the Custom Objects plugin. But it should make your work way easier. I opened it against the 5.x branch as 4.x won’t have any feature (minor) release.

---

<div class="post-metadata">

**Author:** ![biggala2310](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/biggala2310/32/694_2.png) [@biggala2310](https://forum.mautic.org/u/biggala2310)\
**Post date:** [July 14, 2022, 11:08am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/10 "2022-07-14T11:08:07Z")

</div>

I talked to my programmer. He will try to complete this task, but we will be joining it after the M5 release to do it with Symfony 5 compatibility.

---

<div class="post-metadata">

**Author:** ![akshayswiftyweb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/akshayswiftyweb/32/7072_2.png) [@akshayswiftyweb](https://forum.mautic.org/u/akshayswiftyweb)\
**Post date:** [November 3, 2022, 5:38am UTC](https://forum.mautic.org/t/mautic-custom-objects-plugin/24058/11 "2022-11-03T05:38:54Z")

</div>

Hello, biggala2310 did anyone find a solution for this one, I am trying to connect all my old contacts + any new ones as they come, to my custom item. Can anyone help me with this one? Please its urgent.
