Interface IQuoteAgent
Interface for the Quote Agent Services for the Quote Management feature, part of the Sale module
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Quote Agent", "Interface for the Quote Agent. Services for the Quote Management feature, part of the Sale module")]
public interface IQuoteAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
Methods
AddSaleTypeQuoteAttachment(Int32, Int32)
Adds a new quote attachment document to a sale type
Declaration
int AddSaleTypeQuoteAttachment(int saleTypeId, int documentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleTypeId | The ID of the sale type |
Int32 | documentId | The ID of the document |
Returns
Type | Description |
---|---|
Int32 | ID of the new sale type quote attachment row |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
ApproveQuoteVersion(Int32, String, Int32, String)
Approves a quote version
Declaration
ApproveRejectResponse ApproveQuoteVersion(int quoteVersionId, string approvedByText, int approvedByAssociateId, string approvalText)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId to approve. |
String | approvedByText | '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. |
Int32 | approvedByAssociateId | AssociateId of the associate who approved the quote version. |
String | approvalText | Approval text. |
Returns
Type | Description |
---|---|
ApproveRejectResponse | Response of the the operation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CancelApprovalRequest(Int32)
Cancel a pending quote approval request.
Declaration
PluginResponse CancelApprovalRequest(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The quoteversion for which approval was previously sent. |
Returns
Type | Description |
---|---|
PluginResponse | Response of the the operation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CanConnectorProvideCapability(Int32, String)
Can the connector provide the capability
Declaration
bool CanConnectorProvideCapability(int quoteConnectionId, string capabilityName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
String | capabilityName | Capability name |
Returns
Type | Description |
---|---|
Boolean | Capability name |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CopyQuoteAlternative(Int32, Int32, String)
Copy a quote alternative from the same sale and adds it to a version.
Declaration
QuoteAlternative CopyQuoteAlternative(int quoteVersionId, int quoteAlternativeId, string quoteAlternativeName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId of the version to copy the alternative to. |
Int32 | quoteAlternativeId | QuoteAlternativeId of the alternative to make a copy of. |
String | quoteAlternativeName | The name to set on the new alternative. |
Returns
Type | Description |
---|---|
QuoteAlternative | The copied QuoteAlternative. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CopySuperOfficePriceList(Int32, String, DateTime, DateTime, Int32, Boolean)
Create a copy of a PriceList in the SuperOffice database
Declaration
PriceList CopySuperOfficePriceList(int originalPriceListId, string newName, DateTime validFrom, DateTime validTo, int newCurrencyId, bool convertCurrency)
Parameters
Type | Name | Description |
---|---|---|
Int32 | originalPriceListId | Id of the PriceList to be copied |
String | newName | Name of the copied PriceList |
DateTime | validFrom | Start date for the new pricelist. |
DateTime | validTo | End date for the new pricelist. |
Int32 | newCurrencyId | 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. |
Boolean | convertCurrency | If true, product prices will be recalculated to the new currency. If false, product prices will be set to zero. |
Returns
Type | Description |
---|---|
PriceList | The copied PriceList |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateAndSaveQuote(Int32, Int32, String)
Creates a new quote on a sale.
Declaration
QuoteEntity CreateAndSaveQuote(int saleId, int connectionId, string firstAlternativeName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleId | SaleId of the connected sale |
Int32 | connectionId | ConnectionId |
String | firstAlternativeName | Name to be given to the default alternative |
Returns
Type | Description |
---|---|
QuoteEntity | Quote carrier |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateAndSaveQuoteFromSale(Int32, Int32)
Creates a copy the active version with connected alternatives and quotelines from another sale.
Declaration
QuoteEntity CreateAndSaveQuoteFromSale(int copyFromSaleId, int copyToSaleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | copyFromSaleId | Id of the sale to copy the active quote from. |
Int32 | copyToSaleId | Id of the sale to copy the active quote to. |
Returns
Type | Description |
---|---|
QuoteEntity | The created Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateAndSaveQuoteLines(Int32, String[])
Create and save quotelines based on the product keys added
Declaration
int CreateAndSaveQuoteLines(int quoteAlternativeId, string[] erpProductKeys)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Primary key of the alternative |
String[] | erpProductKeys | Array of the product keys to add |
Returns
Type | Description |
---|---|
Int32 | Count of added quoteLines |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateAndSaveQuoteVersion(Int32)
Created a new QuoteVersion based on another QuoteVersion on the same Quote.
Declaration
QuoteVersion CreateAndSaveQuoteVersion(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId of the version to copy the contents from. |
Returns
Type | Description |
---|---|
QuoteVersion | The Quote version |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateConnectionFromConnectorName(String)
Create a new connection.
Declaration
QuoteConnection CreateConnectionFromConnectorName(string connectorName)
Parameters
Type | Name | Description |
---|---|---|
String | connectorName | The name of the connector to create this connection for. |
Returns
Type | Description |
---|---|
QuoteConnection | The created connection |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateDefaultPriceList()
Loading default values into a new PriceList. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
PriceList CreateDefaultPriceList()
Returns
Type | Description |
---|---|
PriceList | New PriceList with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateDefaultProduct()
Loading default values into a new Product. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Product CreateDefaultProduct()
Returns
Type | Description |
---|---|
Product | New Product with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateDefaultQuoteAlternative()
Loading default values into a new QuoteAlternative. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
QuoteAlternative CreateDefaultQuoteAlternative()
Returns
Type | Description |
---|---|
QuoteAlternative | New QuoteAlternative with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateOrUpdateQuoteVersionAttachments(Int32)
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
Declaration
QuoteVersionAttachment[] CreateOrUpdateQuoteVersionAttachments(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The ID of the quote version |
Returns
Type | Description |
---|---|
QuoteVersionAttachment[] | The current attachments for the given Quote version, after all updates have been completed |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateQuoteAlternative(Int32, String, String)
Create a new quote alternative on a version.
Declaration
QuoteAlternative CreateQuoteAlternative(int quoteVersionId, string quoteAlternativeName, string quoteAlternativeDescription)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId of the version to create the alternative on. |
String | quoteAlternativeName | The name to set on the new alternative. |
String | quoteAlternativeDescription | The description to set on the new alternative. |
Returns
Type | Description |
---|---|
QuoteAlternative | The newly created QuoteAlternative. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateQuoteLine(Int32, String)
Create a quoteline based on a product key.
Declaration
QuoteLine CreateQuoteLine(int quoteAlternativeId, string eRPProductKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Primary key of the alternative |
String | eRPProductKey | Primary key of the product in the ProductProvider |
Returns
Type | Description |
---|---|
QuoteLine | The updated quote line. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
CreateQuoteLineFromProduct(Int32, Product)
Create a quoteline based on a product.
Declaration
QuoteLine CreateQuoteLineFromProduct(int quoteAlternativeId, Product product)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Primary key of the alternative |
Product | product | Product carrier |
Returns
Type | Description |
---|---|
QuoteLine | The updated quote line. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteConnection(Int32)
Marks a connection as deleted.
Declaration
void DeleteConnection(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection to delete |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeletePriceList(Int32)
Deletes the PriceList
Declaration
void DeletePriceList(int priceListId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | priceListId | The identity of the PriceList |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteProduct(Int32)
Deletes the Product
Declaration
void DeleteProduct(int productId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | productId | The identity of the Product |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteQuote(Int32)
Delete a Quote
Declaration
void DeleteQuote(int quoteId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteId | QuoteId of the Quote to delete. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteQuoteAlternative(Int32)
Delete a quote alternative
Declaration
void DeleteQuoteAlternative(int quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Id of the quote alternative to delete. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteQuoteLine(Int32)
Deletes the QuoteLine in the SuperOffice database
Declaration
void DeleteQuoteLine(int quoteLineId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineId | Primary key of the quoteline to delete |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteQuoteLines(Int32[])
Delete the QuoteLines in the SuperOffice database
Declaration
void DeleteQuoteLines(int[] quoteLineIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | quoteLineIds | Primary keys of the quotelines to delete |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
DeleteSaleTypeQuoteAttachment(Int32)
Deletes the sale type quote attachment with the given id
Declaration
void DeleteSaleTypeQuoteAttachment(int saleTypeQuoteAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleTypeQuoteAttachmentId | The ID of the sale type quote attachment row to delete |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
FindProduct(Int32, String, String)
Gets a product, from the ProductProvider
Declaration
Product[] FindProduct(int quoteAlternativeId, string userInput, string priceListKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Quote alternative to search in. |
String | userInput | search string |
String | priceListKey | If the pricelist is null or empty, the function will search in all active pricelists. |
Returns
Type | Description |
---|---|
Product[] | Product array |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GenerateQuoteDocuments(Int32, Int32, Boolean, Int32, Boolean, String)
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.
Declaration
QuotePublishDocuments GenerateQuoteDocuments(int quoteVersionId, int emailBodyTemplateId, bool attachMainDocument, int quotedProductsTemplateId, bool includeAttachments, string rawMailSubject)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | VersionId of the quote to be sent; the status of the version will not be changed by calling this method |
Int32 | emailBodyTemplateId | 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 |
Boolean | attachMainDocument | Should the main quote document be attached to the email; generally false for Order Confirmations |
Int32 | quotedProductsTemplateId | Id of the template for the quote- or order confirmation-lines; zero if no document should be produced |
Boolean | includeAttachments | If true, then the currently specified (in the database) attachments will be included |
String | rawMailSubject | Subject line for email, in the correct language, sent in here to have any template variables substituted |
Returns
Type | Description |
---|---|
QuotePublishDocuments | Carrier specifying the document id's of all the documents, as well as other results |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetActivePriceLists(Int32, String)
Gets the available active PriceLists in a specific currency. Will return empty array if there is no PriceList with the stated currency available.
Declaration
PriceList[] GetActivePriceLists(int quoteConnectionId, string currency)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
String | currency | 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. |
Returns
Type | Description |
---|---|
PriceList[] | The PriceLists that supports a specific currency |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetActivePriceListsByCurrencyId(Int32, Int32)
Gets the available active PriceLists in a specific currency. Will return empty array if there is no PriceList with the stated currency available.
Declaration
PriceList[] GetActivePriceListsByCurrencyId(int quoteConnectionId, int currencyId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Int32 | currencyId | SuperOffice currency id. |
Returns
Type | Description |
---|---|
PriceList[] | The PriceLists that supports a specific currency |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllAvailableQuoteConnections()
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.
Declaration
QuoteConnection[] GetAllAvailableQuoteConnections()
Returns
Type | Description |
---|---|
QuoteConnection[] | List of connections |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllAvailableQuoteConnectionsWithPriceLists()
Get all available connections. Some installed connections may not be available to the user. Includes pricelists for the connection. This is a heavy call
Declaration
QuoteConnection[] GetAllAvailableQuoteConnectionsWithPriceLists()
Returns
Type | Description |
---|---|
QuoteConnection[] | List of connections |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllInstalledQuoteConnections()
Get all installed connections. Some installed connections may not be available to the user.
Declaration
QuoteConnection[] GetAllInstalledQuoteConnections()
Returns
Type | Description |
---|---|
QuoteConnection[] | List of connections |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllPriceLists(Int32, String)
Gets the all PriceLists in all currencies, including those inactive. Will return empty array if there is no PriceList available.
Declaration
PriceList[] GetAllPriceLists(int quoteConnectionId, string currency)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
String | currency | 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. |
Returns
Type | Description |
---|---|
PriceList[] | The PriceLists that supports a specific currency |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllPriceListsByCurrencyId(Int32, Int32)
Gets the all PriceLists in all currencies, including those inactive. Will return empty array if there is no PriceList available.
Declaration
PriceList[] GetAllPriceListsByCurrencyId(int quoteConnectionId, int currencyId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Int32 | currencyId | SuperOffice currency id. |
Returns
Type | Description |
---|---|
PriceList[] | The PriceLists that supports a specific currency |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetAllQuoteLineConfigurations()
Returns all the configuration fields
Declaration
QuoteLineConfiguration[] GetAllQuoteLineConfigurations()
Returns
Type | Description |
---|---|
QuoteLineConfiguration[] | Array of QuoteLineConfigurations |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConfigurationFields(Int32, String)
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.
Declaration
FieldMetadataDictionary GetConfigurationFields(int connectionId, string connectorName)
Parameters
Type | Name | Description |
---|---|---|
Int32 | connectionId | Id of an existing connection, if any. Initializes connection with current config values if non-zero. |
String | connectorName | Name of the connector. Ignored if connectionId is non-zero. |
Returns
Type | Description |
---|---|
FieldMetadataDictionary | carriers |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnection(Int32)
Returns the specified connection.
Declaration
QuoteConnection GetConnection(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Returns
Type | Description |
---|---|
QuoteConnection | The connection |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectionConfigFields(Int32)
Returns the config fields for the connection.
Declaration
StringDictionary GetConnectionConfigFields(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Returns
Type | Description |
---|---|
StringDictionary | Config Fields |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectionsForAssociate(Int32)
Returns all connections available for the specified user.
Declaration
QuoteConnection[] GetConnectionsForAssociate(int associateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | Primary key of the user |
Returns
Type | Description |
---|---|
QuoteConnection[] | The connections |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectionStartupErrors()
Returns an array of PluginResponseInfos for all failed connection initializations.
Declaration
PluginResponse[] GetConnectionStartupErrors()
Returns
Type | Description |
---|---|
PluginResponse[] | Array of PluginResponseInfos for each failed connection initialization. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectionStartupResponse(Int32)
Returns the PluginResponseInfo for the connection initialization. Does not initialize the connection, just returns what happened when initialize was called.
Declaration
PluginResponse GetConnectionStartupResponse(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Returns
Type | Description |
---|---|
PluginResponse | PluginResponseInfo for the connection initialization. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectorCapabilities(Int32)
Gets a list of connector capabilities
Declaration
string[] GetConnectorCapabilities(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Returns
Type | Description |
---|---|
String[] | Capabilities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetConnectorCapabilityNames(Int32)
Gets a list of all possible connector capabilities
Declaration
string[] GetConnectorCapabilityNames(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
Returns
Type | Description |
---|---|
String[] | Capabilities names |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetExtraInfo(String)
Converts an xml string into an object representation.
Declaration
ProductExtraDataField[] GetExtraInfo(string quoteLineExtraData)
Parameters
Type | Name | Description |
---|---|---|
String | quoteLineExtraData | The extra data as xml. |
Returns
Type | Description |
---|---|
ProductExtraDataField[] | An object representation on the xml |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetInUseQuoteLineConfigurations()
Returns the configuration fields that should be visible in the GUI.
Declaration
QuoteLineConfiguration[] GetInUseQuoteLineConfigurations()
Returns
Type | Description |
---|---|
QuoteLineConfiguration[] | Array of QuoteLineConfigurations |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetOrderConfirmation(Int32, Int32)
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
Declaration
string GetOrderConfirmation(int quoteVersionId, int confirmationTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | VersionId of the quote to be sent; the status of the version will not be changed by calling this method |
Int32 | confirmationTemplateId | Id of the template for the order confirmation lines document |
Returns
Type | Description |
---|---|
String | Base64-encoded binary data, that is in fact a PDF document that should be shown to the user |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetOrderState(Int32)
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.
Declaration
PluginUrlResponse GetOrderState(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | the QuoteVersionId of the ordered version. |
Returns
Type | Description |
---|---|
PluginUrlResponse | The order state. If a new quoteversion is created, the QuoteVersionId will be found in Changes.AddedRecords. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetPriceList(Int32)
Gets a PriceList object.
Declaration
PriceList GetPriceList(int priceListId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | priceListId | The identifier of the PriceList object |
Returns
Type | Description |
---|---|
PriceList | PriceList |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetProduct(Int32, String)
Get a product with the given key
Declaration
Product GetProduct(int quoteConnectionId, string eRPProductKey)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | The connection this product comes from. |
String | eRPProductKey | Primary key of the Product in the ProductProvider |
Returns
Type | Description |
---|---|
Product |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetProductFromDbId(Int32)
Get a product with the given database id
Declaration
Product GetProductFromDbId(int productId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | productId | The database id of the product |
Returns
Type | Description |
---|---|
Product | The product info |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetProductImage(Int32, String, Int32)
Gets an image connected to a product, from the ProductProvider
Declaration
string GetProductImage(int quoteConnectionId, string eRPProductKey, int rank)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | The connection this product comes from. |
String | eRPProductKey | Primary key of the Product in the ProductProvider |
Int32 | rank | The rank of the image. |
Returns
Type | Description |
---|---|
String | The base64 encoded image as a string. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuote(Int32)
Get a Quote
Declaration
Quote GetQuote(int quoteId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteId | QuoteId of the Quote to get. |
Returns
Type | Description |
---|---|
Quote | The Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteAlternative(Int32)
Gets a QuoteAlternative object.
Declaration
QuoteAlternative GetQuoteAlternative(int quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | The identifier of the QuoteAlternative object |
Returns
Type | Description |
---|---|
QuoteAlternative | QuoteAlternative |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteAlternatives(Int32)
Get all quote alternatives for a quote version
Declaration
QuoteAlternative[] GetQuoteAlternatives(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId of the revison to get alternatives for. |
Returns
Type | Description |
---|---|
QuoteAlternative[] | Array of Quote alternatives |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteEntity(Int32)
Get a Quote
Declaration
QuoteEntity GetQuoteEntity(int quoteId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteId | QuoteId of the Quote to get. |
Returns
Type | Description |
---|---|
QuoteEntity | The Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteEntityFromSaleId(Int32)
Get a Quote for a sale
Declaration
QuoteEntity GetQuoteEntityFromSaleId(int saleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleId | SaleId of the Quote to get. |
Returns
Type | Description |
---|---|
QuoteEntity | The Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteFromSaleId(Int32)
Get a Quote for a sale
Declaration
Quote GetQuoteFromSaleId(int saleId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleId | SaleId of the Quote to get. |
Returns
Type | Description |
---|---|
Quote | The Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteLine(Int32)
Get QuoteLine from database
Declaration
QuoteLine GetQuoteLine(int quoteLineId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineId | Primary key of the quoteline to get. |
Returns
Type | Description |
---|---|
QuoteLine | The updated quote line (If the quoteline was new, it returns with id's set. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteLineConfiguration(Int32)
Returns the configuration field with the given id
Declaration
QuoteLineConfiguration GetQuoteLineConfiguration(int quoteLineConfigurationId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineConfigurationId | Id of the QuoteLineConfiguration to get. |
Returns
Type | Description |
---|---|
QuoteLineConfiguration | QuoteLineConfiguration |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteLineConfigurationFromFieldName(String)
Returns the configuration field with the given field name
Declaration
QuoteLineConfiguration GetQuoteLineConfigurationFromFieldName(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
String | fieldName | Field name of the QuoteLineConfiguration to get. |
Returns
Type | Description |
---|---|
QuoteLineConfiguration | QuoteLineConfiguration |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteLineImage(Int32, Int32)
Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
Declaration
Image GetQuoteLineImage(int quoteLineId, int rank)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineId | Primary key of the quoteline |
Int32 | rank | The rank of the image. |
Returns
Type | Description |
---|---|
Image | The image. Returns null if no image available. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteLines(Int32)
Get all QuoteLines from an alternative
Declaration
QuoteLine[] GetQuoteLines(int quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Id of the alternative to return the quotelines for |
Returns
Type | Description |
---|---|
QuoteLine[] | QuoteLine array |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteList(String)
Gets a named list from the connector Return array of QuoteListItems. Return NULL if the given list is not supported.
Declaration
QuoteListItem[] GetQuoteList(string quoteListType)
Parameters
Type | Name | Description |
---|---|---|
String | quoteListType | The name of the requested list, for instance: ProductCategory, ProductFamily, ProductType, PaymentTerms, PaymentType, DeliveryTerms, DeliveryType. |
Returns
Type | Description |
---|---|
QuoteListItem[] | The list items |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersion(Int32)
Get a QuoteVersion
Declaration
QuoteVersion GetQuoteVersion(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId to get information from |
Returns
Type | Description |
---|---|
QuoteVersion | Array of Quote versions |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersions(Int32)
Get all quote versions for a sale
Declaration
QuoteVersion[] GetQuoteVersions(int quoteId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteId | QuoteId of the quote to get versions from |
Returns
Type | Description |
---|---|
QuoteVersion[] | Array of Quote versions |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersionWorkflowButtonStates(Int32, Int32)
Get all button states for the Quote version dialog.
Declaration
QuoteVersionWorkflowState GetQuoteVersionWorkflowButtonStates(int quoteVersionId, int quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | Id of the quote version to get the button states for. |
Int32 | quoteAlternativeId | Id of the active quote alternative id. |
Returns
Type | Description |
---|---|
QuoteVersionWorkflowState | Workflow state information |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersionWorkflowImageState(Int32)
Get state icon and name for the Quote version dialog header.
Declaration
QuoteVersionButtonState GetQuoteVersionWorkflowImageState(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | Id of the quote version to get the version state for. |
Returns
Type | Description |
---|---|
QuoteVersionButtonState | Image and state name information |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersionWorkflowState(Int32, Int32)
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.
Declaration
QuoteVersionWorkflowState GetQuoteVersionWorkflowState(int quoteVersionId, int quoteAlternativeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | Id of the quote version to get the button states for. |
Int32 | quoteAlternativeId | Id of the active quote alternative id. |
Returns
Type | Description |
---|---|
QuoteVersionWorkflowState | Workflow state information |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
GetQuoteVersionWorkflowStatusInfo(Int32)
Get status info for the Quote version dialog header. Collects most important warnings/errors from across all quotelines/alternatives in this quote version.
Declaration
QuoteVersionStatusInformation GetQuoteVersionWorkflowStatusInfo(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | Id of the quote version to get the status info for. |
Returns
Type | Description |
---|---|
QuoteVersionStatusInformation | Most important status text + icon information. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
HasConnections()
Whether or not the system has any connections available for this user.
Declaration
PluginResponse HasConnections()
Returns
Type | Description |
---|---|
PluginResponse | The response |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
IncludeQuoteVersionAttachment(Int32, Int32, Boolean)
Toggle the 'included' state of a quote version attachment; will throw exceptions if called on locked versions
Declaration
bool IncludeQuoteVersionAttachment(int quoteVersionId, int documentId, bool include)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The ID of the Quote version |
Int32 | documentId | The ID of the document |
Boolean | include | Desired state |
Returns
Type | Description |
---|---|
Boolean | The new state |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
MoveQuoteLine(Int32, Boolean)
Move quote line rank up/down
Declaration
void MoveQuoteLine(int quoteLineId, bool direction)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineId | Id of quote line to move up/down |
Boolean | direction | True is up, false is down |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
PlaceOrder(Int32, Boolean, String, String, String)
Place an order in the ERP system.
Declaration
PluginUrlResponse PlaceOrder(int quoteAlternativeId, bool markSaleAsSold, string poNumber, string orderComment, string culture)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternativeId | Id of the alternative to place the order on. |
Boolean | markSaleAsSold | Should the state of the owning Sale be set to sold |
String | poNumber | Purchase order number, saved to Quote record |
String | orderComment | Order comment, saved to Quote record |
String | culture | Desired culture for email body and other culture-sensitive templates/content |
Returns
Type | Description |
---|---|
PluginUrlResponse | Status for the placed order: OkWithInfo / Warn / Error with message or URL to open. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RecalculateQuoteAlternative(Int32)
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.
Declaration
QuoteAlternativeRecalculated RecalculateQuoteAlternative(int quoteAlternative)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteAlternative | The alternative to be recalculated |
Returns
Type | Description |
---|---|
QuoteAlternativeRecalculated | The updated quote version. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RecalculateQuoteLine(QuoteLine, String[])
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.
Declaration
QuoteLine RecalculateQuoteLine(QuoteLine quoteLine, string[] changedFields)
Parameters
Type | Name | Description |
---|---|---|
QuoteLine | quoteLine | The QuoteLine to recalculate |
String[] | changedFields | The id of the changed fields in the form 'TableName.FieldName' |
Returns
Type | Description |
---|---|
QuoteLine | The updated quote line. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RejectQuoteVersion(Int32, String, Int32, String)
Rejects a quote version
Declaration
ApproveRejectResponse RejectQuoteVersion(int quoteVersionId, string rejectedByText, int rejectedByAssociateId, string rejectionText)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId to approve. |
String | rejectedByText | '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. |
Int32 | rejectedByAssociateId | AssociateId of the associate who rejected the quote version. |
String | rejectionText | Rejection text. |
Returns
Type | Description |
---|---|
ApproveRejectResponse | Response of the the operation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RemoveProduct(Int32)
Removes a product from the database
Declaration
void RemoveProduct(int productId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | productId | The database id of the product to remove |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RequestApproval(Int32, Int32, String)
Notifies specified associate that this quote needs approval.
Declaration
PluginResponse RequestApproval(int quoteVersionId, int associateId, string comment)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The quoteversion to be approved. |
Int32 | associateId | The associate that should be notified. |
String | comment | Details or reason for request |
Returns
Type | Description |
---|---|
PluginResponse | Response of the the operation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
RestoreConnection(Int32)
Restores a connection marked as deleted.
Declaration
void RestoreConnection(int quoteConnectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection to restore |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveConnection(QuoteConnection)
Saves a connection to the database.
Declaration
QuoteConnection SaveConnection(QuoteConnection connection)
Parameters
Type | Name | Description |
---|---|---|
QuoteConnection | connection | The connection to save. |
Returns
Type | Description |
---|---|
QuoteConnection | The resulting connection. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveConnectionConfigFields(Int32, StringDictionary)
Saves the connection config fields
Declaration
StringDictionary SaveConnectionConfigFields(int quoteConnectionId, StringDictionary connectionConfigFields)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteConnectionId | Primary key of the connection |
StringDictionary | connectionConfigFields | ConnectionConfigFields to save. |
Returns
Type | Description |
---|---|
StringDictionary | Config Fields |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SavePriceList(PriceList)
Updates the existing PriceList or creates a new PriceList if the id parameter is empty
Declaration
PriceList SavePriceList(PriceList priceList)
Parameters
Type | Name | Description |
---|---|---|
PriceList | priceList | The PriceList that is saved. |
Returns
Type | Description |
---|---|
PriceList | New or updated PriceList |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveProduct(Product)
Updates the existing Product or creates a new Product if the id parameter is empty
Declaration
Product SaveProduct(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | The Product that is saved. |
Returns
Type | Description |
---|---|
Product | New or updated Product |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuote(Quote)
Saves a Quote
Declaration
Quote SaveQuote(Quote quote)
Parameters
Type | Name | Description |
---|---|---|
Quote | quote | The Quote to save |
Returns
Type | Description |
---|---|
Quote | The saved Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteAlternative(QuoteAlternative)
Updates the existing QuoteAlternative or creates a new QuoteAlternative if the id parameter is empty
Declaration
QuoteAlternative SaveQuoteAlternative(QuoteAlternative quoteAlternative)
Parameters
Type | Name | Description |
---|---|---|
QuoteAlternative | quoteAlternative | The QuoteAlternative that is saved. |
Returns
Type | Description |
---|---|
QuoteAlternative | New or updated QuoteAlternative |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteEntity(QuoteEntity)
Saves a QuoteEntity. Versions and alternatives will not be saved by this call.
Declaration
QuoteEntity SaveQuoteEntity(QuoteEntity quoteEntity)
Parameters
Type | Name | Description |
---|---|---|
QuoteEntity | quoteEntity | The Quote entity to save |
Returns
Type | Description |
---|---|
QuoteEntity | The saved Quote |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteLine(QuoteLine)
Saves the QuoteLine in the SuperOffice database
Declaration
QuoteLine SaveQuoteLine(QuoteLine quoteLine)
Parameters
Type | Name | Description |
---|---|---|
QuoteLine | quoteLine | The QuoteLine to save. |
Returns
Type | Description |
---|---|
QuoteLine | The updated quote line (If the quoteline was new, it returns with id's set. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteLineConfiguration(QuoteLineConfiguration)
Save a QuoteLineConfiguration object. It is not possible to add a new configuration.
Declaration
QuoteLineConfiguration SaveQuoteLineConfiguration(QuoteLineConfiguration quoteLineConfiguration)
Parameters
Type | Name | Description |
---|---|---|
QuoteLineConfiguration | quoteLineConfiguration | The QuoteLineConfiguration to save. |
Returns
Type | Description |
---|---|
QuoteLineConfiguration | The saved QuoteLineConfiguration. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteLineConfigurations(QuoteLineConfiguration[])
Save a collection of QuoteLineConfigurations. It is not possible to add a new configurations.
Declaration
QuoteLineConfiguration[] SaveQuoteLineConfigurations(QuoteLineConfiguration[] quoteLineConfigurations)
Parameters
Type | Name | Description |
---|---|---|
QuoteLineConfiguration[] | quoteLineConfigurations | The QuoteLineConfigurations to save. |
Returns
Type | Description |
---|---|
QuoteLineConfiguration[] | The saved QuoteLineConfigurations. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteLineImage(Int32, Image, Int32)
Saves the image connected to a quoteline in the SuperOffice database
Declaration
void SaveQuoteLineImage(int quoteLineId, Image image, int rank)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteLineId | Primary key of the quoteline |
Image | image | The image. |
Int32 | rank | The rank of the image. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteLines(QuoteLine[])
Saves the QuoteLines in the SuperOffice database
Declaration
QuoteLine[] SaveQuoteLines(QuoteLine[] quoteLines)
Parameters
Type | Name | Description |
---|---|---|
QuoteLine[] | quoteLines | The QuoteLines to save. |
Returns
Type | Description |
---|---|
QuoteLine[] | The updated quote lines (If the quoteline was new, it returns with id's set. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteVersion(QuoteVersion)
Saves a quote version
Declaration
QuoteVersion SaveQuoteVersion(QuoteVersion quoteVersion)
Parameters
Type | Name | Description |
---|---|---|
QuoteVersion | quoteVersion | The quote version to save |
Returns
Type | Description |
---|---|
QuoteVersion | The saved quote version |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SaveQuoteVersionNumber(Int32, String)
Save the quote version number if it is valid
Declaration
bool SaveQuoteVersionNumber(int quoteVersionId, string number)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | VersionId of the quote version |
String | number | The number to save |
Returns
Type | Description |
---|---|
Boolean | True if the number was valid and then saved |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
SendQuoteVersion(Int32, DateTime, DateTime, String, String)
Send the quote to the user's customer. More parameters to be added later...
Declaration
PluginUrlResponse SendQuoteVersion(int quoteVersionId, DateTime expiryDate, DateTime followupDate, string followupText, string culture)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | QuoteVersionId of the quoteversion to send |
DateTime | expiryDate | Date the quote expires |
DateTime | followupDate | Date for the followup task, to remind the sales rep about the quote |
String | followupText | The body text for the follwup appointment, resolved to the correct culture (no resources please) |
String | culture | Desired culture for email body and other culture-sensitive templates/content |
Returns
Type | Description |
---|---|
PluginUrlResponse | Response of the operation |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
TestConnection(String, StringDictionary)
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.
Declaration
PluginResponse TestConnection(string connectorName, StringDictionary connectionData)
Parameters
Type | Name | Description |
---|---|---|
String | connectorName | Name of the connector. |
StringDictionary | connectionData | Basically the name/value collection of the configuration data requested to create a connection |
Returns
Type | Description |
---|---|
PluginResponse | How the test went |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
ToggleProductInAssortment(Int32)
Toggles if the prdouct is in assortment or not
Declaration
void ToggleProductInAssortment(int productId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | productId | The database id of the product to toggle is assortment value of |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
ToggleQuoteVersionAttachmentIncluded(Int32)
Toggle the 'included' state of a quote version attachment
Declaration
bool ToggleQuoteVersionAttachmentIncluded(int quoteVersionAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionAttachmentId | The ID of the quote version attachment row |
Returns
Type | Description |
---|---|
Boolean | The new state |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
ToggleSaleTypeQuoteAttachmentDefaultIncluded(Int32)
Toggle the 'default included' state of a sale type quote attachment
Declaration
bool ToggleSaleTypeQuoteAttachmentDefaultIncluded(int saleTypeQuoteAttachmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | saleTypeQuoteAttachmentId | The ID of the sale type quote attachment row |
Returns
Type | Description |
---|---|
Boolean | The new state |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
UpdateQuoteVersionPrices(Int32)
Update price on the all the quotelines for each alternative in the current quote version
Declaration
QuoteVersionValidated UpdateQuoteVersionPrices(int quoteVersionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The version to be update prices for |
Returns
Type | Description |
---|---|
QuoteVersionValidated | The updated quote version. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}
ValidateQuoteVersion(Int32, QuoteVersionButtonAction)
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.
Declaration
QuoteVersionValidated ValidateQuoteVersion(int quoteVersionId, QuoteVersionButtonAction action)
Parameters
Type | Name | Description |
---|---|---|
Int32 | quoteVersionId | The version to be validated |
QuoteVersionButtonAction | action | The action, if any, related to the validate call, like PlaceOrder or SendQuote |
Returns
Type | Description |
---|---|
QuoteVersionValidated | The updated quote version. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (QuoteAgent agent = new QuoteAgent())
{
// call methods on agent here...
}
}