RedirectionTrigger (Commerce Engine)

This is for:

Developer
Important

The Headless commerce engine, controllers, and actions are in open beta and therefore under active development. Reach out to your Coveo team for support in adopting them.

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;