Module

flow-level

Top-level chain-link surface for the contact-flow module. Each .<setter>(…) call mutates a flow-root field; the chain terminates with ;. The Module and Module namespaces are mutually exclusive, a single script that touches both fails the compile with FlowAndModuleMixed.

Methods

start

start(target: Handle) -> Module

Override the default "first registered block is start" behaviour.

ParameterTypeRequiredDescription
targetHandleyesBlock whose UUID becomes the flow's StartAction.

version

version(version: String) -> Module

Override the default schema version. Decompile only emits this when the wire flow declared a non-default value.

ParameterTypeRequiredDescription
versionStringyesSchema version string. Connect emits "2019-10-30" today.

auto_layout

auto_layout(options?: Map) -> Module

Force a Sugiyama re-layout at compile finalization. Overwrites every block's meta_position regardless of authored values. Call with no arguments for the default layout, or pass an options map (auto_layout(#{ direction: "top-bottom", layer_spacing: 220 })) to tune the layout direction and spacing.

ParameterTypeRequiredDescription
optionsMapnoOptional layout knobs: direction ("left-right" | "top-bottom"), layer_spacing, node_spacing, block_width, block_height. Omit for Connect-friendly defaults; unknown keys are rejected at compile time.

name

name(name: String) -> Module

Set the flow's display name (Metadata.name).

ParameterTypeRequiredDescription
nameStringyesDisplay name shown in the Connect console.

description

description(description: String) -> Module

Set the flow's description (Metadata.description).

ParameterTypeRequiredDescription
descriptionStringyesLong-form description.

type

type(ty: String) -> Module

Set the flow's type tag (Metadata.type).

ParameterTypeRequiredDescription
tyStringyesConnect resource type, "contactFlow", "customerQueue", "contactFlowModule", etc.

status

status(status: String) -> Module

Set the flow's published status (Metadata.status).

ParameterTypeRequiredDescription
statusStringyesConnect-side publish status.

hash

hash(hash: String) -> Module

Set the flow's content hash (Metadata.hash). Connect computes this on save; the builder round-trips whatever the operator provides.

ParameterTypeRequiredDescription
hashStringyesContent hash.

entry_point_position

entry_point_position(x: Number, y: Number) -> Module

Position the flow's entry-point arrow on the canvas.

ParameterTypeRequiredDescription
xNumberyesCanvas X.
yNumberyesCanvas Y.

snap_to_grid

snap_to_grid(value: bool) -> Module

Toggle the snap-to-grid console UI preference.

ParameterTypeRequiredDescription
valueboolyesTrue to snap blocks to the canvas grid.

raw

raw(key: String, value: Dynamic) -> Module

Escape hatch for top-level wire keys the typed surface doesn't model.

ParameterTypeRequiredDescription
keyStringyesTop-level wire key.
valueDynamicyesAny Rhai value; serialized as JSON.