Developers

Journey manager

API reference

@nlxai/journey-manager

Interfaces

References

default

Renames and re-exports run

Type Aliases

HandlerArg

Ƭ HandlerArg: SimpleHandlerArg & { triggeredSteps: TriggeredStep[] }

Used for some more advanced callbacks

Defined in

journey-manager/src/configuration.ts:50


Method

Ƭ Method: "AltText" | "DisplayValue" | "LabelText" | "PlaceholderText" | "Role" | "TestId" | "Text" | "Title" | "QuerySelector"

Matching method

Defined in

journey-manager/src/queries.ts:10


Triggers

Ƭ Triggers: Record<StepId, Trigger>

A record of triggers

Defined in

journey-manager/src/trigger.ts:36


StepId

Ƭ StepId: string

Step ID

Defined in

journey-manager/src/trigger.ts:65

Variables

iconUrls

Const iconUrls: Object

Icon URL's

Type declaration

NameTypeDescription
supportAgentstringSupport agent icon
callEndstringCall end icon
multimodalstringMultimodal icon

Defined in

journey-manager/src/ui/components/icons.tsx:12

Functions

run

run(props): Promise<RunOutput>

Run the multimodal journey

Parameters

NameTypeDescription
propsRunPropsThe run configuration object

Returns

Promise<RunOutput>

an promise of an object containing a teardown function and the multimodal client.

Defined in

journey-manager/src/index.ts:84

Interfaces

Interface: ButtonConfig

Button configuration

Properties

label

label: string

Button label

Defined in

journey-manager/src/configuration.ts:62


confirmation

Optional confirmation: string

Button confirmation: if present, the button click handler only triggers after the confirmation button is hit

Defined in

journey-manager/src/configuration.ts:66


iconUrl

Optional iconUrl: string

Icon URL

Defined in

journey-manager/src/configuration.ts:70


onClick

onClick: (config: HandlerArg) => void

Click handler

Type declaration

▸ (config): void

Parameters
NameType
configHandlerArg
Returns

void

Defined in

journey-manager/src/configuration.ts:74

Interface: EncodedQuery

Encoded query

Properties

name

name: Method

Query name

Defined in

journey-manager/src/queries.ts:60


target

target: string | SerializedRegex

Query target

Defined in

journey-manager/src/queries.ts:64


options

options: null | Record<string, boolean | SerializedRegex>

Query options

Defined in

journey-manager/src/queries.ts:68


parent

parent: null | EncodedQuery

Query parent

Defined in

journey-manager/src/queries.ts:72

Interface: RunOutput

Created by run.

Properties

teardown

teardown: () => void

Stop running the journey, removing all event listeners

Type declaration

▸ (): void

Returns

void

Defined in

journey-manager/src/index.ts:72


client

client: Client

The regular multimodal SDK client

Defined in

journey-manager/src/index.ts:76

Interface: RunProps

Configuration for the run method

Properties

config

config: Config

The regular multimodal configuration

Defined in

journey-manager/src/index.ts:45


ui

Optional ui: UiConfig

UI configuration

Defined in

journey-manager/src/index.ts:49


triggers

Optional triggers: Triggers

The triggers dictionary, downloaded from the Dialog Studio desktop app. If triggers are not provided, they will be fetched from the CDN.

Defined in

journey-manager/src/index.ts:54


onDigression

Optional onDigression: (client: Client) => void

Digression detection callback

Type declaration

▸ (client): void

Parameters
NameType
clientClient
Returns

void

Defined in

journey-manager/src/index.ts:58


onStep

Optional onStep: (stepId: string) => void

Runs when a step is triggered, used primarily for debugging

Type declaration

▸ (stepId): void

Parameters
NameType
stepIdstring
Returns

void

Defined in

journey-manager/src/index.ts:62

Interface: SerializedRegex

Serialized regex

Properties

regexp

regexp: string

Regex body

Defined in

journey-manager/src/queries.ts:46


flags

flags: string

Regex flags

Defined in

journey-manager/src/queries.ts:50

Interface: SimpleHandlerArg

The argument for callbacks

Properties

sendStep

sendStep: (stepId: string, context?: Context) => Promise<void>

A function to send steps to NLX.

Type declaration

▸ (stepId, context?): Promise<void>

Parameters
NameType
stepIdstring
context?Context
Returns

Promise<void>

Defined in

journey-manager/src/configuration.ts:46

Interface: Theme

Visual theme for the UI

Properties

colors

Optional colors: ThemeColors

UI colors

Defined in

journey-manager/src/configuration.ts:28


