# UiPath.Studio.Activities.Api.ScopedActivities

> In this section you can find more information on how to build activities using **UiPath.Studio.Activities.Api.ScopedActivities**.

In this section you can find more information on how to build activities using **UiPath.Studio.Activities.Api.ScopedActivities**.

## IExclusiveScopedActivitiesService
:::note
This feature was introduced in UiPath.Studio.Activities.Api v21.4.
:::

Exposes the functionality of filtering Command Palette activities based on a current scope.

### Methods

#### void AddExclusiveScopedActivities(Type scopeActivity, IReadOnlyCollection&lt;Type&gt; exclusiveActivitiesCollection)

Adds a list of suitable activity types to the specified scope type.

| Parameter Type | Parameter Name | Description |
| --- | --- | --- |
| Type | scopeActivity | Scope activity type. |
| `IReadOnlyCollection<Type>` | exclusiveActivitiesCollection | List of suitable activities. |

## IScopedActivitiesService
:::note
This feature was introduced in UiPath.Studio.Activities.Api v20.4.
:::

Exposes the functionality of associating scope activity types with their suitable activity types, creating a connection between a scope activity and the activities that work within that scope, for example [Excel Application Scope](https://docs.uipath.com/activities/docs/excel-application-scope) and Excel activities.

When clicking **Add Activity**![](https://dev-assets.cms.uipath.com/assets/images/sdk/sdk-image-plus_sign-4e6b3e8e-8e9127b9.png) inside a custom scope activity to search for and add activities, the activities which fit the current scope appear at the top of the list of suggestions offered by the **Command Palette**.

### Methods

#### void SetScopedActivity(Type scopeActivity, Type activity)

Adds a pair made from a scope activity and an activity that is suitable to that scope.

| Parameter Type | Parameter Name | Description |
| --- | --- | --- |
| Type | scopeActivity | Scope activity type. |
| Type | activity | Suitable activity type. |

#### void SetScopedActivities(Type scopeActivity, IReadOnlyCollection&lt;Type&gt; activitiesCollection)

Adds a list of suitable activity types to the specified scope type.

| Parameter Type | Parameter Name | Description |
| --- | --- | --- |
| Type | scopeActivity | Scope activity type. |
| `IReadOnlyCollection<Type>` | activitiesCollection | List of suitable activities. |
