You can use [data separation by scope](🔗) to separate different business areas, such as brands or markets, to separate the tracked user's behavior. Each user can have a separate profile and history for interactions per scope, so that personalization and marketing activities are relevant to the behavior within the context of that scope. A regional manager can access only his/her market or brand according to their responsibilities, while a global manager can access several scopes.
Tracking events sent from a multi-site solution are isolated in its different sites. The default implementation for a scope when installing _EPiServer.Tracking.Cms_ is the `SiteId
`Â for the site from which the tracking event was sent. Track events sent without a scope are added to the default scope.
See [Install and configure tracking for Profile Store](🔗) how to configure scopes for multi-site solutions.
Note
The scope needs to be created before manipulating (create, update, and delete) or fetching (get, sort, search) profiles in the scope with Profile Store API.
## Scope properties
The scope object contains the following property fields.
`
ScopeId [string]
` – The unique identifier of the scope. You can specify up to 64 characters. Start the string with a letter or number and it must contain a letter, number, and underline (\_) only. Do not use capital letters.`
Description [string]
` – Optional. You can specify a meaningful description of the scope of up to 256 characters.
**Example**
### Default scope
There is a default scope named default in each environment. Default scope cannot be updated or removed.
### Limitation
Profile Store API only supports 20 custom scopes in each environment.
## Scope methods
Column Title | Column Title | Column Title |
GET | api/v1.0/scopes/ | Returns HTTP 200 OK with all the scopes available in the environment. Also, default scope is added at the end of the list. |
Example of response body:
Column Title | Column Title | Column Title |
GET | api/v1.0/scopes/{scopeid} | - Returns HTTP 200 OK with the scope in the response body, for the ScopeId provided. - Returns 404 NOT FOUND if no scope with the ScopeId was found. |
Example of response body:
Column Title | Column Title | Column Title |
PUT | api/v1.0/scopes/{scopeid} | - Replaces an existing scope, or creates a new one if no scope with the specified ScopeId was found. - Returns: - HTTP 201 CREATED if scope with ScopeId was not found, so it was created. - HTTP 200 OK when a scope was found and replaced (same response as GET method). - HTTP 400 BAD REQUEST if there are more than 20 custom scopes are created in the environment, or if you include the ScopeId in the body. - HTTP 400 BAD REQUEST if attempt to replace default scope. |
Example of request body: