Skip to main content

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent”></a> Interface IQuoteAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Services for the Quote Management feature, part of the Sale module

Implements

IAgentBase, IDisposable

Methods

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_AddSaleTypeQuoteAttachmentAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> AddSaleTypeQuoteAttachmentAsync(int, int, RequestOptions)

Adds a new quote attachment document to a sale type

Parameters

saleTypeId int The ID of the sale type documentId int The ID of the document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; ID of the new sale type quote attachment row

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_ApproveQuoteVersionAsync_System_Int32_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> ApproveQuoteVersionAsync(int, string, int, string, RequestOptions)

Approves a quote version

Parameters

quoteVersionId int QuoteVersionId to approve. approvedByText 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 AssociateId of the associate who approved the quote version. approvalText string Approval text. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ApproveRejectResponse&gt; Response of the the operation

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CanConnectorProvideCapabilityAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CanConnectorProvideCapabilityAsync(int, string, RequestOptions)

Can the connector provide the capability

Parameters

quoteConnectionId int Primary key of the connection capabilityName string Capability name requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; Capability name

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CancelApprovalRequestAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CancelApprovalRequestAsync(int, RequestOptions)

Cancel a pending quote approval request.

Parameters

quoteVersionId int The quoteversion for which approval was previously sent. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse&gt; Response of the the operation

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteVersionId int QuoteVersionId of the version to copy the alternative to. quoteAlternativeId int QuoteAlternativeId of the alternative to make a copy of. quoteAlternativeName string The name to set on the new alternative. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative&gt; The copied QuoteAlternative.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

originalPriceListId int Id of the PriceList to be copied newName string Name of the copied PriceList validFrom DateTime Start date for the new pricelist. validTo DateTime End date for the new pricelist. newCurrencyId int 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 If true, product prices will be recalculated to the new currency. If false, product prices will be set to zero. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList&gt; The copied PriceList

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateAndSaveQuoteAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateAndSaveQuoteAsync(int, int, string, RequestOptions)

Creates a new quote on a sale.

Parameters

saleId int SaleId of the connected sale connectionId int ConnectionId firstAlternativeName string Name to be given to the default alternative requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteEntity&gt; Quote carrier

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

copyFromSaleId int Id of the sale to copy the active quote from. copyToSaleId int Id of the sale to copy the active quote to. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteEntity&gt; The created Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateAndSaveQuoteLinesAsync_System_Int32_System_String___SuperOffice_WebApi_RequestOptions_”></a> CreateAndSaveQuoteLinesAsync(int, string[], RequestOptions)

Create and save quotelines based on the product keys added

Parameters

quoteAlternativeId int Primary key of the alternative erpProductKeys string[] Array of the product keys to add requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Count of added quoteLines

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateAndSaveQuoteVersionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CreateAndSaveQuoteVersionAsync(int, RequestOptions)

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

Parameters

quoteVersionId int QuoteVersionId of the version to copy the contents from. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersion&gt; The Quote version

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateConnectionFromConnectorNameAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateConnectionFromConnectorNameAsync(string, RequestOptions)

Create a new connection.

Parameters

connectorName string The name of the connector to create this connection for. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection&gt; The created connection

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList&gt; A blank PriceList

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Product&gt; A blank Product

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative&gt; A blank QuoteAlternative

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

quoteVersionId int The ID of the quote version requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionAttachment[]&gt; The current attachments for the given Quote version, after all updates have been completed

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateQuoteAlternativeAsync_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateQuoteAlternativeAsync(int, string, string, RequestOptions)

Create a new quote alternative on a version.

Parameters

quoteVersionId int QuoteVersionId of the version to create the alternative on. quoteAlternativeName string The name to set on the new alternative. quoteAlternativeDescription string The description to set on the new alternative. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative&gt; The newly created QuoteAlternative.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateQuoteLineAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateQuoteLineAsync(int, string, RequestOptions)

Create a quoteline based on a product key.

Parameters

quoteAlternativeId int Primary key of the alternative eRPProductKey string Primary key of the product in the ProductProvider requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine&gt; The updated quote line.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_CreateQuoteLineFromProductAsync_System_Int32_SuperOffice_WebApi_Data_Product_SuperOffice_WebApi_RequestOptions_”></a> CreateQuoteLineFromProductAsync(int, Product, RequestOptions)

