Skip to content

Commit 0dca30c

Browse files
Add Company Segments documentation for ABM functionality
Documents the Company Segments feature from mautic/mautic PR #16025: creating and managing Company Segments, Campaign integration, cron job configuration, and search operators.
1 parent 45a803d commit 0dca30c

6 files changed

Lines changed: 266 additions & 4 deletions

File tree

docs/campaigns/campaign_builder.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ The actions that Mautic offers in a Campaign include:
132132
- Updates the existing Contact's primary Company fields with the specified value. See :doc:`documentation on Companies </companies/companies_overview>`.
133133
* - **Update Contact owner**
134134
- Updates the Contact's owner.
135+
* - **Modify Company's Segments**
136+
- Adds or removes the Contact's primary Company to or from Company Segments. Use this for Account-Based Marketing workflows targeting Companies.
137+
138+
.. _campaign company segment actions:
139+
140+
.. vale on
135141
136142
.. vale on
137143
@@ -258,8 +264,10 @@ Here are the different conditions that Mautic offers in the Campaign Builder:
258264
- Checks if the selected User is the Contact's owner.
259265
* - **Contact Segments**
260266
- Checks if the Contact is a member of selected Segments.
261-
* - **Contact Tags**
267+
* - **Contact Tags**
262268
- Checks if specified Tags are on the Contact record.
269+
* - **Company Segments**
270+
- Checks if the Contact's primary Company is a member of selected Company Segments. Use this for Account-Based Marketing workflows.
263271
* - **Contact Points**
264272
- Checks if the Contact has a certain number of Points or a Group score.
265273
* - **Form Field value**

docs/companies/companies_overview.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,18 @@ Company Segments
7272

7373
.. vale on
7474
75-
You can create a Segment based on a Company record. Select any Company field to filter with and the matching criteria for it, and Mautic lists any Contacts that match the selected fields in the Segment.
75+
Company Segments let you group Companies based on shared attributes or criteria for targeted Account-Based Marketing - ABM. Use Company Segments to organize Companies for Campaign targeting, reporting, and bulk operations.
76+
77+
For detailed information on creating and managing Company Segments, see :doc:`Company Segments</companies/company_segments>`.
78+
79+
.. vale off
80+
81+
Contact Segments based on Company fields
82+
========================================
83+
84+
.. vale on
85+
86+
You can also create Contact Segments based on Company data. Select any Company field to filter with and the matching criteria for it, and Mautic lists any Contacts that match the selected fields in the Segment. This groups Contacts by their associated Company attributes.
7687

