Skip to main content

Bifrost Playbook

Use the Bifrost Playbook card to define a playbook: a routine of steps that call Bifröst operations in Business Central or transform data locally, where the result of one step can feed the next. On the card you set the steps, the conditions that gate and branch them and the request the first step receives, run the playbook, and schedule it. The card also shows how each step did in the most recent run.

Open it from Bifrost Playbooks.

General​

FieldDescription
CodeThe unique code of the playbook.
DescriptionWhat the playbook does.

Steps​

The Steps part lists the steps in the order they run. Choose Message in Step Kind to call an operation (the Message Type column), or Transform to prepare data locally. For each step, choose whether it repeats for every element of an array from an earlier step, what counts as a check rather than an action, and which step comes next on success and on failure. Steps that repeat over an array are indented, and disabled steps are dimmed. The Last Run column shows how each step did in the most recent run: ✓ completed, ✗ failed, – skipped, · not run.

See Playbook Steps for every column.

Step Conditions​

The Step Conditions part shows the conditions of the step selected in Steps. A Start condition decides whether the step runs, a Success condition picks the next step, and an Error condition fails the run without changing the path. All conditions in a group must be true; one true group is enough.

See Step Conditions for every column.

Transform Fields​

The Transform Fields part shows the mappings for the step selected in Steps. Use it with a Transform step to prepare the data a later step needs. Each mapping puts a value at a target path in a new JSON object. It changes the playbook's data, without changing Business Central records.

FieldDescription
Target PathWhere to put the value in the result. Use dots to separate nested fields, and give each mapping a distinct target.
Source PathWhere to read the value in the step's input, or an @ path to a value the run has already collected. Not needed for Constant.
OperationCopy keeps the value and its type; Constant uses Argument 1 as text; Negate changes the sign of a numeric value; Replace Text replaces matching text, with case sensitivity.
Argument 1The text for Constant, or the text to find for Replace Text. The search text must not be empty.
Argument 2The replacement text for Replace Text.

Add at least one mapping. Edit the step's input in the Playbook Template Editor, then use the result in a later step as you would an operation's answer.

Schedule​

FieldDescription
ScheduledShows whether the playbook has an orchestrator entry that runs it on a schedule.

Initial Request​

FieldDescription
Initial Request JSONThe JSON passed to the first step when a run is started without a request of its own, for example with Run Now or on a schedule. Edit it directly in the field.

Request templates​

A Message step builds its request from the template shown in the Request Template FactBox. For a Transform step, the same template supplies the input to its field mappings. A template can use values the run has collected so far with an @ path:

  • @10.customerNo is a value kept from the answer of step 10.
  • @_sys.today, @_sys.workDate, @_sys.thisMonthStart, @_sys.companyName and @_sys.userId are values every run provides: dates, the company and the user who runs it.
  • When a JSON value is only an @ path, the value keeps its type (a number, an object or a list). When the @ path sits inside other text, the value is written into the text.

Edit a template in the Playbook Template Editor, which Edit in the FactBox opens. See Request Template for the FactBox.

FactBoxes​

FactBoxDescription
Request TemplateThe request or transform input of the step selected in Steps, with actions to edit, download and upload it.
Last ExecutionA summary of the most recent run: status, start, duration, counters and any error. See Last Execution.
Chat via BifrostChat about the playbook open on this card. The chat uses that playbook as its context. The FactBox is hidden for a user without chat permission, and when no chat provider is configured. See Chat via Bifrost.

Actions​

ActionDescription
Run NowRuns the playbook immediately, in the foreground, with the Initial Request JSON. When the run ends, a message gives its status and Last Execution is updated.
ScheduleOpens Schedule Playbook, which creates an orchestrator entry that runs the playbook on a recurring schedule. Available only while the playbook is not scheduled.
Orchestrator EntryOpens the playbook's orchestrator entry, where you change the schedule, block it or run it once. Available only when the playbook is scheduled.
Execution LogOpens the Playbook Execution Log filtered to this playbook.

Tips​

  • A playbook runs with the permissions of the user who runs it; a scheduled playbook, with those of the user its job queue entry runs as.
  • Try a playbook with Run Now before you schedule it: with a case where there is work to do, one where there is none, and one with a bad input.
  • The operations a step can call, and what each one needs, are listed in Available Message Types on Bifrost Setup.