fontFamily

Optional fontFamily: string

Font family

Defined in

journey-manager/src/configuration.ts:32

Interface: ThemeColors

Theme colors

Properties

primary

Optional primary: string

Primary color

Defined in

journey-manager/src/configuration.ts:10


primaryHover

Optional primaryHover: string

Primary color on hover

Defined in

journey-manager/src/configuration.ts:14


highlight

Optional highlight: string

Color for trigger highlights

Defined in

journey-manager/src/configuration.ts:18

Interface: Trigger

A single trigger

Properties

event

event: "click" | "pageLoad" | "appear" | "enterViewport"

Event

Defined in

journey-manager/src/trigger.ts:14


query

Optional query: EncodedQuery

A query identifying the element

Defined in

journey-manager/src/trigger.ts:18


once

Optional once: boolean

A flag specifying whether the trigger should only fire a single time

Defined in

journey-manager/src/trigger.ts:22


highlight

Optional highlight: boolean

A flag specifying whether the trigger should highlight. Only applicable to click triggers.

Defined in

journey-manager/src/trigger.ts:26


urlCondition

Optional urlCondition: UrlCondition

URL condition

Defined in

journey-manager/src/trigger.ts:30

Interface: TriggeredStep

Represents a load step that has already been triggered.

Properties

stepId

stepId: string

step id

Defined in

journey-manager/src/configuration.ts:38


url

url: string

the URL of the page it triggered on

Defined in

journey-manager/src/configuration.ts:40

Interface: UiConfig

Full UI configuration

Properties

title

title: string

Drawer title

Defined in

journey-manager/src/configuration.ts:84


subtitle

subtitle: string

Drawer subtitle

Defined in

journey-manager/src/configuration.ts:88


highlights

Optional highlights: boolean

Render highlights

Defined in

journey-manager/src/configuration.ts:92


iconUrl

Optional iconUrl: string

URL for the button icon

Defined in

journey-manager/src/configuration.ts:101


theme

Optional theme: Theme

UI theme

Defined in

journey-manager/src/configuration.ts:105


onEscalation

Optional onEscalation: (config: SimpleHandlerArg) => void

Escalation handler

Type declaration

▸ (config): void

Parameters
NameType
configSimpleHandlerArg
Returns

void

Defined in

journey-manager/src/configuration.ts:109


escalationButtonLabel

Optional escalationButtonLabel: string

Escalation button label

Defined in

journey-manager/src/configuration.ts:113


escalationConfirmation

Optional escalationConfirmation: string

Escalation confirmation

Defined in

journey-manager/src/configuration.ts:117


onEnd

Optional onEnd: (config: SimpleHandlerArg) => void

End handler

Type declaration

▸ (config): void

Parameters
NameType
configSimpleHandlerArg
Returns

void

Defined in

journey-manager/src/configuration.ts:121


endButtonLabel

Optional endButtonLabel: string

End button label

Defined in

journey-manager/src/configuration.ts:125


endConfirmation

Optional endConfirmation: string

End confirmation

Defined in

journey-manager/src/configuration.ts:129


onPreviousStep

Optional onPreviousStep: (config: HandlerArg) => void

On previous step

Type declaration

▸ (config): void

Parameters
NameType
configHandlerArg
Returns

void

Defined in

journey-manager/src/configuration.ts:133


previousStepButtonLabel

Optional previousStepButtonLabel: string

Previous step button label

Defined in

journey-manager/src/configuration.ts:137


buttons

Optional buttons: ButtonConfig[]

Custom buttons

Defined in

journey-manager/src/configuration.ts:141


nudgeContent

Optional nudgeContent: string

If this is set, the journey manager will show a call-to-action tooltip to invite the user to interact with the overlay pin. it will be shown only if the user never interacts with the overlay pin, after tooltipShowAfterMs milliseconds.

Defined in

journey-manager/src/configuration.ts:146


nudgeShowAfterMs

Optional nudgeShowAfterMs: number

Show nudge tooltip after this many milliseconds

Defined in

journey-manager/src/configuration.ts:150


nudgeHideAfterMs

Optional nudgeHideAfterMs: number

Hide nudge tooltip after it's been shown for this many milliseconds

Defined in

journey-manager/src/configuration.ts:154

Interface: UrlCondition

URL match condition

Properties

operator

operator: "contains" | "matches_regex" | "smart_match"

Condition operator

Defined in

journey-manager/src/UrlCondition.ts:8


value

value: string

Condition value

Defined in

journey-manager/src/UrlCondition.ts:12