Create a quoteline based on a product.

Parameters

quoteAlternativeId int Primary key of the alternative product Product Product carrier requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine&gt; The updated quote line.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteConnectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteConnectionAsync(int, RequestOptions)

Marks a connection as deleted.

Parameters

quoteConnectionId int Primary key of the connection to delete requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeletePriceListAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeletePriceListAsync(int, RequestOptions)

Deletes the PriceList

Parameters

priceListId int The identity of the PriceList requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteProductAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteProductAsync(int, RequestOptions)

Deletes the Product

Parameters

productId int The identity of the Product requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteQuoteAlternativeAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteAlternativeAsync(int, RequestOptions)

Delete a quote alternative

Parameters

quoteAlternativeId int Id of the quote alternative to delete. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteQuoteAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteAsync(int, RequestOptions)

Delete a Quote

Parameters

quoteId int QuoteId of the Quote to delete. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteQuoteLineAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteLineAsync(int, RequestOptions)

Deletes the QuoteLine in the SuperOffice database

Parameters

quoteLineId int Primary key of the quoteline to delete requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task Nothing

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteQuoteLinesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteLinesAsync(int[], RequestOptions)

Delete the QuoteLines in the SuperOffice database

Parameters

quoteLineIds int[] Primary keys of the quotelines to delete requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task Nothing

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_DeleteSaleTypeQuoteAttachmentAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteSaleTypeQuoteAttachmentAsync(int, RequestOptions)

Deletes the sale type quote attachment with the given id

Parameters

saleTypeQuoteAttachmentId int The ID of the sale type quote attachment row to delete requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_FindProductAsync_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> FindProductAsync(int, string, string, RequestOptions)

Gets a product, from the ProductProvider

Parameters

quoteAlternativeId int Quote alternative to search in. userInput string search string priceListKey string If the pricelist is null or empty, the function will search in all active pricelists. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Product[]&gt; Product array

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteVersionId int VersionId of the quote to be sent; the status of the version will not be changed by calling this method emailBodyTemplateId int 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 Should the main quote document be attached to the email; generally false for Order Confirmations quotedProductsTemplateId int Id of the template for the quote- or order confirmation-lines; zero if no document should be produced includeAttachments bool If true, then the currently specified (in the database) attachments will be included rawMailSubject string Subject line for email, in the correct language, sent in here to have any template variables substituted requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuotePublishDocuments&gt; Carrier specifying the document id’s of all the documents, as well as other results

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteConnectionId int Primary key of the connection currency string Iso currency like: USD or NOK. See 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 Override language/culture codes on this request.

Returns

Task<PriceList[]&gt; The PriceLists that supports a specific currency

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteConnectionId int Primary key of the connection currencyId int SuperOffice currency id. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList[]&gt; The PriceLists that supports a specific currency

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection[]&gt; List of connections

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection[]&gt; List of connections

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetAllInstalledQuoteConnectionsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetAllInstalledQuoteConnectionsAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection[]&gt; List of connections

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteConnectionId int Primary key of the connection currency string Iso currency like: USD or NOK. See 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 Override language/culture codes on this request.

Returns

Task<PriceList[]&gt; The PriceLists that supports a specific currency

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteConnectionId int Primary key of the connection currencyId int SuperOffice currency id. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList[]&gt; The PriceLists that supports a specific currency

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetAllQuoteLineConfigurationsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetAllQuoteLineConfigurationsAsync(RequestOptions)

Returns all the configuration fields

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration[]&gt; Array of QuoteLineConfigurations

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

connectionId int Id of an existing connection, if any. Initializes connection with current config values if non-zero. connectorName string Name of the connector. Ignored if connectionId is non-zero. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FieldMetadataDictionary&gt; carriers

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionAsync(int, RequestOptions)

Returns the specified connection.

Parameters

quoteConnectionId int Primary key of the connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection&gt; The connection

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectionConfigFieldsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionConfigFieldsAsync(int, RequestOptions)

Returns the config fields for the connection.

Parameters

