Skip to main content
Version: Next

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.

warning

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

EventReturned data
pre_response.cmf.customerA single customer (CustomerData).
pre_response.cmf.customer_collectionA page of customers (CustomerCollection).
pre_response.cmf.segments_of_customerThe segment IDs added to and removed from a customer in one update.

Activities

EventReturned data
pre_response.cmf.activityA single activity entry (ActivityData).
pre_response.cmf.activity_collectionA page of activities (ActivityCollection).
pre_response.cmf.deletion_collectionRecorded deletions of customers or activities.

Segments

EventReturned data
pre_response.cmf.segmentA single segment (SegmentData).
pre_response.cmf.segment_collectionA page of segments (SegmentCollection).
pre_response.cmf.segment_groupA single segment group (SegmentGroupData).
pre_response.cmf.segment_group_collectionA page of segment groups (SegmentGroupCollection).
pre_response.cmf.term_segment_builder_definition_collectionAll published term segment builder definitions.

Segment Assignment

EventReturned data
pre_response.cmf.segment_assignment_collectionSegments assigned to, or inheritable by, an element.
pre_response.cmf.breaks_inheritance_responseWhether an element breaks segment inheritance.

Automation Rules

EventReturned data
pre_response.cmf.automation_rule_collectionAll automation rules (AutomationRuleCollection).
pre_response.cmf.automation_rule_detailA single automation rule's triggers, conditions, and actions.

Filter Definitions

EventReturned data
pre_response.cmf.filter_definition_detailA single customer view filter definition.

Newsletter

EventReturned data
pre_response.cmf.newsletter_queue_sizeThe current newsletter queue size.

Settings

EventReturned data
pre_response.cmf.api_key_usersPimcore users and their CMF webservice API keys.

Helper Lookups

EventReturned data
pre_response.cmf.activity_type_collectionThe available activity types.
pre_response.cmf.customer_field_collectionThe fields defined on the customer class.
pre_response.cmf.grouped_segment_collectionSegments grouped by segment group.
pre_response.cmf.newsletter_filter_flag_collectionThe 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 nameClassFired whenSelectable as a rule Trigger
plugin.cmf.new-activityActionTrigger\Event\NewActivityA new entry is inserted into the ActivityStore.Yes ("New Customer Activity")
plugin.cmf.after-track-activityActionTrigger\Event\AfterTrackActivityAfter ActivityManager::trackActivity() finishes, for both new and updated entries.No, listen-only
plugin.cmf.execute-segment-buildersActionTrigger\Event\ExecuteSegmentBuildersThe segment building process runs for a customer.Yes ("Segment Building")
plugin.cmf.segment-trackedActionTrigger\Event\SegmentTrackedA segment is tracked to the Targeting Store.Yes ("[Targeting] Segment Tracked")
plugin.cmf.target-group-assignedActionTrigger\Event\TargetGroupAssignedA 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.

info

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

EventClassFired whenPayload
plugin.cmf.newsletter.mailchimp.template-export-resolve-provider-handlerEvent\Newsletter\Mailchimp\TemplateExportResolveProviderHandlerEventExporting 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.