For the complete documentation index, see llms.txt. This page is also available as Markdown.

Creating Contextual Actions

Contextual Actions deliver Userlane content automatically when a defined condition is met in the application, instead of waiting for a user to ask for help.

A Contextual Action is a rule that delivers Userlane content when something specific happens in the application. It is not content itself. Guides, tooltips, validators, tags, and tasks are built as usual, and a Contextual Action decides when they show up.

Content that sits in the Assistant only reaches people who go looking for it. A Contextual Action brings it to them instead: a tooltip that appears only on screens where the control it explains is visible, a guide that starts when a form opens, a tag that counts clicks inside one workflow and nowhere else.

Every rule has two halves:

  • Contexts. The conditions being watched. A Context reads as a statement: if Element is Present.

  • Actions. The content delivered when those conditions are true.

How a Contextual Action works

Conditions a Context can check

A Context is a type, an operator, and a value.

Type
What it watches
Operator
Value

Element

One interface element in the application, found by a selector

Is, Is Not

Present, Clicked, Selected, Focused

User

Whether the person is interacting with the application

Is Active, Is Not Active

A duration in minutes or seconds, for Is Not Active

Content

How the person has interacted with a named piece of Userlane content

Is

Completed, Viewed, Closed, Clicked

An element condition responds to what is on the screen. That holds up better than matching the page address, because many applications keep one address while the screen underneath changes completely.

A content condition chains content together: a message after a guide someone finished, or a follow-up after a guide someone closed partway through.

Contexts are reusable

A Context belongs to the application, not to one rule. Editing it updates every rule that uses it from the next page load, so fixing a selector once fixes all of them.

Combining conditions

Match All needs every Context to be true at the same time, and is on by default. Match Any fires as soon as one is true. The setting covers the whole rule, and conditions do not nest inside each other.

What a Contextual Action can trigger

Group
Content type
Behavior available

Delivery content

Guide

Start, optionally from a chosen step

Delivery content

Tooltip

Load, Hide

Delivery content

Validator

Load, Show, Hide

Measurement

Tag

Load

Measurement

Task

Load

Load gets content ready without showing it. A loaded tooltip waits for the element it belongs to, a loaded tag starts counting, and a loaded task comes under the rule.

Pointing a rule at a tag or a task measures one workflow rather than every click on that element everywhere it appears.

What happens after it fires

Delivery content does not always stay. What happens next depends on the content type and on the kind of condition behind it.

Content type
State condition: Present, Selected, Focused
Event or activity condition: Clicked, Is Active, Is Not Active

Tooltip

Hides when the condition stops being true, and comes back if it is met again

Stays for the session

Validator

Hides when the condition stops being true, and stops checking entries

Stays for the session

Tag

Stops counting, and starts again when the condition returns

Counting carries on

Guide

Runs to the end or until the user exits. The condition only decides when it starts

Runs to the end or until the user exits

Task

Measurement carries on once loaded. The condition only decides when it loads

Measurement carries on once loaded

How often it fires

Each Action carries its own frequency. Once is the default. Always fires again every time the conditions are met. A single rule can hold a guide that starts once and a tooltip that comes back every time.

Existing targeting still applies

Audience and display rules on the content decide who is eligible. A Contextual Action only decides the moment.

Unpublished content can be added to a rule, and nothing happens until it is published. You can build the rule first and switch it on later.

Creating a Contextual Action

Contextual Actions are built in the Editor, in the Contextual Actions section.

1

Open Contextual Actions

Select Contextual Actions in the Editor navigation. The list holds every rule for the application. Context List, at the top of the list, opens the conditions saved for that application.

2

Create and name the rule

Select Create. Two empty columns open, Contexts and Actions, and Match All is already on. The name field starts as "Contextual Action" and can be typed over at any point. The rule does nothing until it is activated.

3

Add one or more Contexts

Select Add Context. You can reuse a saved Context, or build a new one from one of the three types.

To build a new one, choose Element, User, or Content, then set the operator and the value. An element is picked directly on the page, and its selector can be adjusted by hand afterward. A User condition asks for a duration when the condition is inactivity. A Content condition takes the specific piece of content first, then the value.

Saving adds the Context to the application's list as well as to this rule.

4

Add one or more Actions

Select Add Action. The dialog searches content by name and filters by published status, so a draft can be found and wired up before it goes live. Expand a content type, pick the item, and add it.

A guide cannot share a rule with other visible content. Tags and tasks show nothing on screen, so they can sit alongside anything.

5

Preview

Preview stays unavailable until the rule has at least one Context. It checks the rule's conditions live and reports which ones are met, without delivering anything to users.

6

Save or activate

Save keeps the rule without switching it on. Activate switches it on, and it starts checking conditions for end users.

What Contextual Actions do not do

  • No history. Content conditions look at the session in progress. A condition such as "has ever completed this guide" is not available.

  • One guide at a time. A rule that starts a guide cannot also deliver other visible content. Measurement content is the exception.

  • Tags cannot depend on user activity. A tag counts clicks, and a click contradicts an inactivity condition.

  • No override of targeting. A rule cannot show content to someone whom audience or display rules exclude.

  • No nesting. Match All and Match Any apply across the whole rule.

Relevant articles

Creating guidesCreating tooltipsCreate a tag in the EditorTargetingManage selectors

FAQ

What is a Contextual Action?

A Contextual Action is a rule that delivers Userlane content automatically when a defined condition is met in the application. It combines one or more Contexts, which are the conditions, with one or more Actions, which are the content to deliver.

Does a Contextual Action replace audience and display rules?

No. Audience and display rules on the content decide who is eligible. A Contextual Action decides when that content appears for the people who already qualify.

Can unpublished content be added to a Contextual Action?

Yes. A draft can be added as an Action and the rule built around it. Nothing reaches users until the content is published.

Can a guide and a tag sit in the same Contextual Action?

Yes. Tags and tasks show nothing on screen, so they fire alongside a guide. Other visible content cannot share a rule with a guide.

What happens when a condition stops being true?

Tooltips, validators, and tags respond to the change. A tooltip or validator triggered by a state condition hides, and a tag stops counting. Guides and tasks carry on.

Last updated

Was this helpful?