quoteConnectionId int Primary key of the connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<StringDictionary&gt; Config Fields

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectionStartupErrorsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionStartupErrorsAsync(RequestOptions)

Returns an array of PluginResponseInfos for all failed connection initializations.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse[]&gt; Array of PluginResponseInfos for each failed connection initialization.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteConnectionId int Primary key of the connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse&gt; PluginResponseInfo for the connection initialization.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectionsForAssociateAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectionsForAssociateAsync(int, RequestOptions)

Returns all connections available for the specified user.

Parameters

associateId int Primary key of the user requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection[]&gt; The connections

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectorCapabilitiesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectorCapabilitiesAsync(int, RequestOptions)

Gets a list of connector capabilities

Parameters

quoteConnectionId int Primary key of the connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt; Capabilities

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetConnectorCapabilityNamesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectorCapabilityNamesAsync(int, RequestOptions)

Gets a list of all possible connector capabilities

Parameters

quoteConnectionId int Primary key of the connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string[]&gt; Capabilities names

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetExtraInfoAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetExtraInfoAsync(string, RequestOptions)

Converts an xml string into an object representation.

Parameters

quoteLineExtraData string The extra data as xml. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ProductExtraDataField[]&gt; An object representation on the xml

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetInUseQuoteLineConfigurationsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetInUseQuoteLineConfigurationsAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration[]&gt; Array of QuoteLineConfigurations

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

quoteVersionId int VersionId of the quote to be sent; the status of the version will not be changed by calling this method confirmationTemplateId int Id of the template for the order confirmation lines document requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<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_IQuoteAgent_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.

Parameters

quoteVersionId int the QuoteVersionId of the ordered version. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginUrlResponse&gt; The order state. If a new quoteversion is created, the QuoteVersionId will be found in Changes.AddedRecords.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetPriceListAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetPriceListAsync(int, RequestOptions)

Gets a specific PriceList object.

Parameters

priceListId int The identifier of the PriceList object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList&gt; PriceList

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetProductAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetProductAsync(int, string, RequestOptions)

Get a product with the given key

Parameters

quoteConnectionId int The connection this product comes from. eRPProductKey string Primary key of the Product in the ProductProvider requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Product&gt;

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetProductFromDbIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetProductFromDbIdAsync(int, RequestOptions)

Get a product with the given database id

Parameters

productId int The database id of the product requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Product&gt; The product info

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

quoteConnectionId int The connection this product comes from. eRPProductKey string Primary key of the Product in the ProductProvider rank int The rank of the image. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; The base64 encoded image as a string.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteAlternativeAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteAlternativeAsync(int, RequestOptions)

Gets a specific QuoteAlternative object.

Parameters

quoteAlternativeId int The identifier of the QuoteAlternative object requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative&gt; QuoteAlternative

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteAlternativesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteAlternativesAsync(int, RequestOptions)

Get all quote alternatives for a quote version

Parameters

quoteVersionId int QuoteVersionId of the revison to get alternatives for. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative[]&gt; Array of Quote alternatives

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteAsync(int, RequestOptions)

Get a Quote

Parameters

quoteId int QuoteId of the Quote to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Quote&gt; The Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteEntityAsync(int, RequestOptions)

Get a Quote

Parameters

quoteId int QuoteId of the Quote to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteEntity&gt; The Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteEntityFromSaleIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteEntityFromSaleIdAsync(int, RequestOptions)

Get a Quote for a sale

Parameters

saleId int SaleId of the Quote to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteEntity&gt; The Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteFromSaleIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteFromSaleIdAsync(int, RequestOptions)

Get a Quote for a sale

Parameters

saleId int SaleId of the Quote to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Quote&gt; The Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteLineAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLineAsync(int, RequestOptions)

Get QuoteLine from database

Parameters

