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.
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
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.
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.
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.
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.
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 selectorsFAQ
Last updated
Was this helpful?

