Skip to main content
A Play is a versioned workflow that Deepline executes. It takes input, performs work, and returns a result. A Play can research accounts, find contact details, evaluate a lead, or update a connected system. Plays combine tools with your rules for using their results. For example, a lead-routing Play can enrich a company, check an account list, select an owner, and prepare a CRM update. The Play defines which evidence is sufficient and what should happen when a source fails or returns no match.

Maintained and custom Plays

Prebuilt Plays supply maintained workflows with defined inputs and outputs. They can combine several providers, apply acceptance rules, and return a common result. A waterfall that tries another source after a miss is one example. The Play’s contract identifies its supported inputs, output fields and usage model. Custom Plays express your own workflow as a default-exported TypeScript function. The function receives the input and uses the imported deepline runtime. An optional exported config declares triggers and other settings. The filename supplies the Play name unless config.name overrides it. They can use prebuilt Plays, individual tools, customer data and external HTTP requests. This lets you reuse maintained enrichment while controlling your selection, review and destination rules. A single-record Play and a batch Play can accept different inputs. A Play that accepts a person profile does not automatically accept a CSV. The prebuilt Play guide explains how to inspect those contracts and links each prebuilt Play’s public page.

A definition, a version, and a run answer different questions

The definition contains the workflow’s code and input contract. A published version makes a specific revision available to named callers and automated triggers. A Play run applies an immutable code snapshot to one input. You can check and run a local file while developing a custom Play. That file run executes the submitted snapshot. Publishing makes a selected revision live and activates its declared triggers. Editing a draft does not change the published version or a run already in progress. Suppose a routing rule changes from country ownership to named-account ownership. Runs from the two versions can assign different owners. Their version identities explain which rule each run used. External data can also change between runs, so version identity and source observation times answer different questions.

The execution graph makes work observable

Deepline presents a Play as a graph of its work. The graph connects input, steps, decisions, datasets and results. During a run, those boundaries help show what started, what finished and where an error occurred. Datasets organize work such as one enrichment per lead. Stable row keys connect inputs, computed columns and errors. A batch can therefore retain successful rows while identifying rows that failed under its configured failure policy. A compact run summary points to those rows rather than embedding the entire file. A Play can return a scalar object, dataset references, or a combination of both. The run graph and retained datasets support inspection. A chart or report can then present the accepted data in a form suited to the business question.

Reuse a Play or launch an independent run

deepline.runPlay composes a compatible scalar child inside the parent’s run. The child’s work appears within the parent graph and shares its run identity. It does not create another independently managed run. Inline children cannot own datasets, CSV processing, event waits or explicit timeouts. Sequential scalar composition can include supported sleeps outside dataset callbacks. The SDK reference defines the placement rules. deepline.runPlayAsync launches an independently published scalar child and returns its run ID. That child can wait for an event or human response. It has its own status, result and cancellation boundary. Its target cannot own a dataset, CSV or runtime sheet. An admitted child continues independently if its parent finishes or is cancelled. This distinction supports two different designs: reuse a calculation inside one run, or give a record its own execution lifecycle. An Engine adds persistent business states when the process spans several runs.

Durable execution and retries are different from exactly-once effects

Deepline records completed work so an interrupted execution can recover it. For new work, explicit freshness settings determine whether eligible completed results can be reused. A fresh lookup and recovery of an interrupted operation serve different purposes. Independent runs can still execute the same provider operation. A stable step label alone does not prevent duplicate external effects or guarantee a free rerun. Destination writes need a supported idempotency key or reconciliation with the destination’s actual state. For example, a timed-out CRM update may already have succeeded. A useful Play can retain the request identity, inspect the CRM record, and decide whether another write is needed.

A trigger supplies the occasion, not another implementation

Manual calls, webhooks, cron schedules and supported SQL listeners can start a Play. Play triggers determine when the workflow receives input. The Play determines what to do with it. A Monitor supplies an upstream event feed. A SQL listener can react to its accepted Database rows. Several consumers can use the same feed while applying different business rules.

Execution success is only one layer of success

A completed run means the handler finished. Its result can still contain a legitimate no-match outcome or rows that need review. The Play defines whether an email, company match or proposed update meets your acceptance rule. Keeping evidence, decisions and destination outcomes separate makes those results useful. Accepted research can remain valid even when a later notification fails. Run status, business state and external write status each explain a different part of the work.

Continue learning