quoteLineId int Primary key of the quoteline to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine&gt; The updated quote line (If the quoteline was new, it returns with id’s set.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteLineConfigurationAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLineConfigurationAsync(int, RequestOptions)

Returns the configuration field with the given id

Parameters

quoteLineConfigurationId int Id of the QuoteLineConfiguration to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration&gt; QuoteLineConfiguration

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteLineConfigurationFromFieldNameAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLineConfigurationFromFieldNameAsync(string, RequestOptions)

Returns the configuration field with the given field name

Parameters

fieldName string Field name of the QuoteLineConfiguration to get. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration&gt; QuoteLineConfiguration

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteLinesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLinesAsync(int, RequestOptions)

Get all QuoteLines from an alternative

Parameters

quoteAlternativeId int Id of the alternative to return the quotelines for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine[]&gt; QuoteLine array

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteVersionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteVersionAsync(int, RequestOptions)

Get a QuoteVersion

Parameters

quoteVersionId int QuoteVersionId to get information from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersion&gt; Array of Quote versions

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteVersionWorkflowButtonStatesAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteVersionWorkflowButtonStatesAsync(int, int, RequestOptions)

Get all button states for the Quote version dialog.

Parameters

quoteVersionId int Id of the quote version to get the button states for. quoteAlternativeId int Id of the active quote alternative id. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionWorkflowState&gt; Workflow state information

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteVersionWorkflowImageStateAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteVersionWorkflowImageStateAsync(int, RequestOptions)

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

Parameters

quoteVersionId int Id of the quote version to get the version state for. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionButtonState&gt; Image and state name information

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteVersionId int Id of the quote version to get the button states for. quoteAlternativeId int Id of the active quote alternative id. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionWorkflowState&gt; Workflow state information

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteVersionId int Id of the quote version to get the status info for. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionStatusInformation&gt; Most important status text + icon information.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_GetQuoteVersionsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteVersionsAsync(int, RequestOptions)

Get all quote versions for a sale

Parameters

quoteId int QuoteId of the quote to get versions from requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersion[]&gt; Array of Quote versions

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_HasConnectionsAsync_SuperOffice_WebApi_RequestOptions_”></a> HasConnectionsAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse&gt; The response

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

quoteVersionId int The ID of the Quote version documentId int The ID of the document include bool Desired state requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; The new state

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_MoveQuoteLineAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> MoveQuoteLineAsync(int, bool, RequestOptions)

Move quote line rank up/down

Parameters

quoteLineId int Id of quote line to move up/down direction bool True is up, false is down requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task Void return

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteAlternativeId int Id of the alternative to place the order on. markSaleAsSold bool Should the state of the owning Sale be set to sold poNumber string Purchase order number, saved to Quote record orderComment string Order comment, saved to Quote record culture string Desired culture for email body and other culture-sensitive templates/content requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginUrlResponse&gt; Status for the placed order: OkWithInfo / Warn / Error with message or URL to open.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteAlternative int The alternative to be recalculated requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternativeRecalculated&gt; The updated quote version.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteLine QuoteLine The QuoteLine to recalculate changedFields string[] The id of the changed fields in the form ‘TableName.FieldName’ requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine&gt; The updated quote line.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_RejectQuoteVersionAsync_System_Int32_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> RejectQuoteVersionAsync(int, string, int, string, RequestOptions)

Rejects a quote version

Parameters

quoteVersionId int QuoteVersionId to approve. rejectedByText 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 AssociateId of the associate who rejected the quote version. rejectionText string Rejection text. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ApproveRejectResponse&gt; Response of the the operation

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_RemoveProductAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RemoveProductAsync(int, RequestOptions)

Removes a product from the database

Parameters

productId int The database id of the product to remove requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_RequestApprovalAsync_System_Int32_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> RequestApprovalAsync(int, int, string, RequestOptions)

Notifies specified associate that this quote needs approval.

Parameters

quoteVersionId int The quoteversion to be approved. associateId int The associate that should be notified. comment string Details or reason for request requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse&gt; Response of the the operation

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_RestoreConnectionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> RestoreConnectionAsync(int, RequestOptions)

Restores a connection marked as deleted.

Parameters

quoteConnectionId int Primary key of the connection to restore requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task A void return

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveConnectionAsync_SuperOffice_WebApi_Data_QuoteConnection_SuperOffice_WebApi_RequestOptions_”></a> SaveConnectionAsync(QuoteConnection, RequestOptions)

Saves a connection to the database.

Parameters

connection QuoteConnection The connection to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteConnection&gt; The resulting connection.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveConnectionConfigFieldsAsync_System_Int32_SuperOffice_WebApi_Data_StringDictionary_SuperOffice_WebApi_RequestOptions_”></a> SaveConnectionConfigFieldsAsync(int, StringDictionary, RequestOptions)

Saves the connection config fields

Parameters

quoteConnectionId int Primary key of the connection connectionConfigFields StringDictionary ConnectionConfigFields to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<StringDictionary&gt; Config Fields

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

priceList PriceList The PriceList that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PriceList&gt; New or updated PriceList

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

product Product The Product that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Product&gt; New or updated Product

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteAlternative QuoteAlternative The QuoteAlternative that is saved. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteAlternative&gt; New or updated QuoteAlternative

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveQuoteAsync_SuperOffice_WebApi_Data_Quote_SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteAsync(Quote, RequestOptions)

Saves a Quote

Parameters

quote Quote The Quote to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<Quote&gt; The saved Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteEntity QuoteEntity The Quote entity to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteEntity&gt; The saved Quote

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveQuoteLineAsync_SuperOffice_WebApi_Data_QuoteLine_SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteLineAsync(QuoteLine, RequestOptions)

Saves the QuoteLine in the SuperOffice database

Parameters

quoteLine QuoteLine The QuoteLine to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine&gt; The updated quote line (If the quoteline was new, it returns with id’s set.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteLineConfiguration QuoteLineConfiguration The QuoteLineConfiguration to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration&gt; The saved QuoteLineConfiguration.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteLineConfigurations QuoteLineConfiguration[] The QuoteLineConfigurations to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLineConfiguration[]&gt; The saved QuoteLineConfigurations.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveQuoteLinesAsync_SuperOffice_WebApi_Data_QuoteLine___SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteLinesAsync(QuoteLine[], RequestOptions)

Saves the QuoteLines in the SuperOffice database

Parameters

quoteLines QuoteLine[] The QuoteLines to save. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteLine[]&gt; The updated quote lines (If the quoteline was new, it returns with id’s set.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveQuoteVersionAsync_SuperOffice_WebApi_Data_QuoteVersion_SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteVersionAsync(QuoteVersion, RequestOptions)

Saves a quote version

Parameters

quoteVersion QuoteVersion The quote version to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersion&gt; The saved quote version

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_SaveQuoteVersionNumberAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteVersionNumberAsync(int, string, RequestOptions)

Save the quote version number if it is valid

Parameters

quoteVersionId int VersionId of the quote version number string The number to save requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if the number was valid and then saved

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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…

Parameters

quoteVersionId int QuoteVersionId of the quoteversion to send expiryDate DateTime Date the quote expires followupDate DateTime Date for the followup task, to remind the sales rep about the quote followupText string The body text for the follwup appointment, resolved to the correct culture (no resources please) culture string Desired culture for email body and other culture-sensitive templates/content requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginUrlResponse&gt; Response of the operation

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

connectorName string Name of the connector. connectionData StringDictionary Basically the name/value collection of the configuration data requested to create a connection requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<PluginResponse&gt; How the test went

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_ToggleProductInAssortmentAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ToggleProductInAssortmentAsync(int, RequestOptions)

Toggles if the prdouct is in assortment or not

Parameters

productId int The database id of the product to toggle is assortment value of requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_ToggleQuoteVersionAttachmentIncludedAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ToggleQuoteVersionAttachmentIncludedAsync(int, RequestOptions)

Toggle the ‘included’ state of a quote version attachment

Parameters

quoteVersionAttachmentId int The ID of the quote version attachment row requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; The new state

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ToggleSaleTypeQuoteAttachmentDefaultIncludedAsync(int, RequestOptions)

Toggle the ‘default included’ state of a sale type quote attachment

Parameters

saleTypeQuoteAttachmentId int The ID of the sale type quote attachment row requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; The new state

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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

Parameters

quoteVersionId int The version to be update prices for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionValidated&gt; The updated quote version.

<a id=“SuperOffice_WebApi_Agents_IQuoteAgent_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.

Parameters

quoteVersionId int The version to be validated action QuoteVersionButtonAction The action, if any, related to the validate call, like PlaceOrder or SendQuote requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<QuoteVersionValidated&gt; The updated quote version.