> ## 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.QuoteAgent

# \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent">\</a> Class QuoteAgent

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

Services for the Quote Management feature, part of the Sale module

```csharp theme={null}
public class QuoteAgent : AgentBase, IQuoteAgent, IAgentBase, IDisposable
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[AgentBase](SuperOffice.WebApi.Agents.AgentBase.md) ←
[QuoteAgent](SuperOffice.WebApi.Agents.QuoteAgent.md)

#### Implements

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

#### Inherited Members

[AgentBase.\_json](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__json),
[AgentBase.\_binary](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__binary),
[AgentBase.\_config](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__config),
[AgentBase.\_client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__client),
[AgentBase.\_disposeClient](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase__disposeClient),
[AgentBase.Merge(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Merge_SuperOffice_WebApi_RequestOptions_),
[AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromStream_System_Net_Http_HttpMethod_System_String_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_BuildRequestFromObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.ParseAuthorization(IAuthorization)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseAuthorization_SuperOffice_WebApi_Authorization_IAuthorization_),
[AgentBase.CancelRequest()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_CancelRequest),
[AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObject_System_Net_Http_HttpMethod_System_String_System_Object_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequestObjectWithStream_System_Net_Http_HttpMethod_System_String_System_Object_System_IO_Stream_SuperOffice_WebApi_WebApiOptions_System_String_),
[AgentBase.SendRequest(HttpRequestMessage, RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_SendRequest_System_Net_Http_HttpRequestMessage_SuperOffice_WebApi_RequestOptions_),
[AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ThrowOnResponseErrorAsync_System_Net_Http_HttpRequestMessage_System_Net_Http_HttpResponseMessage_),
[AgentBase.ParseResponse\<T\&gt;(HttpResponseMessage)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ParseResponse__1_System_Net_Http_HttpResponseMessage_),
[AgentBase.Finally(RequestOptions)](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Finally_SuperOffice_WebApi_RequestOptions_),
[AgentBase.Dispose()](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Dispose),
[AgentBase.Configuration](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Configuration),
[AgentBase.Client](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_Client),
[AgentBase.HasRunningRequest](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_HasRunningRequest),
[AgentBase.ClientCancellationTokenSource](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ClientCancellationTokenSource),
[AgentBase.ProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_ProgressListener),
[AgentBase.UploadProgressListener](SuperOffice.WebApi.Agents.AgentBase.md#SuperOffice_WebApi_Agents_AgentBase_UploadProgressListener),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Examples

\<pre>\<code class="lang-csharp">using SuperOffice.WebApi;
using SuperOffice.WebApi.Agents;

var mySession = new WebApiOptions("[http://example.com/super/api](http://example.com/super/api)");
mySession.Authorization = new AuthorizationUsernamePassword("user", "pass");
using (QuoteAgent agent = new QuoteAgent(mySession))
\{
// call methods on agent here...
}\</code>\</pre>

## Constructors

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_\_ctor\_System\_Net\_Http\_HttpClient\_">\</a> QuoteAgent(HttpClient)

Constructor: Services for the Quote Management feature, part of the Sale module

```csharp theme={null}
public QuoteAgent(HttpClient httpClient)
```

#### Parameters

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Use this HTTP client instead of making own HttpClient instance.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_\_ctor\_SuperOffice\_WebApi\_WebApiOptions\_System\_Net\_Http\_HttpClient\_">\</a> QuoteAgent(WebApiOptions, HttpClient)

Constructor: Services for the Quote Management feature, part of the Sale module

```csharp theme={null}
public QuoteAgent(WebApiOptions options, HttpClient httpClient = null)
```

#### Parameters

`options` [WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

Base URL and authentication values.

`httpClient` [HttpClient](https://learn.microsoft.com/dotnet/api/system.net.http.httpclient)

Optional: Use this HTTP client instead of making a new one.

## Methods

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_AddSaleTypeQuoteAttachmentAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> AddSaleTypeQuoteAttachmentAsync(int, int, RequestOptions)

Adds a new quote attachment document to a sale type

```csharp theme={null}
public Task<int> AddSaleTypeQuoteAttachmentAsync(int saleTypeId, int documentId, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the sale type

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

The ID of the document

`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;

ID of the new sale type quote attachment row

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_ApproveQuoteVersionAsync\_System\_Int32\_System\_String\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ApproveQuoteVersionAsync(int, string, int, string, RequestOptions)

Approves a quote version

```csharp theme={null}
public Task<ApproveRejectResponse> ApproveQuoteVersionAsync(int quoteVersionId, string approvedByText, int approvedByAssociateId, string approvalText, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId to approve.

`approvedByText` [string](https://learn.microsoft.com/dotnet/api/system.string)

'Approved by' prefix to ApprovalText used when creating appointment task to log approval. Must be passed since service does not know which language to use for 'Approved By' string.

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

AssociateId of the associate who approved the quote version.

`approvalText` [string](https://learn.microsoft.com/dotnet/api/system.string)

Approval text.

`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)\<[ApproveRejectResponse](SuperOffice.WebApi.Data.ApproveRejectResponse.md)\&gt;

Response of the the operation

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CanConnectorProvideCapabilityAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CanConnectorProvideCapabilityAsync(int, string, RequestOptions)

Can the connector provide the capability

```csharp theme={null}
public Task<bool> CanConnectorProvideCapabilityAsync(int quoteConnectionId, string capabilityName, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`capabilityName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Capability name

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

Capability name

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CancelApprovalRequestAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CancelApprovalRequestAsync(int, RequestOptions)

Cancel a pending quote approval request.

```csharp theme={null}
public Task<PluginResponse> CancelApprovalRequestAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

The quoteversion for which approval was previously sent.

`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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\&gt;

Response of the the operation

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CopyQuoteAlternativeAsync\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CopyQuoteAlternativeAsync(int, int, string, RequestOptions)

Copy a quote alternative from the same sale and adds it to a version.

```csharp theme={null}
public Task<QuoteAlternative> CopyQuoteAlternativeAsync(int quoteVersionId, int quoteAlternativeId, string quoteAlternativeName, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId of the version to copy the alternative to.

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

QuoteAlternativeId of the alternative to make a copy of.

`quoteAlternativeName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name to set on the new alternative.

`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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\&gt;

The copied QuoteAlternative.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CopySuperOfficePriceListAsync\_System\_Int32\_System\_String\_System\_DateTime\_System\_DateTime\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CopySuperOfficePriceListAsync(int, string, DateTime, DateTime, int, bool, RequestOptions)

Create a copy of a PriceList in the SuperOffice database

```csharp theme={null}
public Task<PriceList> CopySuperOfficePriceListAsync(int originalPriceListId, string newName, DateTime validFrom, DateTime validTo, int newCurrencyId, bool convertCurrency, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the PriceList to be copied

`newName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the copied PriceList

`validFrom` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

Start date for the new pricelist.

`validTo` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

End date for the new pricelist.

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

Currency id of the copied PriceList. If 0 or the same as the original the copied products will keep their prices and the currency will be the same as the original.

`convertCurrency` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

If true, product prices will be recalculated to the new currency. If false, product prices will be set to zero.

`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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\&gt;

The copied PriceList

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateAndSaveQuoteAsync\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateAndSaveQuoteAsync(int, int, string, RequestOptions)

Creates a new quote on a sale.

```csharp theme={null}
public Task<QuoteEntity> CreateAndSaveQuoteAsync(int saleId, int connectionId, string firstAlternativeName, RequestOptions requestOptions = null)
```

#### Parameters

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

SaleId of the connected sale

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

ConnectionId

`firstAlternativeName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name to be given to the default alternative

`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)\<[QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)\&gt;

Quote carrier

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateAndSaveQuoteFromSaleAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateAndSaveQuoteFromSaleAsync(int, int, RequestOptions)

Creates a copy the active version with connected alternatives and quotelines from another sale.

```csharp theme={null}
public Task<QuoteEntity> CreateAndSaveQuoteFromSaleAsync(int copyFromSaleId, int copyToSaleId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the sale to copy the active quote from.

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

Id of the sale to copy the active quote to.

`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)\<[QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)\&gt;

The created Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateAndSaveQuoteLinesAsync\_System\_Int32\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateAndSaveQuoteLinesAsync(int, string\[], RequestOptions)

Create and save quotelines based on the product keys added

```csharp theme={null}
public Task<int> CreateAndSaveQuoteLinesAsync(int quoteAlternativeId, string[] erpProductKeys, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the alternative

`erpProductKeys` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

Array of the product keys to add

`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;

Count of added quoteLines

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateAndSaveQuoteVersionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateAndSaveQuoteVersionAsync(int, RequestOptions)

Created a new QuoteVersion based on another QuoteVersion on the same Quote.

```csharp theme={null}
public Task<QuoteVersion> CreateAndSaveQuoteVersionAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId of the version to copy the contents from.

`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)\<[QuoteVersion](SuperOffice.WebApi.Data.QuoteVersion.md)\&gt;

The Quote version

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateConnectionFromConnectorNameAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateConnectionFromConnectorNameAsync(string, RequestOptions)

Create a new connection.

```csharp theme={null}
public Task<QuoteConnection> CreateConnectionFromConnectorNameAsync(string connectorName, RequestOptions requestOptions = null)
```

#### Parameters

`connectorName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the connector to create this connection for.

`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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\&gt;

The created connection

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateDefaultPriceListAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultPriceListAsync(RequestOptions)

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

```csharp theme={null}
public Task<PriceList> CreateDefaultPriceListAsync(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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\&gt;

A blank PriceList

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateDefaultProductAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultProductAsync(RequestOptions)

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

```csharp theme={null}
public Task<Product> CreateDefaultProductAsync(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)\<[Product](SuperOffice.WebApi.Data.Product.md)\&gt;

A blank Product

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateDefaultQuoteAlternativeAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateDefaultQuoteAlternativeAsync(RequestOptions)

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

```csharp theme={null}
public Task<QuoteAlternative> CreateDefaultQuoteAlternativeAsync(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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\&gt;

A blank QuoteAlternative

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateOrUpdateQuoteVersionAttachmentsAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateOrUpdateQuoteVersionAttachmentsAsync(int, RequestOptions)

Look at the Quote version, related sale and sale type, and ensure that the correct QuoteVersionAttachment records exist. This method may create or delete records

```csharp theme={null}
public Task<QuoteVersionAttachment[]> CreateOrUpdateQuoteVersionAttachmentsAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the quote version

`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)\<[QuoteVersionAttachment](SuperOffice.WebApi.Data.QuoteVersionAttachment.md)\[]\&gt;

The current attachments for the given Quote version, after all updates have been completed

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateQuoteAlternativeAsync\_System\_Int32\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateQuoteAlternativeAsync(int, string, string, RequestOptions)

Create a new quote alternative on a version.

```csharp theme={null}
public Task<QuoteAlternative> CreateQuoteAlternativeAsync(int quoteVersionId, string quoteAlternativeName, string quoteAlternativeDescription, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId of the version to create the alternative on.

`quoteAlternativeName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name to set on the new alternative.

`quoteAlternativeDescription` [string](https://learn.microsoft.com/dotnet/api/system.string)

The description to set on the new alternative.

`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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\&gt;

The newly created QuoteAlternative.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateQuoteLineAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateQuoteLineAsync(int, string, RequestOptions)

Create a quoteline based on a product key.

```csharp theme={null}
public Task<QuoteLine> CreateQuoteLineAsync(int quoteAlternativeId, string eRPProductKey, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the alternative

`eRPProductKey` [string](https://learn.microsoft.com/dotnet/api/system.string)

Primary key of the product in the ProductProvider

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\&gt;

The updated quote line.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_CreateQuoteLineFromProductAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_Product\_SuperOffice\_WebApi\_RequestOptions\_">\</a> CreateQuoteLineFromProductAsync(int, Product, RequestOptions)

Create a quoteline based on a product.

```csharp theme={null}
public Task<QuoteLine> CreateQuoteLineFromProductAsync(int quoteAlternativeId, Product product, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the alternative

`product` [Product](SuperOffice.WebApi.Data.Product.md)

Product carrier

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\&gt;

The updated quote line.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_DeleteConnectionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteConnectionAsync(int, RequestOptions)

Marks a connection as deleted.

```csharp theme={null}
public Task DeleteConnectionAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection to delete

`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 void return

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_DeletePriceListAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeletePriceListAsync(int, RequestOptions)

Deletes the PriceList

```csharp theme={null}
public Task DeletePriceListAsync(int priceListId, RequestOptions requestOptions = null)
```

#### Parameters

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

The identity of the PriceList

`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\_QuoteAgent\_DeleteProductAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteProductAsync(int, RequestOptions)

Deletes the Product

```csharp theme={null}
public Task DeleteProductAsync(int productId, RequestOptions requestOptions = null)
```

#### Parameters

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

The identity of the Product

`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\_QuoteAgent\_DeleteQuoteAlternativeAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteQuoteAlternativeAsync(int, RequestOptions)

Delete a quote alternative

```csharp theme={null}
public Task DeleteQuoteAlternativeAsync(int quoteAlternativeId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the quote alternative to delete.

`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 void return

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_DeleteQuoteAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteQuoteAsync(int, RequestOptions)

Delete a Quote

```csharp theme={null}
public Task DeleteQuoteAsync(int quoteId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteId of the Quote to delete.

`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\_QuoteAgent\_DeleteQuoteLineAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteQuoteLineAsync(int, RequestOptions)

Deletes the QuoteLine in the SuperOffice database

```csharp theme={null}
public Task DeleteQuoteLineAsync(int quoteLineId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the quoteline to delete

`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)

Nothing

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_DeleteQuoteLinesAsync\_System\_Int32\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteQuoteLinesAsync(int\[], RequestOptions)

Delete the QuoteLines in the SuperOffice database

```csharp theme={null}
public Task DeleteQuoteLinesAsync(int[] quoteLineIds, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary keys of the quotelines to delete

`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)

Nothing

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_DeleteSaleTypeQuoteAttachmentAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> DeleteSaleTypeQuoteAttachmentAsync(int, RequestOptions)

Deletes the sale type quote attachment with the given id

```csharp theme={null}
public Task DeleteSaleTypeQuoteAttachmentAsync(int saleTypeQuoteAttachmentId, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the sale type quote attachment row to delete

`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\_QuoteAgent\_FindProductAsync\_System\_Int32\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> FindProductAsync(int, string, string, RequestOptions)

Gets a product, from the ProductProvider

```csharp theme={null}
public Task<Product[]> FindProductAsync(int quoteAlternativeId, string userInput, string priceListKey, RequestOptions requestOptions = null)
```

#### Parameters

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

Quote alternative to search in.

`userInput` [string](https://learn.microsoft.com/dotnet/api/system.string)

search string

`priceListKey` [string](https://learn.microsoft.com/dotnet/api/system.string)

If the pricelist is null or empty, the function will search in all active pricelists.

`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)\<[Product](SuperOffice.WebApi.Data.Product.md)\[]\&gt;

Product array

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GenerateQuoteDocumentsAsync\_System\_Int32\_System\_Int32\_System\_Boolean\_System\_Int32\_System\_Boolean\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GenerateQuoteDocumentsAsync(int, int, bool, int, bool, string, RequestOptions)

Generate all the documents required to send the Quote as an email to the prospect - or an Order Confirmation; it just depends on the template id's for the lines doc and mail body. Quote version status is not changed by this method.

```csharp theme={null}
public Task<QuotePublishDocuments> GenerateQuoteDocumentsAsync(int quoteVersionId, int emailBodyTemplateId, bool attachMainDocument, int quotedProductsTemplateId, bool includeAttachments, string rawMailSubject, RequestOptions requestOptions = null)
```

#### Parameters

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

VersionId of the quote to be sent; the status of the version will not be changed by calling this method

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

Id of the template for the email body, must be nonzero and refer to either a Quote mail body or Order Confirmation mail body, with html content

`attachMainDocument` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Should the main quote document be attached to the email; generally false for Order Confirmations

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

Id of the template for the quote- or order confirmation-lines; zero if no document should be produced

`includeAttachments` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

If true, then the currently specified (in the database) attachments will be included

`rawMailSubject` [string](https://learn.microsoft.com/dotnet/api/system.string)

Subject line for email, in the correct language, sent in here to have any template variables substituted

`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)\<[QuotePublishDocuments](SuperOffice.WebApi.Data.QuotePublishDocuments.md)\&gt;

Carrier specifying the document id's of all the documents, as well as other results

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetActivePriceListsAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetActivePriceListsAsync(int, string, RequestOptions)

Gets the available active PriceLists in a specific currency. Will return empty array if there is no PriceList with the stated currency available.

```csharp theme={null}
public Task<PriceList[]> GetActivePriceListsAsync(int quoteConnectionId, string currency, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`currency` [string](https://learn.microsoft.com/dotnet/api/system.string)

Iso currency like: USD or NOK. See [http://www.currency-iso.org/dl\_iso\_table\_a1.xls](http://www.currency-iso.org/dl_iso_table_a1.xls) for details. Case insensitive. Will return empty array if there is no PriceList with the stated currency available.

`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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\[]\&gt;

The PriceLists that supports a specific currency

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetActivePriceListsByCurrencyIdAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetActivePriceListsByCurrencyIdAsync(int, int, RequestOptions)

Gets the available active PriceLists in a specific currency. Will return empty array if there is no PriceList with the stated currency available.

```csharp theme={null}
public Task<PriceList[]> GetActivePriceListsByCurrencyIdAsync(int quoteConnectionId, int currencyId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

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

SuperOffice currency 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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\[]\&gt;

The PriceLists that supports a specific currency

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllAvailableQuoteConnectionsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllAvailableQuoteConnectionsAsync(RequestOptions)

Get all available connections. Some installed connections may not be available to the user. Use GetAllAvailableQuoteConnectionsWithPriceLists if you need the pricelists on the connections as well.

```csharp theme={null}
public Task<QuoteConnection[]> GetAllAvailableQuoteConnectionsAsync(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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\[]\&gt;

List of connections

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllAvailableQuoteConnectionsWithPriceListsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllAvailableQuoteConnectionsWithPriceListsAsync(RequestOptions)

Get all available connections. Some installed connections may not be available to the user. Includes pricelists for the connection. This is a heavy call

```csharp theme={null}
public Task<QuoteConnection[]> GetAllAvailableQuoteConnectionsWithPriceListsAsync(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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\[]\&gt;

List of connections

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllInstalledQuoteConnectionsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllInstalledQuoteConnectionsAsync(RequestOptions)

Get all installed connections. Some installed connections may not be available to the user.

```csharp theme={null}
public Task<QuoteConnection[]> GetAllInstalledQuoteConnectionsAsync(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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\[]\&gt;

List of connections

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllPriceListsAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllPriceListsAsync(int, string, RequestOptions)

Gets the all PriceLists in all currencies, including those inactive. Will return empty array if there is no PriceList available.

```csharp theme={null}
public Task<PriceList[]> GetAllPriceListsAsync(int quoteConnectionId, string currency, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`currency` [string](https://learn.microsoft.com/dotnet/api/system.string)

Iso currency like: USD or NOK. See [http://www.currency-iso.org/dl\_iso\_table\_a1.xls](http://www.currency-iso.org/dl_iso_table_a1.xls) for details. Case insensitive. Will return empty array if there is no PriceList with the stated currency available.

`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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\[]\&gt;

The PriceLists that supports a specific currency

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllPriceListsByCurrencyIdAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllPriceListsByCurrencyIdAsync(int, int, RequestOptions)

Gets the all PriceLists in all currencies, including those inactive. Will return empty array if there is no PriceList available.

```csharp theme={null}
public Task<PriceList[]> GetAllPriceListsByCurrencyIdAsync(int quoteConnectionId, int currencyId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

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

SuperOffice currency 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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\[]\&gt;

The PriceLists that supports a specific currency

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetAllQuoteLineConfigurationsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetAllQuoteLineConfigurationsAsync(RequestOptions)

Returns all the configuration fields

```csharp theme={null}
public Task<QuoteLineConfiguration[]> GetAllQuoteLineConfigurationsAsync(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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\[]\&gt;

Array of QuoteLineConfigurations

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConfigurationFieldsAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConfigurationFieldsAsync(int, string, RequestOptions)

Used by ADMIN. Asks for metadata needed to populate admin dialog that takes in the information needed to create a connection to an ERP system. The values entered in the dialog are stored in SuperOffice db and used when InitializeConnector is called by the client.

```csharp theme={null}
public Task<FieldMetadataDictionary> GetConfigurationFieldsAsync(int connectionId, string connectorName, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of an existing connection, if any. Initializes connection with current config values if non-zero.

`connectorName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the connector. Ignored if connectionId is non-zero.

`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)\<[FieldMetadataDictionary](SuperOffice.WebApi.Data.FieldMetadataDictionary.md)\&gt;

carriers

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectionAsync(int, RequestOptions)

Returns the specified connection.

```csharp theme={null}
public Task<QuoteConnection> GetConnectionAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\&gt;

The connection

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectionConfigFieldsAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectionConfigFieldsAsync(int, RequestOptions)

Returns the config fields for the connection.

```csharp theme={null}
public Task<StringDictionary> GetConnectionConfigFieldsAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`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)\<[StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)\&gt;

Config Fields

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectionStartupErrorsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectionStartupErrorsAsync(RequestOptions)

Returns an array of PluginResponseInfos for all failed connection initializations.

```csharp theme={null}
public Task<PluginResponse[]> GetConnectionStartupErrorsAsync(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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\[]\&gt;

Array of PluginResponseInfos for each failed connection initialization.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectionStartupResponseAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectionStartupResponseAsync(int, RequestOptions)

Returns the PluginResponseInfo for the connection initialization. Does not initialize the connection, just returns what happened when initialize was called.

```csharp theme={null}
public Task<PluginResponse> GetConnectionStartupResponseAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\&gt;

PluginResponseInfo for the connection initialization.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectionsForAssociateAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectionsForAssociateAsync(int, RequestOptions)

Returns all connections available for the specified user.

```csharp theme={null}
public Task<QuoteConnection[]> GetConnectionsForAssociateAsync(int associateId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the user

`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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\[]\&gt;

The connections

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectorCapabilitiesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectorCapabilitiesAsync(int, RequestOptions)

Gets a list of connector capabilities

```csharp theme={null}
public Task<string[]> GetConnectorCapabilitiesAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`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)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\[]\&gt;

Capabilities

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetConnectorCapabilityNamesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetConnectorCapabilityNamesAsync(int, RequestOptions)

Gets a list of all possible connector capabilities

```csharp theme={null}
public Task<string[]> GetConnectorCapabilityNamesAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`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)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\[]\&gt;

Capabilities names

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetExtraInfoAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetExtraInfoAsync(string, RequestOptions)

Converts an xml string into an object representation.

```csharp theme={null}
public Task<ProductExtraDataField[]> GetExtraInfoAsync(string quoteLineExtraData, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLineExtraData` [string](https://learn.microsoft.com/dotnet/api/system.string)

The extra data as xml.

`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)\<[ProductExtraDataField](SuperOffice.WebApi.Data.ProductExtraDataField.md)\[]\&gt;

An object representation on the xml

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetInUseQuoteLineConfigurationsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetInUseQuoteLineConfigurationsAsync(RequestOptions)

Returns the configuration fields that should be visible in the GUI.

```csharp theme={null}
public Task<QuoteLineConfiguration[]> GetInUseQuoteLineConfigurationsAsync(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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\[]\&gt;

Array of QuoteLineConfigurations

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetOrderConfirmationAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetOrderConfirmationAsync(int, int, RequestOptions)

Get a base64-encoded data stream that is just the order confirmation document, for the given quote version; no permanent document is created or stored anywhere; the result is a PDF

```csharp theme={null}
public Task<string> GetOrderConfirmationAsync(int quoteVersionId, int confirmationTemplateId, RequestOptions requestOptions = null)
```

#### Parameters

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

VersionId of the quote to be sent; the status of the version will not be changed by calling this method

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

Id of the template for the order confirmation lines document

`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)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\&gt;

Base64-encoded binary data, that is in fact a PDF document that should be shown to the user

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetOrderStateAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetOrderStateAsync(int, RequestOptions)

If there is a problem with a quoteline, the error description shall be placed in the status and reason fields of the quoteline, if there is a problem with the alternative, the error description shall be placed in the status and reason fields of the alternative. A summary of all the problems (if any) should be placed in the response object. Requires that the Create-Order capability is true.

```csharp theme={null}
public Task<PluginUrlResponse> GetOrderStateAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

the QuoteVersionId of the ordered version.

`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)\<[PluginUrlResponse](SuperOffice.WebApi.Data.PluginUrlResponse.md)\&gt;

The order state. If a new quoteversion is created, the QuoteVersionId will be found in Changes.AddedRecords.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetPriceListAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetPriceListAsync(int, RequestOptions)

Gets a specific PriceList object.

```csharp theme={null}
public Task<PriceList> GetPriceListAsync(int priceListId, RequestOptions requestOptions = null)
```

#### Parameters

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

The identifier of the PriceList 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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\&gt;

PriceList

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetProductAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProductAsync(int, string, RequestOptions)

Get a product with the given key

```csharp theme={null}
public Task<Product> GetProductAsync(int quoteConnectionId, string eRPProductKey, RequestOptions requestOptions = null)
```

#### Parameters

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

The connection this product comes from.

`eRPProductKey` [string](https://learn.microsoft.com/dotnet/api/system.string)

Primary key of the Product in the ProductProvider

`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)\<[Product](SuperOffice.WebApi.Data.Product.md)\&gt;

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetProductFromDbIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProductFromDbIdAsync(int, RequestOptions)

Get a product with the given database id

```csharp theme={null}
public Task<Product> GetProductFromDbIdAsync(int productId, RequestOptions requestOptions = null)
```

#### Parameters

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

The database id of the product

`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)\<[Product](SuperOffice.WebApi.Data.Product.md)\&gt;

The product info

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetProductImageAsync\_System\_Int32\_System\_String\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetProductImageAsync(int, string, int, RequestOptions)

Gets an image connected to a product, from the ProductProvider

```csharp theme={null}
public Task<string> GetProductImageAsync(int quoteConnectionId, string eRPProductKey, int rank, RequestOptions requestOptions = null)
```

#### Parameters

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

The connection this product comes from.

`eRPProductKey` [string](https://learn.microsoft.com/dotnet/api/system.string)

Primary key of the Product in the ProductProvider

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

The rank of the image.

`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)\<[string](https://learn.microsoft.com/dotnet/api/system.string)\&gt;

The base64 encoded image as a string.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteAlternativeAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteAlternativeAsync(int, RequestOptions)

Gets a specific QuoteAlternative object.

```csharp theme={null}
public Task<QuoteAlternative> GetQuoteAlternativeAsync(int quoteAlternativeId, RequestOptions requestOptions = null)
```

#### Parameters

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

The identifier of the QuoteAlternative 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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\&gt;

QuoteAlternative

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteAlternativesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteAlternativesAsync(int, RequestOptions)

Get all quote alternatives for a quote version

```csharp theme={null}
public Task<QuoteAlternative[]> GetQuoteAlternativesAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId of the revison to get alternatives for.

`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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\[]\&gt;

Array of Quote alternatives

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteAsync(int, RequestOptions)

Get a Quote

```csharp theme={null}
public Task<Quote> GetQuoteAsync(int quoteId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteId of the Quote to get.

`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)\<[Quote](SuperOffice.WebApi.Data.Quote.md)\&gt;

The Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteEntityAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteEntityAsync(int, RequestOptions)

Get a Quote

```csharp theme={null}
public Task<QuoteEntity> GetQuoteEntityAsync(int quoteId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteId of the Quote to get.

`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)\<[QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)\&gt;

The Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteEntityFromSaleIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteEntityFromSaleIdAsync(int, RequestOptions)

Get a Quote for a sale

```csharp theme={null}
public Task<QuoteEntity> GetQuoteEntityFromSaleIdAsync(int saleId, RequestOptions requestOptions = null)
```

#### Parameters

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

SaleId of the Quote to get.

`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)\<[QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)\&gt;

The Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteFromSaleIdAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteFromSaleIdAsync(int, RequestOptions)

Get a Quote for a sale

```csharp theme={null}
public Task<Quote> GetQuoteFromSaleIdAsync(int saleId, RequestOptions requestOptions = null)
```

#### Parameters

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

SaleId of the Quote to get.

`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)\<[Quote](SuperOffice.WebApi.Data.Quote.md)\&gt;

The Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteLineAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteLineAsync(int, RequestOptions)

Get QuoteLine from database

```csharp theme={null}
public Task<QuoteLine> GetQuoteLineAsync(int quoteLineId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the quoteline to get.

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\&gt;

The updated quote line (If the quoteline was new, it returns with id's set.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteLineConfigurationAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteLineConfigurationAsync(int, RequestOptions)

Returns the configuration field with the given id

```csharp theme={null}
public Task<QuoteLineConfiguration> GetQuoteLineConfigurationAsync(int quoteLineConfigurationId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the QuoteLineConfiguration to get.

`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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\&gt;

QuoteLineConfiguration

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteLineConfigurationFromFieldNameAsync\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteLineConfigurationFromFieldNameAsync(string, RequestOptions)

Returns the configuration field with the given field name

```csharp theme={null}
public Task<QuoteLineConfiguration> GetQuoteLineConfigurationFromFieldNameAsync(string fieldName, RequestOptions requestOptions = null)
```

#### Parameters

`fieldName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Field name of the QuoteLineConfiguration to get.

`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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\&gt;

QuoteLineConfiguration

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteLinesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteLinesAsync(int, RequestOptions)

Get all QuoteLines from an alternative

```csharp theme={null}
public Task<QuoteLine[]> GetQuoteLinesAsync(int quoteAlternativeId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the alternative to return the quotelines for

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\[]\&gt;

QuoteLine array

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionAsync(int, RequestOptions)

Get a QuoteVersion

```csharp theme={null}
public Task<QuoteVersion> GetQuoteVersionAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId to get information from

`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)\<[QuoteVersion](SuperOffice.WebApi.Data.QuoteVersion.md)\&gt;

Array of Quote versions

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionWorkflowButtonStatesAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionWorkflowButtonStatesAsync(int, int, RequestOptions)

Get all button states for the Quote version dialog.

```csharp theme={null}
public Task<QuoteVersionWorkflowState> GetQuoteVersionWorkflowButtonStatesAsync(int quoteVersionId, int quoteAlternativeId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the quote version to get the button states for.

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

Id of the active quote alternative 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)\<[QuoteVersionWorkflowState](SuperOffice.WebApi.Data.QuoteVersionWorkflowState.md)\&gt;

Workflow state information

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionWorkflowImageStateAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionWorkflowImageStateAsync(int, RequestOptions)

Get state icon and name for the Quote version dialog header.

```csharp theme={null}
public Task<QuoteVersionButtonState> GetQuoteVersionWorkflowImageStateAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the quote version to get the version state for.

`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)\<[QuoteVersionButtonState](SuperOffice.WebApi.Data.QuoteVersionButtonState.md)\&gt;

Image and state name information

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionWorkflowStateAsync\_System\_Int32\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionWorkflowStateAsync(int, int, RequestOptions)

Get all button states for the Quote version dialog. Packages ImageState, Button states and status info into one call. Collects most important warnings/errors from across all quotelines/alternatives in this quote version.

```csharp theme={null}
public Task<QuoteVersionWorkflowState> GetQuoteVersionWorkflowStateAsync(int quoteVersionId, int quoteAlternativeId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the quote version to get the button states for.

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

Id of the active quote alternative 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)\<[QuoteVersionWorkflowState](SuperOffice.WebApi.Data.QuoteVersionWorkflowState.md)\&gt;

Workflow state information

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionWorkflowStatusInfoAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionWorkflowStatusInfoAsync(int, RequestOptions)

Get status info for the Quote version dialog header. Collects most important warnings/errors from across all quotelines/alternatives in this quote version.

```csharp theme={null}
public Task<QuoteVersionStatusInformation> GetQuoteVersionWorkflowStatusInfoAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the quote version to get the status info for.

`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)\<[QuoteVersionStatusInformation](SuperOffice.WebApi.Data.QuoteVersionStatusInformation.md)\&gt;

Most important status text + icon information.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_GetQuoteVersionsAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> GetQuoteVersionsAsync(int, RequestOptions)

Get all quote versions for a sale

```csharp theme={null}
public Task<QuoteVersion[]> GetQuoteVersionsAsync(int quoteId, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteId of the quote to get versions from

`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)\<[QuoteVersion](SuperOffice.WebApi.Data.QuoteVersion.md)\[]\&gt;

Array of Quote versions

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_HasConnectionsAsync\_SuperOffice\_WebApi\_RequestOptions\_">\</a> HasConnectionsAsync(RequestOptions)

Whether or not the system has any connections available for this user.

```csharp theme={null}
public Task<PluginResponse> HasConnectionsAsync(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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\&gt;

The response

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_IncludeQuoteVersionAttachmentAsync\_System\_Int32\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> IncludeQuoteVersionAttachmentAsync(int, int, bool, RequestOptions)

Toggle the 'included' state of a quote version attachment; will throw exceptions if called on locked versions

```csharp theme={null}
public Task<bool> IncludeQuoteVersionAttachmentAsync(int quoteVersionId, int documentId, bool include, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the Quote version

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

The ID of the document

`include` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Desired state

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

The new state

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_MoveQuoteLineAsync\_System\_Int32\_System\_Boolean\_SuperOffice\_WebApi\_RequestOptions\_">\</a> MoveQuoteLineAsync(int, bool, RequestOptions)

Move quote line rank up/down

```csharp theme={null}
public Task MoveQuoteLineAsync(int quoteLineId, bool direction, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of quote line to move up/down

`direction` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True is up, false is down

`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)

Void return

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_PlaceOrderAsync\_System\_Int32\_System\_Boolean\_System\_String\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> PlaceOrderAsync(int, bool, string, string, string, RequestOptions)

Place an order in the ERP system.

```csharp theme={null}
public Task<PluginUrlResponse> PlaceOrderAsync(int quoteAlternativeId, bool markSaleAsSold, string poNumber, string orderComment, string culture, RequestOptions requestOptions = null)
```

#### Parameters

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

Id of the alternative to place the order on.

`markSaleAsSold` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Should the state of the owning Sale be set to sold

`poNumber` [string](https://learn.microsoft.com/dotnet/api/system.string)

Purchase order number, saved to Quote record

`orderComment` [string](https://learn.microsoft.com/dotnet/api/system.string)

Order comment, saved to Quote record

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

Desired culture for email body and other culture-sensitive templates/content

`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)\<[PluginUrlResponse](SuperOffice.WebApi.Data.PluginUrlResponse.md)\&gt;

Status for the placed order: OkWithInfo / Warn / Error with message or URL to open.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_RecalculateQuoteAlternativeAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RecalculateQuoteAlternativeAsync(int, RequestOptions)

When the user changes one or more values in a quoteline or a quoteAlternative, the connector gets to change the QuoteLines and the alternative, for instance calculate VAT. RecalculateQuoteAlternative shall be called when the user changes any of the following fields: Quantity, DiscountAmount, DiscountPercent, listprice (if allowed). RecalculateQuoteAlternative will calculate the TotalPrice and the VAT (if possible) for the lines and the alternative.

```csharp theme={null}
public Task<QuoteAlternativeRecalculated> RecalculateQuoteAlternativeAsync(int quoteAlternative, RequestOptions requestOptions = null)
```

#### Parameters

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

The alternative to be recalculated

`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)\<[QuoteAlternativeRecalculated](SuperOffice.WebApi.Data.QuoteAlternativeRecalculated.md)\&gt;

The updated quote version.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_RecalculateQuoteLineAsync\_SuperOffice\_WebApi\_Data\_QuoteLine\_System\_String\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RecalculateQuoteLineAsync(QuoteLine, string\[], RequestOptions)

When the user changes one or more values in a quoteline, the connector gets to change the QuoteLine, for instance calculate VAT. Shall be called when the user changes any of the following fields: Quantity, DiscountAmount, DiscountPercent, ListPrice (if allowed). Will calculate the TotalPrice and the VAT (if possible) for the line.

```csharp theme={null}
public Task<QuoteLine> RecalculateQuoteLineAsync(QuoteLine quoteLine, string[] changedFields, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLine` [QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)

The QuoteLine to recalculate

`changedFields` [string](https://learn.microsoft.com/dotnet/api/system.string)\[]

The id of the changed fields in the form 'TableName.FieldName'

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\&gt;

The updated quote line.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_RejectQuoteVersionAsync\_System\_Int32\_System\_String\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RejectQuoteVersionAsync(int, string, int, string, RequestOptions)

Rejects a quote version

```csharp theme={null}
public Task<ApproveRejectResponse> RejectQuoteVersionAsync(int quoteVersionId, string rejectedByText, int rejectedByAssociateId, string rejectionText, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId to approve.

`rejectedByText` [string](https://learn.microsoft.com/dotnet/api/system.string)

'Rejected by' prefix to RejectionText used when creating appointment task to log rejection. Must be passed since service does not know which language to use for 'Rejected By' string.

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

AssociateId of the associate who rejected the quote version.

`rejectionText` [string](https://learn.microsoft.com/dotnet/api/system.string)

Rejection text.

`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)\<[ApproveRejectResponse](SuperOffice.WebApi.Data.ApproveRejectResponse.md)\&gt;

Response of the the operation

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_RemoveProductAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RemoveProductAsync(int, RequestOptions)

Removes a product from the database

```csharp theme={null}
public Task RemoveProductAsync(int productId, RequestOptions requestOptions = null)
```

#### Parameters

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

The database id of the product to remove

`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\_QuoteAgent\_RequestApprovalAsync\_System\_Int32\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RequestApprovalAsync(int, int, string, RequestOptions)

Notifies specified associate that this quote needs approval.

```csharp theme={null}
public Task<PluginResponse> RequestApprovalAsync(int quoteVersionId, int associateId, string comment, RequestOptions requestOptions = null)
```

#### Parameters

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

The quoteversion to be approved.

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

The associate that should be notified.

`comment` [string](https://learn.microsoft.com/dotnet/api/system.string)

Details or reason for request

`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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\&gt;

Response of the the operation

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_RestoreConnectionAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> RestoreConnectionAsync(int, RequestOptions)

Restores a connection marked as deleted.

```csharp theme={null}
public Task RestoreConnectionAsync(int quoteConnectionId, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection to restore

`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 void return

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveConnectionAsync\_SuperOffice\_WebApi\_Data\_QuoteConnection\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveConnectionAsync(QuoteConnection, RequestOptions)

Saves a connection to the database.

```csharp theme={null}
public Task<QuoteConnection> SaveConnectionAsync(QuoteConnection connection, RequestOptions requestOptions = null)
```

#### Parameters

`connection` [QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)

The connection to save.

`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)\<[QuoteConnection](SuperOffice.WebApi.Data.QuoteConnection.md)\&gt;

The resulting connection.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveConnectionConfigFieldsAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_StringDictionary\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveConnectionConfigFieldsAsync(int, StringDictionary, RequestOptions)

Saves the connection config fields

```csharp theme={null}
public Task<StringDictionary> SaveConnectionConfigFieldsAsync(int quoteConnectionId, StringDictionary connectionConfigFields, RequestOptions requestOptions = null)
```

#### Parameters

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

Primary key of the connection

`connectionConfigFields` [StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)

ConnectionConfigFields to save.

`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)\<[StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)\&gt;

Config Fields

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SavePriceListAsync\_SuperOffice\_WebApi\_Data\_PriceList\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SavePriceListAsync(PriceList, RequestOptions)

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

```csharp theme={null}
public Task<PriceList> SavePriceListAsync(PriceList priceList, RequestOptions requestOptions = null)
```

#### Parameters

`priceList` [PriceList](SuperOffice.WebApi.Data.PriceList.md)

The PriceList 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)\<[PriceList](SuperOffice.WebApi.Data.PriceList.md)\&gt;

New or updated PriceList

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveProductAsync\_SuperOffice\_WebApi\_Data\_Product\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveProductAsync(Product, RequestOptions)

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

```csharp theme={null}
public Task<Product> SaveProductAsync(Product product, RequestOptions requestOptions = null)
```

#### Parameters

`product` [Product](SuperOffice.WebApi.Data.Product.md)

The Product 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)\<[Product](SuperOffice.WebApi.Data.Product.md)\&gt;

New or updated Product

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteAlternativeAsync\_SuperOffice\_WebApi\_Data\_QuoteAlternative\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteAlternativeAsync(QuoteAlternative, RequestOptions)

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

```csharp theme={null}
public Task<QuoteAlternative> SaveQuoteAlternativeAsync(QuoteAlternative quoteAlternative, RequestOptions requestOptions = null)
```

#### Parameters

`quoteAlternative` [QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)

The QuoteAlternative 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)\<[QuoteAlternative](SuperOffice.WebApi.Data.QuoteAlternative.md)\&gt;

New or updated QuoteAlternative

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteAsync\_SuperOffice\_WebApi\_Data\_Quote\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteAsync(Quote, RequestOptions)

Saves a Quote

```csharp theme={null}
public Task<Quote> SaveQuoteAsync(Quote quote, RequestOptions requestOptions = null)
```

#### Parameters

`quote` [Quote](SuperOffice.WebApi.Data.Quote.md)

The Quote to save

`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)\<[Quote](SuperOffice.WebApi.Data.Quote.md)\&gt;

The saved Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteEntityAsync\_SuperOffice\_WebApi\_Data\_QuoteEntity\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteEntityAsync(QuoteEntity, RequestOptions)

Saves a QuoteEntity. Versions and alternatives will not be saved by this call.

```csharp theme={null}
public Task<QuoteEntity> SaveQuoteEntityAsync(QuoteEntity quoteEntity, RequestOptions requestOptions = null)
```

#### Parameters

`quoteEntity` [QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)

The Quote entity to save

`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)\<[QuoteEntity](SuperOffice.WebApi.Data.QuoteEntity.md)\&gt;

The saved Quote

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteLineAsync\_SuperOffice\_WebApi\_Data\_QuoteLine\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteLineAsync(QuoteLine, RequestOptions)

Saves the QuoteLine in the SuperOffice database

```csharp theme={null}
public Task<QuoteLine> SaveQuoteLineAsync(QuoteLine quoteLine, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLine` [QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)

The QuoteLine to save.

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\&gt;

The updated quote line (If the quoteline was new, it returns with id's set.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteLineConfigurationAsync\_SuperOffice\_WebApi\_Data\_QuoteLineConfiguration\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteLineConfigurationAsync(QuoteLineConfiguration, RequestOptions)

Save a QuoteLineConfiguration object. It is not possible to add a new configuration.

```csharp theme={null}
public Task<QuoteLineConfiguration> SaveQuoteLineConfigurationAsync(QuoteLineConfiguration quoteLineConfiguration, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLineConfiguration` [QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)

The QuoteLineConfiguration to save.

`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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\&gt;

The saved QuoteLineConfiguration.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteLineConfigurationsAsync\_SuperOffice\_WebApi\_Data\_QuoteLineConfiguration\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteLineConfigurationsAsync(QuoteLineConfiguration\[], RequestOptions)

Save a collection of QuoteLineConfigurations. It is not possible to add a new configurations.

```csharp theme={null}
public Task<QuoteLineConfiguration[]> SaveQuoteLineConfigurationsAsync(QuoteLineConfiguration[] quoteLineConfigurations, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLineConfigurations` [QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\[]

The QuoteLineConfigurations to save.

`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)\<[QuoteLineConfiguration](SuperOffice.WebApi.Data.QuoteLineConfiguration.md)\[]\&gt;

The saved QuoteLineConfigurations.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteLinesAsync\_SuperOffice\_WebApi\_Data\_QuoteLine\_\_\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteLinesAsync(QuoteLine\[], RequestOptions)

Saves the QuoteLines in the SuperOffice database

```csharp theme={null}
public Task<QuoteLine[]> SaveQuoteLinesAsync(QuoteLine[] quoteLines, RequestOptions requestOptions = null)
```

#### Parameters

`quoteLines` [QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\[]

The QuoteLines to save.

`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)\<[QuoteLine](SuperOffice.WebApi.Data.QuoteLine.md)\[]\&gt;

The updated quote lines (If the quoteline was new, it returns with id's set.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteVersionAsync\_SuperOffice\_WebApi\_Data\_QuoteVersion\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteVersionAsync(QuoteVersion, RequestOptions)

Saves a quote version

```csharp theme={null}
public Task<QuoteVersion> SaveQuoteVersionAsync(QuoteVersion quoteVersion, RequestOptions requestOptions = null)
```

#### Parameters

`quoteVersion` [QuoteVersion](SuperOffice.WebApi.Data.QuoteVersion.md)

The quote version to save

`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)\<[QuoteVersion](SuperOffice.WebApi.Data.QuoteVersion.md)\&gt;

The saved quote version

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SaveQuoteVersionNumberAsync\_System\_Int32\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SaveQuoteVersionNumberAsync(int, string, RequestOptions)

Save the quote version number if it is valid

```csharp theme={null}
public Task<bool> SaveQuoteVersionNumberAsync(int quoteVersionId, string number, RequestOptions requestOptions = null)
```

#### Parameters

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

VersionId of the quote version

`number` [string](https://learn.microsoft.com/dotnet/api/system.string)

The number to save

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

True if the number was valid and then saved

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_SendQuoteVersionAsync\_System\_Int32\_System\_DateTime\_System\_DateTime\_System\_String\_System\_String\_SuperOffice\_WebApi\_RequestOptions\_">\</a> SendQuoteVersionAsync(int, DateTime, DateTime, string, string, RequestOptions)

Send the quote to the user's customer. More parameters to be added later...

```csharp theme={null}
public Task<PluginUrlResponse> SendQuoteVersionAsync(int quoteVersionId, DateTime expiryDate, DateTime followupDate, string followupText, string culture, RequestOptions requestOptions = null)
```

#### Parameters

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

QuoteVersionId of the quoteversion to send

`expiryDate` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

Date the quote expires

`followupDate` [DateTime](https://learn.microsoft.com/dotnet/api/system.datetime)

Date for the followup task, to remind the sales rep about the quote

`followupText` [string](https://learn.microsoft.com/dotnet/api/system.string)

The body text for the follwup appointment, resolved to the correct culture (no resources please)

`culture` [string](https://learn.microsoft.com/dotnet/api/system.string)

Desired culture for email body and other culture-sensitive templates/content

`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)\<[PluginUrlResponse](SuperOffice.WebApi.Data.PluginUrlResponse.md)\&gt;

Response of the operation

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_TestConnectionAsync\_System\_String\_SuperOffice\_WebApi\_Data\_StringDictionary\_SuperOffice\_WebApi\_RequestOptions\_">\</a> TestConnectionAsync(string, StringDictionary, RequestOptions)

Used by the Admin clients. Testing if the connection data is sufficient to get a connection with the ERP system. The Connector should try to do some operations to check if the connection has sufficient rights to run. The connection has not been created yet. TestConnection is called without InitializeConnector being called first.

```csharp theme={null}
public Task<PluginResponse> TestConnectionAsync(string connectorName, StringDictionary connectionData, RequestOptions requestOptions = null)
```

#### Parameters

`connectorName` [string](https://learn.microsoft.com/dotnet/api/system.string)

Name of the connector.

`connectionData` [StringDictionary](SuperOffice.WebApi.Data.StringDictionary.md)

Basically the name/value collection of the configuration data requested to create a connection

`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)\<[PluginResponse](SuperOffice.WebApi.Data.PluginResponse.md)\&gt;

How the test went

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_ToggleProductInAssortmentAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ToggleProductInAssortmentAsync(int, RequestOptions)

Toggles if the prdouct is in assortment or not

```csharp theme={null}
public Task ToggleProductInAssortmentAsync(int productId, RequestOptions requestOptions = null)
```

#### Parameters

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

The database id of the product to toggle is assortment value of

`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\_QuoteAgent\_ToggleQuoteVersionAttachmentIncludedAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ToggleQuoteVersionAttachmentIncludedAsync(int, RequestOptions)

Toggle the 'included' state of a quote version attachment

```csharp theme={null}
public Task<bool> ToggleQuoteVersionAttachmentIncludedAsync(int quoteVersionAttachmentId, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the quote version attachment row

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

The new state

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync(int, RequestOptions)

Toggle the 'default included' state of a sale type quote attachment

```csharp theme={null}
public Task<bool> ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync(int saleTypeQuoteAttachmentId, RequestOptions requestOptions = null)
```

#### Parameters

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

The ID of the sale type quote attachment row

`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)\<[bool](https://learn.microsoft.com/dotnet/api/system.boolean)\&gt;

The new state

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_UpdateQuoteVersionPricesAsync\_System\_Int32\_SuperOffice\_WebApi\_RequestOptions\_">\</a> UpdateQuoteVersionPricesAsync(int, RequestOptions)

Update price on the all the quotelines for each alternative in the current quote version

```csharp theme={null}
public Task<QuoteVersionValidated> UpdateQuoteVersionPricesAsync(int quoteVersionId, RequestOptions requestOptions = null)
```

#### Parameters

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

The version to be update prices for

`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)\<[QuoteVersionValidated](SuperOffice.WebApi.Data.QuoteVersionValidated.md)\&gt;

The updated quote version.

### \<a id="SuperOffice\_WebApi\_Agents\_QuoteAgent\_ValidateQuoteVersionAsync\_System\_Int32\_SuperOffice\_WebApi\_Data\_QuoteVersionButtonAction\_SuperOffice\_WebApi\_RequestOptions\_">\</a> ValidateQuoteVersionAsync(int, QuoteVersionButtonAction, RequestOptions)

When the user changes one or more values in a quoteline or a quoteAlternative, the connector gets to change the QuoteLines and the alternative, for instance calculate VAT. ValidateQuoteVersion shall be called when the user presses the validate button, presses the send button or closes the quote dialog. RecalculateQuoteAlternative should typically validate all alternatives, set values in extrafields, and set the state in the version.

```csharp theme={null}
public Task<QuoteVersionValidated> ValidateQuoteVersionAsync(int quoteVersionId, QuoteVersionButtonAction action, RequestOptions requestOptions = null)
```

#### Parameters

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

The version to be validated

`action` [QuoteVersionButtonAction](SuperOffice.WebApi.Data.QuoteVersionButtonAction.md)

The action, if any, related to the validate call, like PlaceOrder or SendQuote

`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)\<[QuoteVersionValidated](SuperOffice.WebApi.Data.QuoteVersionValidated.md)\&gt;

The updated quote version.
