<a id=“SuperOffice_WebApi_Agents_QuoteAgent”></a> Class QuoteAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Services for the Quote Management feature, part of the Sale module
Inheritance
object ← AgentBase ← QuoteAgentImplements
IQuoteAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“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 moduleParameters
httpClient 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 moduleParameters
options WebApiOptions
Base URL and authentication values.
httpClient 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 typeParameters
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> 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 versionParameters
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> 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 capabilityParameters
quoteConnectionId int
Primary key of the connection
capabilityName string
Capability name
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> Capability name<a id=“SuperOffice_WebApi_Agents_QuoteAgent_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> 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.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> 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 databaseParameters
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> 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.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> 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.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> 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 addedParameters
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> 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.Parameters
quoteVersionId int
QuoteVersionId of the version to copy the contents from.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersion> The Quote version<a id=“SuperOffice_WebApi_Agents_QuoteAgent_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> 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 instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PriceList> 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 instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Product> 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 instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteAlternative> 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 recordsParameters
quoteVersionId int
The ID of the quote version
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersionAttachment[]> 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.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> 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.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> 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.Parameters
quoteAlternativeId int
Primary key of the alternative
product Product
Product carrier
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLine> 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.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_QuoteAgent_DeletePriceListAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeletePriceListAsync(int, RequestOptions)
Deletes the PriceListParameters
priceListId int
The identity of the PriceList
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_QuoteAgent_DeleteProductAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteProductAsync(int, RequestOptions)
Deletes the ProductParameters
productId int
The identity of the Product
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_QuoteAgent_DeleteQuoteAlternativeAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteAlternativeAsync(int, RequestOptions)
Delete a quote alternativeParameters
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_QuoteAgent_DeleteQuoteAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteAsync(int, RequestOptions)
Delete a QuoteParameters
quoteId int
QuoteId of the Quote to delete.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_QuoteAgent_DeleteQuoteLineAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteLineAsync(int, RequestOptions)
Deletes the QuoteLine in the SuperOffice databaseParameters
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_QuoteAgent_DeleteQuoteLinesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> DeleteQuoteLinesAsync(int[], RequestOptions)
Delete the QuoteLines in the SuperOffice databaseParameters
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_QuoteAgent_DeleteSaleTypeQuoteAttachmentAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteSaleTypeQuoteAttachmentAsync(int, RequestOptions)
Deletes the sale type quote attachment with the given idParameters
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_QuoteAgent_FindProductAsync_System_Int32_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> FindProductAsync(int, string, string, RequestOptions)
Gets a product, from the ProductProviderParameters
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[]> 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.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> 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.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[]> 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.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[]> 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.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteConnection[]> 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 callParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteConnection[]> 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.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteConnection[]> 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.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[]> 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.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[]> The PriceLists that supports a specific currency<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetAllQuoteLineConfigurationsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetAllQuoteLineConfigurationsAsync(RequestOptions)
Returns all the configuration fieldsParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration[]> 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.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> carriers<a id=“SuperOffice_WebApi_Agents_QuoteAgent_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> 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.Parameters
quoteConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> 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.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse[]> 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.Parameters
quoteConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> 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.Parameters
associateId int
Primary key of the user
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteConnection[]> The connections<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetConnectorCapabilitiesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectorCapabilitiesAsync(int, RequestOptions)
Gets a list of connector capabilitiesParameters
quoteConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> Capabilities<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetConnectorCapabilityNamesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetConnectorCapabilityNamesAsync(int, RequestOptions)
Gets a list of all possible connector capabilitiesParameters
quoteConnectionId int
Primary key of the connection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<string[]> 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.Parameters
quoteLineExtraData string
The extra data as xml.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ProductExtraDataField[]> 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.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration[]> 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 PDFParameters
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> 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.Parameters
quoteVersionId int
the QuoteVersionId of the ordered version.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginUrlResponse> 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.Parameters
priceListId int
The identifier of the PriceList object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PriceList> 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 keyParameters
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><a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetProductFromDbIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetProductFromDbIdAsync(int, RequestOptions)
Get a product with the given database idParameters
productId int
The database id of the product
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Product> 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 ProductProviderParameters
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> 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.Parameters
quoteAlternativeId int
The identifier of the QuoteAlternative object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteAlternative> QuoteAlternative<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteAlternativesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteAlternativesAsync(int, RequestOptions)
Get all quote alternatives for a quote versionParameters
quoteVersionId int
QuoteVersionId of the revison to get alternatives for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteAlternative[]> Array of Quote alternatives<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteAsync(int, RequestOptions)
Get a QuoteParameters
quoteId int
QuoteId of the Quote to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Quote> The Quote<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteEntityAsync(int, RequestOptions)
Get a QuoteParameters
quoteId int
QuoteId of the Quote to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteEntity> The Quote<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteEntityFromSaleIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteEntityFromSaleIdAsync(int, RequestOptions)
Get a Quote for a saleParameters
saleId int
SaleId of the Quote to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteEntity> The Quote<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteFromSaleIdAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteFromSaleIdAsync(int, RequestOptions)
Get a Quote for a saleParameters
saleId int
SaleId of the Quote to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Quote> The Quote<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteLineAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLineAsync(int, RequestOptions)
Get QuoteLine from databaseParameters
quoteLineId int
Primary key of the quoteline to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLine> 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 idParameters
quoteLineConfigurationId int
Id of the QuoteLineConfiguration to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration> 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 nameParameters
fieldName string
Field name of the QuoteLineConfiguration to get.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration> QuoteLineConfiguration<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteLinesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteLinesAsync(int, RequestOptions)
Get all QuoteLines from an alternativeParameters
quoteAlternativeId int
Id of the alternative to return the quotelines for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLine[]> QuoteLine array<a id=“SuperOffice_WebApi_Agents_QuoteAgent_GetQuoteVersionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetQuoteVersionAsync(int, RequestOptions)
Get a QuoteVersionParameters
quoteVersionId int
QuoteVersionId to get information from
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersion> 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.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> 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.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> 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.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> 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.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> 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 saleParameters
quoteId int
QuoteId of the quote to get versions from
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersion[]> 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.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PluginResponse> 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 versionsParameters
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> 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/downParameters
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_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.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> 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.Parameters
quoteAlternative int
The alternative to be recalculated
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteAlternativeRecalculated> 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.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> 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 versionParameters
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> 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 databaseParameters
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_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.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> 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.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_QuoteAgent_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> 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 fieldsParameters
quoteConnectionId int
Primary key of the connection
connectionConfigFields StringDictionary
ConnectionConfigFields to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<StringDictionary> 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.Parameters
priceList PriceList
The PriceList that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<PriceList> 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.Parameters
product Product
The Product that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Product> 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.Parameters
quoteAlternative QuoteAlternative
The QuoteAlternative that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteAlternative> New or updated QuoteAlternative<a id=“SuperOffice_WebApi_Agents_QuoteAgent_SaveQuoteAsync_SuperOffice_WebApi_Data_Quote_SuperOffice_WebApi_RequestOptions_”></a> SaveQuoteAsync(Quote, RequestOptions)
Saves a QuoteParameters
quote Quote
The Quote to save
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<Quote> 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.Parameters
quoteEntity QuoteEntity
The Quote entity to save
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteEntity> 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 databaseParameters
quoteLine QuoteLine
The QuoteLine to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLine> 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.Parameters
quoteLineConfiguration QuoteLineConfiguration
The QuoteLineConfiguration to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration> 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.Parameters
quoteLineConfigurations QuoteLineConfiguration[]
The QuoteLineConfigurations to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLineConfiguration[]> 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 databaseParameters
quoteLines QuoteLine[]
The QuoteLines to save.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteLine[]> 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 versionParameters
quoteVersion QuoteVersion
The quote version to save
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersion> 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 validParameters
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> 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…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> 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.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> 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 notParameters
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_QuoteAgent_ToggleQuoteVersionAttachmentIncludedAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ToggleQuoteVersionAttachmentIncludedAsync(int, RequestOptions)
Toggle the ‘included’ state of a quote version attachmentParameters
quoteVersionAttachmentId int
The ID of the quote version attachment row
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> 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 attachmentParameters
saleTypeQuoteAttachmentId int
The ID of the sale type quote attachment row
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool> 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 versionParameters
quoteVersionId int
The version to be update prices for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<QuoteVersionValidated> 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.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.