7788
.. vale off
7889
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
.. vale off
2+
3+
Company Segments
4+
################
5+
6+
.. vale on
7+
8+
Company Segments group Companies based on shared attributes or criteria, enabling targeted Account-Based Marketing - ABM - strategies. Use Company Segments to organize Companies for Campaign targeting, reporting, and bulk operations.
9+
10+
.. note::
11+
12+
Company Segments are distinct from Contact Segments. While Contact Segments group individual Contacts, Company Segments group entire Companies. This lets you target organizations rather than individuals in your marketing automation.
13+
14+
.. vale off
15+
16+
Creating a Company Segment
17+
**************************
18+
19+
.. vale on
20+
21+
#. Navigate to **Companies > Company Segments** in the menu.
22+
#. Click the **New** button to create a new Company Segment.
23+
#. In the **Details** tab, configure the following:
24+
25+
* **Name** - The internal name for your Company Segment.
26+
27+
* **Public name** - An optional alternate name visible in certain interfaces.
28+
29+
* **Description** - A description of the Segment's purpose.
30+
31+
* **Active** - Toggle to make the Segment available for use. Inactive Segments aren't available as Campaign sources or in other areas of Mautic.
32+
33+
.. vale off
34+
35+
Company Segment filters
36+
***********************
37+
38+
.. vale on
39+
40+
Use filters to create dynamic Company Segments that automatically include or exclude Companies based on field values. Mautic evaluates Companies against these filters during Segment rebuilds and updates membership accordingly.
41+
42+
Configuring filters
43+
===================
44+
45+
#. In the Company Segment editor, click the **Filters** tab.
46+
#. Select a Company field from the dropdown to filter by.
47+
#. Choose an operator and specify the filter value.
48+
#. Add additional filters using **And** or **Or** logic:
49+
50+
* **And** - Companies must match all connected filters.
51+
* **Or** - Creates a new filter group where Companies matching any group are included.
52+
53+
#. Click **Save and close** to save the Segment.
54+
55+
Available filter operators
56+
==========================
57+
58+
The available operators depend on the field type:
59+
60+
* **Equals / Not equal** - Exact match or exclusion of a value.
61+
* **Empty / Not empty** - Whether the field has a value.
62+
* **Like / Not like** - Partial string matching with wildcards.
63+
* **Contains / Starts with / Ends with** - String position matching.
64+
* **Greater than / Less than** - Numeric or date comparisons.
65+
* **Regexp / Not regexp** - Regular expression pattern matching.
66+
67+
.. note::
68+
69+
Companies automatically move into or out of dynamic Segments when their field values change and the Segment cron job runs. See :ref:`Company Segment cron job<company segment cron job>` for configuration details.
70+
71+
.. vale off
72+
73+
Static Company Segments
74+
***********************
75+
76+
.. vale on
77+
78+
Static Company Segments don't use filters. Instead, you manually manage membership through the methods below.
79+
80+
.. vale off
81+
82+
Adding Companies manually
83+
=========================
84+
85+
From the Company record
86+
-----------------------
87+
88+
.. vale on
89+
90+
#. Open the Company you want to add to a Segment.
91+
#. Click the dropdown arrow next to **Edit** and select **Segments**.
92+
#. Select the Company Segments to add the Company to.
93+
#. Click **Save**.
94+
95+
From the Company list view
96+
--------------------------
97+
98+
#. In the Company list, select the checkboxes next to the Companies you want to modify.
99+
#. Click the green arrow that appears at the top of the column.
100+
#. Select **Change Segments**.
101+
#. Choose the Segments to add or remove Companies from.
102+
#. Click **Save**.
103+
104+
.. vale off
105+
106+
Using Campaign actions
107+
======================
108+
109+
.. vale on
110+
111+
You can add or remove Companies from Company Segments as part of a Campaign workflow using the **Modify Company's Segments** action. For more information, see :ref:`Campaign Company Segment actions<campaign company segment actions>`.
112+
113+
.. vale off
114+
115+
Viewing Company Segment membership
116+
**********************************
117+
118+
.. vale on
119+
120+
When viewing all Company Segments, the **# Companies** column displays the number of Companies in each Segment. During rebuilds, this column shows **Building** until the process completes.
121+
122+
To view Companies in a Segment:
123+
124+
#. Navigate to **Companies > Company Segments**.
125+
#. Click the Company count link for the Segment you want to view.
126+
127+
This opens the Company list filtered to show only Companies in that Segment.
128+
129+
.. vale off
130+
131+
Searching Companies by Segment
132+
******************************
133+
134+
.. vale on
135+
136+
Filter the Company list by Segment membership using the search syntax:
137+
138+
.. code-block::
139+
140+
segment:{segment-alias}
141+
142+
Replace ``{segment-alias}`` with the alias of your Company Segment. The alias is automatically generated from the Segment name or can be set manually.
143+
144+
.. vale off
145+
146+
Managing Company Segments
147+
*************************
148+
149+
.. vale on
150+
151+
Editing a Company Segment
152+
=========================
153+
154+
#. Navigate to **Companies > Company Segments**.
155+
#. Click the Segment name or select **Edit** from the dropdown menu.
156+
#. Make your changes and click **Save and close**.
157+
158+
Cloning a Company Segment
159+
=========================
160+
161+
#. Navigate to **Companies > Company Segments**.
162+
#. Click the dropdown arrow next to the Segment.
163+
#. Select **Clone**.
164+
165+
Mautic creates a copy of the Segment with the same filters and settings.
166+
167+
Publishing and unpublishing
168+
===========================
169+
170+
Control Segment availability by publishing or unpublishing:
171+
172+
#. In the Company Segment list, click the colored status indicator - green for published, red for unpublished.
173+
#. Alternatively, edit the Segment and toggle the **Published** setting.
174+
175+
Unpublished Segments aren't available for use in Campaigns or other features.
176+
177+
Deleting Company Segments
178+
=========================
179+
180+
#. Navigate to **Companies > Company Segments**.
181+
#. Select the checkbox next to the Segment or Segments to delete.
182+
#. Click the dropdown arrow and select **Delete**.
183+
#. Confirm the deletion.
184+
185+
.. warning::
186+
187+
Mautic prevents deletion of Company Segments that are referenced by filters in other Segments. Remove the dependency before deleting.
188+
189+
.. _company Segment Cron job:
190+
191+
.. vale off
192+
193+
Company Segment Cron job
194+
************************
195+
196+
.. vale on
197+
198+
To keep Company Segments current, configure a cron job to run the rebuild command:
199+
200+
.. code-block:: php
201+
202+
php /path/to/mautic/bin/console mautic:company-segments:update
203+
204+
This command evaluates all Companies against Company Segment filters and updates membership accordingly.
205+
206+
**Available options:**
207+
208+
* ``--batch-limit=X`` - Number of Companies to process per batch. Default is 300.
209+
210+
* ``--max-companies=X`` - Maximum number of Companies to process per execution.
211+
212+
* ``--segment-id=X`` - Process only a specific Company Segment.
213+
214+
Run this command regularly, for example every 15 minutes, staggered with other cron jobs to distribute server load.
215+
216+
.. code-block::
217+
218+
0,15,30,45 * * * * php /path/to/mautic/bin/console mautic:segments:update
219+
2,17,32,47 * * * * php /path/to/mautic/bin/console mautic:company-segments:update
220+
5,20,35,50 * * * * php /path/to/mautic/bin/console mautic:campaigns:update
221+

