User Guide
Other documentationsDemoCommunity
  • Forest Admin
  • Getting Started
    • Setup guide
    • Master your UI
      • The Table View
      • Using the Layout Editor mode
        • Customize the Table View
        • Customize the Details View
        • Customize your creation and edition forms
      • Build a Summary View
      • Build an Explorer View
      • Using Smart Views
    • Tutorials
  • Collections
    • Manage your collection settings
    • Customize your fields
      • Edit widgets
      • Display widgets
      • Options
      • Default actions on relationships
    • Actions
      • Edit a record
      • Create a record
      • Using Smart Actions
    • Segments
    • Scopes
    • Performance
  • Workspaces
    • Introduction to Workspaces
    • Using Workspaces
      • Sharing your own Workspace URL with pre-selected data
      • Editing records with field components
    • Building a workspace
      • Workspace Incident Management example
      • Workspace KYC example
      • Transactions Monitoring & Fraud Management example
      • Fleet Management example
  • dashboards
    • Charts
      • Create a chart
      • Display record-specific charts in Analytics
  • Other tabs
    • Collaboration
      • Communicate with Notes
      • Approval requests
      • Inboxes
    • Activity
  • Integrations
    • Metabase
  • Project settings
    • General tab
    • Environments tab
    • Teams, Users & Permissions
      • Create and manage a team
      • Add and manage users
      • Manage roles and permission levels
      • Export users history
    • Security tab
      • SCIM integration with OneLogin
      • SCIM integration with Okta
      • Manual SCIM integration with Okta
    • Other project settings
      • Interface tab
      • Billing tab
    • Organizations
      • Organization settings
        • Configure SSO with AWS IAM
        • Configure SSO with Azure AD
        • Configure SSO with Google
        • Configure SSO with Okta
        • Configure SSO with OneLogin
Powered by GitBook
On this page
  • What is a scope?
  • How to set up a scope
  • Using a dynamic scope

Was this helpful?

  1. Collections

Scopes

PreviousSegmentsNextPerformance

Last updated 1 year ago

Was this helpful?

What is a scope?

A scope is a filter which applies to a collection and all its segments.

It is useful in that it can be used to control what data is available to users. More specifically, scopes can be set up to filter data dynamically on the current user.

Scopes are applied to the entire application excluding global Smart Actions, API & SQL charts and Collaboration & Activities.

How to set up a scope

To access the scope management page for a given collection, you'll need to using the Layout editor mode.

Once on the Scopes tab (1), you can set up your filter (2) and save (3). In the above screenshot, only customers with an email ending with @forestadmin.com will be displayed in the collection and all of its segments. All other customers won't be accessible.

Using a dynamic scope

Imagine a situation where you have several Operations teams each specialized in a specific country's operations:

  • France team handles customers from France

  • Germany team handles customers from Germany

  • ...

If you set up the following scope...

...then Marc who belongs to the France team will only see customers from France. However, Louis who belongs to the Germany team will only see customers from Germany.

Dynamic variables

In the example above, we used the team name to filter out what the user sees: $currentUser.team.name

Here the exhaustive list of available dynamic variables:

Syntax
Result

$currentUser.id

The id of the current user

$currentUser.firstName

The first name of the current user

$currentUser.lastName

The last name of the current user

$currentUser.fullName

The full name of the current user

$currentUser.email

The email of the current user

$currentUser.team.id

The id of the team of the current user

$currentUser.team.name

The name of the team of the current user

$currentUser.tags.your-tag

The value associated with key your-tag for the current user, if any.

Using user tags

The above example is only possible if your data matches your users' details (email, team, etc). It's likely that it won't always be the case. This is why we've introduced user tags:

Using the above scope, the above user would see 1, 2 but not 3:

User tags are and allow you to freely associate your users to a value which will match against your data using the $currentUser.tags.your-tag dynamic variable:

set from each user's details page
go to that collection's settings page
After the scope has been set up