> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.Agents.ITargetsAgent

# \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent">\</a> Interface ITargetsAgent

Namespace: [SuperOffice.WebApi.Agents](SuperOffice.WebApi.Agents.md)\
Assembly: SuperOffice.WebApi.dll

Agent lets you configure targets, and retrieve targets

```csharp theme={null}
public interface ITargetsAgent : IAgentBase, IDisposable
```

#### Implements

[IAgentBase](SuperOffice.WebApi.Agents.IAgentBase.md),
[IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentAsync(RequestOptions)

Set default values into a new TargetAssignment.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<TargetAssignment> CreateDefaultTargetAssignmentAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\&gt;

A blank TargetAssignment

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForCompanyAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForCompanyAsync(RequestOptions)

Returns a default target assignment for the owner company.

```csharp theme={null}
Task<TargetAssignment> CreateDefaultTargetAssignmentForCompanyAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\&gt;

Default target assignment for the owner company.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForCompanyWithDimensionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForCompanyWithDimensionAsync(int, RequestOptions)

Returns a default target assignment for the owner company, for the specified dimension.

```csharp theme={null}
Task<TargetAssignment[]> CreateDefaultTargetAssignmentForCompanyWithDimensionAsync(int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The dimension id to use.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\[]\&gt;

Default target assignments for the owner company.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForCompanyWithYearAndDimensionAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForCompanyWithYearAndDimensionAsync(int, int, RequestOptions)

Returns a default target assignment for the owner company, for the specified year and dimension.

```csharp theme={null}
Task<TargetAssignment[]> CreateDefaultTargetAssignmentForCompanyWithYearAndDimensionAsync(int year, int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`year` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The year from which to retrieve dimension data.

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The dimension id to use.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\[]\&gt;

Default target assignments for the owner company.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForUserGroupAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForUserGroupAsync(int, RequestOptions)

Returns a default target assignment for the specified usergroup.

```csharp theme={null}
Task<TargetAssignment[]> CreateDefaultTargetAssignmentForUserGroupAsync(int userGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The id of the UserGroup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\[]\&gt;

Default target assignment for the specified usergroup.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForUserGroupWithDimensionAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForUserGroupWithDimensionAsync(int, int, RequestOptions)

Returns a default target assignment for the specified usergroup, for the specified dimension.

```csharp theme={null}
Task<TargetAssignment[]> CreateDefaultTargetAssignmentForUserGroupWithDimensionAsync(int userGroupId, int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The id of the UserGroup

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The dimension id to use.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\[]\&gt;

Default target assignment for the specified usergroup.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetAssignmentForUserGroupWithYearAndDimensionAsync\_System\_Int32\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetAssignmentForUserGroupWithYearAndDimensionAsync(int, int, int, RequestOptions)

Returns a default target assignment for the specified usergroup, for the specified year and dimension.

```csharp theme={null}
Task<TargetAssignment[]> CreateDefaultTargetAssignmentForUserGroupWithYearAndDimensionAsync(int userGroupId, int year, int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`userGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The id of the UserGroup

`year` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The year from which to retrieve dimension data.

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The dimension id to use.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\[]\&gt;

Default target assignment for the specified usergroup.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetDimensionAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetDimensionAsync(RequestOptions)

Set default values into a new TargetDimension.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<TargetDimension> CreateDefaultTargetDimensionAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetDimension](SuperOffice.WebApi.Data.TargetDimension.md)\&gt;

A blank TargetDimension

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetGroupAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetGroupAsync(RequestOptions)

Set default values into a new TargetGroup.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<TargetGroup> CreateDefaultTargetGroupAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)\&gt;

A blank TargetGroup

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetRevisionAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetRevisionAsync(RequestOptions)

Set default values into a new TargetRevision.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<TargetRevision> CreateDefaultTargetRevisionAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetRevision](SuperOffice.WebApi.Data.TargetRevision.md)\&gt;

A blank TargetRevision

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_CreateDefaultTargetRevisionHistoryAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultTargetRevisionHistoryAsync(RequestOptions)

Set default values into a new TargetRevisionHistory.
NetServer calculates default values on the entity, which is required when creating/storing a new instance

```csharp theme={null}
Task<TargetRevisionHistory> CreateDefaultTargetRevisionHistoryAsync(RequestOptions requestOptions = null)
```

#### Parameters

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetRevisionHistory](SuperOffice.WebApi.Data.TargetRevisionHistory.md)\&gt;

A blank TargetRevisionHistory

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_DeleteTargetDimensionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteTargetDimensionAsync(int, RequestOptions)

Deletes the TargetDimension

```csharp theme={null}
Task DeleteTargetDimensionAsync(int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the TargetDimension

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_DeleteTargetGroupAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteTargetGroupAsync(int, RequestOptions)

Deletes the TargetGroup

```csharp theme={null}
Task DeleteTargetGroupAsync(int targetGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`targetGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identity of the TargetGroup

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_ExportTargetGroupToExcelAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ExportTargetGroupToExcelAsync(int, RequestOptions)

Renders the given targetgroup to excel, and returns the path to the temporary file.

```csharp theme={null}
Task<ExportArchiveResult> ExportTargetGroupToExcelAsync(int targetGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`targetGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The id of the targetgroup to be rendered to excel.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[ExportArchiveResult](SuperOffice.WebApi.Data.ExportArchiveResult.md)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetAssignmentForYearAndDimensionAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_TargetEntityType\_SuperOffice\_WebApi\_Data\_TargetLevel\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetAssignmentForYearAndDimensionAsync(int, TargetEntityType, TargetLevel, int, int, RequestOptions)

Returns the target assignment for the specified year, entity type and dimension.

```csharp theme={null}
Task<TargetAssignment> GetTargetAssignmentForYearAndDimensionAsync(int targetYear, TargetEntityType entityType, TargetLevel targetLevel, int id, int dimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetYear` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Targeted year

`entityType` [TargetEntityType](SuperOffice.WebApi.Data.TargetEntityType.md)

Targeted entity type

`targetLevel` [TargetLevel](SuperOffice.WebApi.Data.TargetLevel.md)

The level of target the id is referring to.

`id` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Contact, UserGroup or Associate id.

`dimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Id of dimension.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\&gt;

Target assignment for a specified entity for year and entity type. Null if not found.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetAssignmentForYearAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_TargetEntityType\_SuperOffice\_WebApi\_Data\_TargetLevel\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetAssignmentForYearAsync(int, TargetEntityType, TargetLevel, int, RequestOptions)

Returns the target assignment for the specified year and entity type.

```csharp theme={null}
Task<TargetAssignment> GetTargetAssignmentForYearAsync(int targetYear, TargetEntityType entityType, TargetLevel targetLevel, int id, RequestOptions requestOptions = null)
```

#### Parameters

`targetYear` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Targeted year

`entityType` [TargetEntityType](SuperOffice.WebApi.Data.TargetEntityType.md)

Targeted entity type

`targetLevel` [TargetLevel](SuperOffice.WebApi.Data.TargetLevel.md)

The level of target the id is referring to.

`id` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Contact, UserGroup or Associate id.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetAssignment](SuperOffice.WebApi.Data.TargetAssignment.md)\&gt;

Target assignment for a specified entity for year and entity type. Null if not found.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetDimensionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetDimensionAsync(int, RequestOptions)

Gets a specific TargetDimension object.

```csharp theme={null}
Task<TargetDimension> GetTargetDimensionAsync(int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the TargetDimension object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetDimension](SuperOffice.WebApi.Data.TargetDimension.md)\&gt;

TargetDimension

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetDimensionsForEntityTypeAsync\_SuperOffice\_WebApi\_Data\_TargetEntityType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetDimensionsForEntityTypeAsync(TargetEntityType, RequestOptions)

Returns the target dimensions for the given entity type.

```csharp theme={null}
Task<TargetDimension[]> GetTargetDimensionsForEntityTypeAsync(TargetEntityType entityType, RequestOptions requestOptions = null)
```

#### Parameters

`entityType` [TargetEntityType](SuperOffice.WebApi.Data.TargetEntityType.md)

Targeted entity type

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetDimension](SuperOffice.WebApi.Data.TargetDimension.md)\[]\&gt;

Target dimensions for year and entity type.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetGroupAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetGroupAsync(int, RequestOptions)

Gets a specific TargetGroup object.

```csharp theme={null}
Task<TargetGroup> GetTargetGroupAsync(int targetGroupId, RequestOptions requestOptions = null)
```

#### Parameters

`targetGroupId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The identifier of the TargetGroup object

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)\&gt;

TargetGroup

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetGroupForYearAndDimensionAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetGroupForYearAndDimensionAsync(int, int, RequestOptions)

Returns the target group for the specified year and dimension.

```csharp theme={null}
Task<TargetGroup> GetTargetGroupForYearAndDimensionAsync(int targetYear, int dimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetYear` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Targeted year

`dimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Targeted dimension Id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)\&gt;

Target Group for year and dimension.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetGroupForYearAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_TargetEntityType\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetGroupForYearAsync(int, TargetEntityType, RequestOptions)

Returns the target group for the specified year and entity type.

```csharp theme={null}
Task<TargetGroup> GetTargetGroupForYearAsync(int targetYear, TargetEntityType entityType, RequestOptions requestOptions = null)
```

#### Parameters

`targetYear` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Targeted year

`entityType` [TargetEntityType](SuperOffice.WebApi.Data.TargetEntityType.md)

Targeted entity type

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)\&gt;

Target Group for year and entity type.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetGroupIdsAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetGroupIdsAsync(int, RequestOptions)

Returns ids of the target groups that use this dimension.

```csharp theme={null}
Task<int[]> GetTargetGroupIdsAsync(int targetDimensionId, RequestOptions requestOptions = null)
```

#### Parameters

`targetDimensionId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The target dimension id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[int](https://learn.microsoft.com/dotnet/api/system.int32)\[]\&gt;

Target group ids.

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_GetTargetRevisionHistoryAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetTargetRevisionHistoryAsync(int, RequestOptions)

Returns the revision history for a given TargetAssignmentInfo in chronological order.

```csharp theme={null}
Task<TargetRevisionHistory> GetTargetRevisionHistoryAsync(int targetAssignmentInfoId, RequestOptions requestOptions = null)
```

#### Parameters

`targetAssignmentInfoId` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Target assignment info id

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetRevisionHistory](SuperOffice.WebApi.Data.TargetRevisionHistory.md)\&gt;

Target revision history for the given TargetAssignmentInfo

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_SaveTargetDimensionAsync\_SuperOffice\_WebApi\_Data\_TargetDimension\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveTargetDimensionAsync(TargetDimension, RequestOptions)

Updates the existing TargetDimension or creates a new TargetDimension if the id parameter is 0.

```csharp theme={null}
Task<TargetDimension> SaveTargetDimensionAsync(TargetDimension targetDimension, RequestOptions requestOptions = null)
```

#### Parameters

`targetDimension` [TargetDimension](SuperOffice.WebApi.Data.TargetDimension.md)

The TargetDimension that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetDimension](SuperOffice.WebApi.Data.TargetDimension.md)\&gt;

New or updated TargetDimension

### \<a id="SuperOffice\_WebApi\_Agents\_ITargetsAgent\_SaveTargetGroupAsync\_SuperOffice\_WebApi\_Data\_TargetGroup\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveTargetGroupAsync(TargetGroup, RequestOptions)

Updates the existing TargetGroup or creates a new TargetGroup if the id parameter is 0.

```csharp theme={null}
Task<TargetGroup> SaveTargetGroupAsync(TargetGroup targetGroup, RequestOptions requestOptions = null)
```

#### Parameters

`targetGroup` [TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)

The TargetGroup that is saved.

`requestOptions` [RequestOptions](SuperOffice.WebApi.RequestOptions.md)

Override language/culture codes on this request.

#### Returns

[Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1)\<[TargetGroup](SuperOffice.WebApi.Data.TargetGroup.md)\&gt;

New or updated TargetGroup


## Related topics

- [SuperOffice.WebApi.Agents.TargetsAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.TargetsAgent.md)
