Events
CMF dispatches events at several points. All event classes live under src/Event/ and
src/ActionTrigger/Event/. This page groups them by area and lists each event's name and payload, verified against
the class that dispatches it.
Pimcore Studio Pre-Response Events
Before a Studio Backend API endpoint returns, CMF dispatches a pre-response event carrying the response schema. Listen for it to add your own data to the response. See the Studio Backend Additional and Custom Attributes documentation for the listener pattern.
The endpoints these events belong to are not a supported public API. They are marked @internal, exist to serve
Pimcore Studio, and may change in any release without a deprecation path. Do not build integrations against them.
Use the REST webservice for external integrations instead.
Customers
| Event | Returned data |
|---|---|
pre_response.cmf.customer | A single customer (CustomerData). |
pre_response.cmf.customer_collection | A page of customers (CustomerCollection). |
pre_response.cmf.segments_of_customer | The segment IDs added to and removed from a customer in one update. |
Activities
| Event | Returned data |
|---|---|
pre_response.cmf.activity | A single activity entry (ActivityData). |
pre_response.cmf.activity_collection | A page of activities (ActivityCollection). |
pre_response.cmf.deletion_collection | Recorded deletions of customers or activities. |
Segments
| Event | Returned data |
|---|---|
pre_response.cmf.segment | A single segment (SegmentData). |
pre_response.cmf.segment_collection | A page of segments (SegmentCollection). |
pre_response.cmf.segment_group | A single segment group (SegmentGroupData). |
pre_response.cmf.segment_group_collection | A page of segment groups (SegmentGroupCollection). |
pre_response.cmf.term_segment_builder_definition_collection | All published term segment builder definitions. |
Segment Assignment
| Event | Returned data |
|---|---|
pre_response.cmf.segment_assignment_collection | Segments assigned to, or inheritable by, an element. |
pre_response.cmf.breaks_inheritance_response | Whether an element breaks segment inheritance. |
Automation Rules
| Event | Returned data |
|---|---|
pre_response.cmf.automation_rule_collection | All automation rules (AutomationRuleCollection). |
pre_response.cmf.automation_rule_detail | A single automation rule's triggers, conditions, and actions. |
Filter Definitions
| Event | Returned data |
|---|---|
pre_response.cmf.filter_definition_detail | A single customer view filter definition. |
Newsletter
| Event | Returned data |
|---|---|
pre_response.cmf.newsletter_queue_size | The current newsletter queue size. |
Settings
| Event | Returned data |
|---|---|
pre_response.cmf.api_key_users | Pimcore users and their CMF webservice API keys. |
Helper Lookups
| Event | Returned data |
|---|---|
pre_response.cmf.activity_type_collection | The available activity types. |
pre_response.cmf.customer_field_collection | The fields defined on the customer class. |
pre_response.cmf.grouped_segment_collection | Segments grouped by segment group. |
pre_response.cmf.newsletter_filter_flag_collection | The available newsletter opt-in/opt-out filter flags. |
ActionTrigger Rule-Engine Events
CMF's ActionTrigger service dispatches these events on the Symfony event dispatcher (registered as
kernel.event_listener services in services_events.yml) whenever the corresponding situation occurs. The rule
engine's EventHandlerInterface listens for them to evaluate automation rules, but any other listener can subscribe
to the same event name too. See ActionTrigger for the triggers, conditions, and actions
built on top of them, and
Extending the Customer Management Framework for how a Studio
Dynamic Type maps a trigger's event name to a UI component.
| Event name | Class | Fired when | Selectable as a rule Trigger |
|---|---|---|---|
plugin.cmf.new-activity | ActionTrigger\Event\NewActivity | A new entry is inserted into the ActivityStore. | Yes ("New Customer Activity") |
plugin.cmf.after-track-activity | ActionTrigger\Event\AfterTrackActivity | After ActivityManager::trackActivity() finishes, for both new and updated entries. | No, listen-only |
plugin.cmf.execute-segment-builders | ActionTrigger\Event\ExecuteSegmentBuilders | The segment building process runs for a customer. | Yes ("Segment Building") |
plugin.cmf.segment-tracked | ActionTrigger\Event\SegmentTracked | A segment is tracked to the Targeting Store. | Yes ("[Targeting] Segment Tracked") |
plugin.cmf.target-group-assigned | ActionTrigger\Event\TargetGroupAssigned | A target group is assigned to the current visitor. | Yes ("[Targeting] Assigned Target Group") |
NewActivity and AfterTrackActivity both carry the tracked ActivityInterface and the resulting
ActivityStoreEntryInterface. SegmentTracked carries the tracked CustomerSegmentInterface and a count.
TargetGroupAssigned carries the assigned TargetGroup, the assignment type (documents or targetingRules), and
the visitor's VisitorInfo.
The "Cron" trigger (ActionTrigger\Event\Cron) is not in this table. The cmf:handle-cron-triggers command
instantiates it directly and hands it to the rule engine's EventHandlerInterface; it never passes through the
Symfony event dispatcher (services_events.yml has no listener registration for it). It is only usable as a
selectable rule Trigger, not as an event external code can subscribe to.
Newsletter Events
| Event | Class | Fired when | Payload |
|---|---|---|---|
plugin.cmf.newsletter.mailchimp.template-export-resolve-provider-handler | Event\Newsletter\Mailchimp\TemplateExportResolveProviderHandlerEvent | Exporting a newsletter template to Mailchimp needs to resolve which Mailchimp provider handler to use. | The Document\PageSnippet being exported. Call setProviderHandler() on the event to override which Mailchimp provider handler is used; if no listener sets one, CMF falls back to the first registered Mailchimp provider handler, and throws if there is none. |
See Multiple Mailchimp Accounts for a project with more than one Mailchimp provider handler, where this event lets you pick the correct one per template export.