docs/configuration/cron_jobs.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ When setting up cron jobs, you must choose how often you want the cron jobs to r
2222

2323
For instance:
2424

25-
.. code-block::
25+
.. code-block::
2626
2727
- 0,15,30,45 <— mautic:segments:update
28+
- 2,17,32,47 <— mautic:company-segments:update
2829
- 5,20,35,50 <— mautic:campaigns:update
2930
- 10,25,40,55 <— mautic:campaigns:trigger
3031
@@ -48,6 +49,25 @@ You can also limit the number of Contacts to process per script execution using
4849

4950
.. vale off
5051
52+
Company Segment Cron jobs
53+
=========================
54+
55+
.. vale on
56+
57+
**To keep Company Segments current:**
58+
59+
.. code-block:: php
60+
61+
php /path/to/mautic/bin/console mautic:company-segments:update
62+
63+
By default, the script processes Companies in batches of 300. If this is too many for your server's resources, use the option ``--batch-limit=X`` replacing X with the number of Companies to process each batch.
64+
65+
You can also limit the number of Companies to process per script execution using ``--max-companies`` to further limit resources used.
66+
67+
To update a specific Company Segment, use the ``--segment-id=X`` option.
68+
69+
.. vale off
70+
5171
Campaign cron jobs
5272
==================
5373

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ There are different types of documentation available to help you navigate your w
125125
:hidden:
126126

127127
companies/companies_overview
128+
companies/company_segments
128129

129130
.. toctree::
130131
:maxdepth: 2

docs/search/search_operators.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ Contacts search filters
7474
Companies search filters
7575
------------------------
7676

77-
.. code-block::
77+
.. code-block::
7878
7979
ids:ID1,ID2 (comma separated IDs, no spaces)
8080
is:published
8181
is:unpublished
8282
is:mine
8383
is:uncategorized
8484
category:{category alias}
85+
segment:{segment-alias}
8586
8687
Segments search filters
8788
-----------------------

0 commit comments

Comments
 (0)