NotifyTrigger (Commerce Engine)

This is for:

Developer

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: () => void

    A 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: CommerceEngine

    The headless commerce engine.

Returns NotifyTrigger

Unsubscribe

Call signatures

  • (): void;