@ciptex-race/journey
TypeScript icon, indicating that this package has built-in type declarations

2.28.0 • Public • Published

Race Journey V2

Terminology

Journey: Journeys are individual workflows that you create. Journey definitions are expressed as instances of a JSON schema.

Execution: An `Execution`` represents a specific run through a Journey. An Execution is active while the user is in the Flow, and it is considered ended when the task is completed.

The Execution resource can be used to retrieve information about existing Executions or to create new Executions for outbound use cases (e.g. surveys, appointment reminders).

Get An Instance of Journey Manager

const manager = JourneyManager.getInstance();

Create a Journey

try {
	const journey = await manager.journeys.create({ });
} catch (error) {
	console.error(error);
}

Fetch an Existing Journey

try {
	const journey = await manager.journeys("JFXXX");
} catch (error) {
	console.error(error);
}

Create a new Execution

try {
	const execution = await manager.journeys("JFXXX").executions.create({ 
        taskSid: "TC123" 
    });
} catch (error) {
	console.error(error);
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ciptex-race/journey

Weekly Downloads

11

Version

2.28.0

License

none

Unpacked Size

8.19 MB

Total Files

121

Last publish

Collaborators

  • matthew.duggan