NotifyTrigger (Commerce Engine)
NotifyTrigger (Commerce Engine)
|
|
Note
This component was introduced in version |
The NotifyTrigger controller handles notify triggers. A Notify trigger query pipeline rule lets you define a message to be displayed to the end user when a certain condition is met.
Methods
subscribe
Adds a callback that’s invoked on state change.
Parameters
-
listener:
() => voidA callback that’s invoked on state change.
Returns Unsubscribe: A function to remove the listener.
Attributes
state
the state of the NotifyTrigger controller.
Properties
-
notifications:
string[]The notifications to display to the user after receiving notification triggers.
Initialize
buildNotifyTrigger
Creates a NotifyTrigger controller instance.
Parameters
-
engine:
CommerceEngineThe headless commerce engine.
Returns NotifyTrigger
Related types
Unsubscribe
Call signatures
-
(): void;