Skip to main content

Who/Where/When

No, it's not a new rom-com. Who/Where/When are the principles underpinning Command AI's user targeting system. Targeting refers to making sure the right experience show for the right users at the right time.

Proper targeting is a core principle behind how Command AI makes nudges non-annoying. Nothing is worse for a user than seeing a pop-up that is completely irrelevant to them and interrupts their flow.

This is one of those philosophical docs (if you've read our docs before you're probably no stranger to these).

Who

Who refers to which users have access to the experience. The easiest way to define who conditions is via Audiences. You can also use the following properties to create Who targeting rules specifically for a single Nudge.

tip

If you are using Who targeting, be sure that you are passing a userId when starting Command AI to identify which user is currently logged in. Otherwise, the user is considered "anonymous" and many Who conditions won't take effect.

Built-in properties

These are tracked for you by Command AI, without any setup required on your side.

ConditionDescriptionExample use case
First seenWhen Command AI first saw the user, measured in days relative to present. This is calculated across devices (not just the current browser).Show a nudge to users who are relatively new in their journey in your product. For example, you might restrict a nudge announcing a “Product Basics” webinar to your new users.
Last seenWhen Command AI last saw the user, measured in days relative to present. This is calculated across devices (not just the current browser).Users who haven’t been seen in a while are more likely to be disengaged and candidates for churn. You could show users who haven’t showed up in a while a nudge that encourages them to meet with a customer success team member. Or you could show them a Checklist to reintroduce them to your app’s coolest features.
SessionsThe number of sessions that Command AI has seen the user create. A session starts when the user loads or re-loads a page where Command AI is installed, or creates a new tab. A session ends when the page either refreshes or closes.Construct an audience that consists of users who have been more or less active.
BrowserThe browser the user is using to access your product.Show browser-specific announcements, such as features that are only available to specific browsers, or security-related notifications for older browsers.
LanguageThe user's system language.Customize the language that users see in Command AI.
Operating systemThe operating system where the user is browsing your product.Show feature announcements that are specific to an operating system. For example, updates to your Mac app should only be communicated to users currently using your product on Mac.
Device typeDesktop, mobile, or other (like a tablet).Show device-specific announcements and other nudges. Often, nudges for mobile will be created separately than nudges for desktop, because of the different user stories that are common on each platform.
A/B testThe A/B test group that a user has been assigned based on A/B tests you have created in Command AI.Conduct an A/B test using just Command AI.

Command AI interactions

ConditionDescriptionExample use case
IntentIntent represents something the user cares about, as evidenced by three sources: Copilot chats, HelpHub searches, and Spotlight searches. To identify the user's intent, Command AI will semantically match keywords you use in this field with a user's intent history.Show a conversion-oriented campaign to users who have indicated an interest in upgrading by asking about upgrading directly, or features available in premium tiers.
Nudge interactionsWhether a user viewed, completed, or dismissed a specific nudge. In this context, viewed means “was shown”, regardless of whether they completed, dismissed, or didn’t interact with.Nudge interaction rules are useful when you’re creating a nudge that is related to a nudge you may have shown in the past. Let’s say you want to show off a feature which you believe to be correlated with conversions, but you’ve created nudges related to this feature in the past. Proactively nudging users toward a feature multiple times is annoying. You can avoid doing these by targeting your new nudge only to users who hadn’t seen the old one.
Survey responsesAny response a user has made to a survey created with Command AI.Follow up with users who submitted high NPS scores to request a positive review or testimonial.
Article viewsArticles that a user has viewed in HelpHub.Article views are another window into intent. A common use case is to provide feature update announcements to users who are interested in a feature, as evidenced by reading an article about it.

Custom properties

ConditionDescriptionExample use case
User propertyTarget users based on their associated properties. These properties can be set and updated by calling boot.Showing a nudge to users who are reaching the end of their trial. For this example, you'd need to pass the 'Trial end date' for each user.
MetadataValues provided to Command AI via the .boot SDK method and available on the client-side.Similar to user properties, just scoped to the client-side only.
tip

Metadata fields are client-side only, so they won't appear in the dropdowns in app.command.ai (unless they are referenced via other nudges). However, even though they don't pre-populate, they will still work for targeting.

Where

Where refers to the pages where the experience is relevant. There are two ways to determine where conditions:

By URL

You can target URLs specifically, or construct conditions that could match multiple URLs using different types of rules (”includes”, “does not include”, “starts with”) as well as regular expressions. We recommend using URL rules when possible, because they’re easiest to get right. There are two URL conditions you can use:

  • Current URL Path - any part after the domain (app.command.ai/nudges/1234)
    • commonly used for targeting pages
  • Current Domain - any part of the domain (app.command.ai/nudges/1234)
    • often used for targeting products or customers

