RedirectionTrigger (Commerce Engine)

This is for:

Developer

The RedirectionTrigger controller handles redirection triggers. A Redirection trigger query pipeline rule lets you define a URL to redirect the user’s browser to 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 RedirectionTrigger controller.

Properties

  • redirectTo: string

    The url used for the redirection.

Initialize

buildRedirectionTrigger

Creates a RedirectionTrigger controller instance.

Parameters

  • engine: CommerceEngine

    The headless commerce engine.

Returns RedirectionTrigger

Unsubscribe

Call signatures

  • (): void;