Note that for any URL input field, you can use curly braces ({{}}) to inject metadata into the URL. This is helpful when your URLs are dynamic (for example, they may reference the user's organization). A working example of this in a relative URL: /organization/{{metadata.orgId}}/users.

By element presence

By the presence of an element: sometimes, digital products change “state” without a corresponding change in a URL. For example, says a user opens up a modal and you want to show a product tour that explains the modal. Often, opening up a modal doesn’t trigger a URL change.

This tour will appear only when an element is present on the page.

note

Command AI has two conditions you can set for triggering a nudge if an element is present:

  • Where: This option is checked only, whenever the specified When section happens. Use this if the element exists on page load.
  • When: This option is checked continually every few seconds. Use this if the element only exists after user interaction (like a modal)

When

This is the critical piece that differentiates meh targeting from perfect targeting. Often, showing a nudge experience to a user as soon as who and where conditions are satisfied results in a suboptimal experience. For example, the user might be trying to get something done quickly. As soon as they open up a page to do that thing, they are confronted with a product tour that invites them for a quick tour. How annoying is that?

There are a few ways to configure When conditions.

What triggers are available for nudges?

Out-of-the-box, Command AI includes several types of triggers: basic, smart, and custom.

Basic Triggers

  • Immediately: display as soon as the page loads
  • None: why have a None trigger? Does it do nothing? Exactly! The none trigger means this nudge won't trigger on its own. It can be still triggered by other experiences though, like Copilot suggestions, Magic tour links, or even checklists and nudges.
  • After time on page: useful for waiting just a little bit of extra time before displaying a nudge
  • Scheduled: Show the nudge on a recurring basis until the limit is satisfied. For example, you might show an NPS survey once a month until a user completes it. The nudge will be re-surfaced at the scheduled interval from the time the nudge was most recently interacted with.
  • When element appears: show when another element appears on screen

Smart Triggers

  • Smart delay: show the experience when the user is not actively doing something else in your product. This prevents the experience getting in the user's way, resulting in an immediate close out.
  • Rage click: rage clicks capture frustration. This trigger is an especially good time to throw a survey or launch a nudge that redirects the users' frustration to a help article, walkthrough video, or to Copilot or HelpHub. Rage click gets triggered when we detect users clicking on the screen in rapid succession.
  • User confusion: there are certain behavioral patterns that indicate the user is lost. This trigger is a great time to show walkthrough content or direct the user to an assistance experience.

Custom Triggers

  • By event: events are used to tell Command AI when certain, well, events, happen in the user’s session. For example, you could send an event to Command AI when the end-user interacts with a specific feature or creates new content. Events can be sent via integrations. Segment is one of our most popular integrations, or you can manually send events using the Command AI SDK.

Note that only events sent to the client-side (excluding our server-side Segment integration) can be used for targeting.

note

Events sent to Command AI with the Command AI SDK are sent one-way to Command AI only. You'll still want to send the event to your own analytics trackers, as Command AI will not forward these events, even when you use addEventSubscriber or one of our outbound analytics integrations.

Start Page

Start pages are so cool - they'll teleport users to a location before a nudge begins. That's important! Many nudges require the right context or are even attached to specific UI on the screen. Start pages allow a nudge to be triggered from any page and yet display only on a specific page.

Modals and popovers require a Where condition

Start pages will only be used if a user triggers a nudge on a page that doesn't match the Where condition. Pin nudges automatically have a Where condition set - the element must be on the page. However, Modals and popovers don't have a Where condition pre-set so make sure one is configured with the Start page - you'll need both.

There are various ways to trigger a nudge from another experience, including but far from limited to Copilot, the HelpHub additional resources section, and Checklist item CTAs.

Let's take a look at a quick example:

  1. I'd like a Product Tour nudge that guides users through our new /shop page, and I know this tour will only work on pages that include /shop in the URL.
Relative vs absolute URLs

In general, use relative URLs because they will work across different environments:

  • absolute URL: (https://app.command.ai/shop)
  • relative URL: (/shop)

Relative URLs like /shop will automatically work across all of these possible environments:

  • staging.command.ai
  • customer_name.command.ai
  • app.command.ai
  1. To make sure the nudge only displays when a user is on pages that include /shop, I've set a Current URL Path condition that includes /shop.
  2. I'd also like to display this nudge via a Checklist, but the checklist could be displayed on any page. If a user starts the nudge while on a page that's not in the shop, it won't work!
  3. To fix that, I can add a Start Page that will teleport users to the right page before the nudge displays!

FAQ

I have a native popup that also triggers at the same time. How can I make sure the CB nudge appears later?

Great question (pat my own back)! There's several approaches you could take:

  • Migrate the native nudge to a CB nudge: Great for simple popups, since CB will automatically sequence nudges and ensure they don't appear at the same time.
  • Check for the native popup to be dismissed: Easy method. You'll just add a Where condition of "DOM element not on page"
  • Check for native popups in code, and then trigger the nudge:: Check out our triggerNudge() sdk method for info.