Skip to main content
Services for the Quote Management feature, part of the Sale module.

Constructors

NSQuoteAgent()

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

Methods

AddSaleTypeQuoteAttachment(Integer,Integer)

Adds a new quote attachment document to a sale type
Returns: CRMScript.Global.Integer Example:

ApproveQuoteVersion(Integer,String,Integer,String)

Approves a quote version
Returns: CRMScript.NetServer.NSApproveRejectResponse Example:

CanConnectorProvideCapability(Integer,String)

Returns: CRMScript.Global.Bool - Can the connector provide the capability. Example:

CopyQuoteAlternative(Integer,Integer,String)

Copies a quote alternative from the same sale and adds it to a version.
Returns: CRMScript.NetServer.NSQuoteAlternative Example:

CopySuperOfficePriceList(Integer,String,DateTime,DateTime,Integer,Bool)

Creates a copy of a PriceList in the SuperOffice database
Returns: CRMScript.NetServer.NSPriceList Example:

CreateAndSaveQuote(Integer,Integer,String)

Creates a new quote on a sale.
Returns: CRMScript.NetServer.NSQuoteEntity Example:

CreateAndSaveQuoteFromSale(Integer,Integer)

Creates a copy the active version with connected alternatives and quotelines from another sale.
Returns: CRMScript.NetServer.NSQuoteEntity Example:

CreateAndSaveQuoteVersion(Integer)

Created a new NSQuoteVersion based on another NSQuoteVersion on the same Quote.
Returns: CRMScript.NetServer.NSQuoteVersion Example:

CreateConnectionFromConnectorName(String)

Creates a new connection.
Returns: CRMScript.NetServer.NSQuoteConnection Example:

CreateDefaultPriceList()

Sets default values into a new NSPriceList.
Returns: CRMScript.NetServer.NSPriceList
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateDefaultProduct()

Sets default values into a new NSProduct.
Returns: CRMScript.NetServer.NSProduct
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateDefaultQuoteAlternative()

Sets default values into a new NSQuoteAlternative.
Returns: CRMScript.NetServer.NSQuoteAlternative
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateOrUpdateQuoteVersionAttachments(Integer)

Looks at the Quote version, related sale and sale type, and ensures that the correct NSQuoteVersionAttachment records exist. This method may create or delete records
Returns: CRMScript.NetServer.NSQuoteVersionAttachment[] Example:

CreateQuoteAlternative(Integer,String,String)

Creates a new quote alternative on a version.
Returns: CRMScript.NetServer.NSQuoteAlternative Example:

CreateQuoteLine(Integer,String)

Creates a quoteline based on a product key.
Returns: CRMScript.NetServer.NSQuoteLine Example:

CreateQuoteLineFromProduct(Integer,NSProduct)

Creates a quoteline based on a product.
Returns: CRMScript.NetServer.NSQuoteLine Example:

DeleteConnection(Integer)

Marks a connection as deleted.
Returns: CRMScript.Global.Void Example:

DeletePriceList(Integer)

Deletes the NSPriceList
Returns: CRMScript.Global.Void Example:

DeleteProduct(Integer)

Deletes the NSProduct
Returns: CRMScript.Global.Void Example:

DeleteQuote(Integer)

Deletes a Quote
Returns: CRMScript.Global.Void

DeleteQuoteAlternative(Integer)

Deletes a quote alternative
Returns: CRMScript.Global.Void Example:

DeleteQuoteLine(Integer)

Deletes the QuoteLine in the SuperOffice database
Returns: CRMScript.Global.Void Example:

DeleteQuoteLines(Integer[])

Deletes the QuoteLines in the SuperOffice database
Returns: CRMScript.Global.Void Example:

DeleteSaleTypeQuoteAttachment(Integer)

Deletes the sale type quote attachment with the given ID
Returns: CRMScript.Global.Void

FindProduct(Integer,String,String)

Gets a product, from the ProductProvider
Returns: CRMScript.NetServer.NSProduct[] Example:

GenerateQuoteDocuments(Integer,Integer,Bool,Integer,Bool,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 IDs for the lines doc and mail body.
Returns: CRMScript.NetServer.NSQuotePublishDocuments
Quote version status is not changed by this method.
Example:

GetActivePriceLists(Integer,String)

Gets the available active PriceLists in a specific currency.
Returns: CRMScript.NetServer.NSPriceList[] - Will return empty array if there is no PriceList with the stated currency available. Example:

GetActivePriceListsByCurrencyId(Integer,Integer)

Gets the available active PriceLists in a specific currency.
Returns: CRMScript.NetServer.NSPriceList[] - Will return empty array if there is no PriceList with the stated currency available. Example:

GetAllAvailableQuoteConnections()

Gets all available connections. Some installed connections may not be available to the user.
Returns: CRMScript.NetServer.NSQuoteConnection[]
Use GetAllAvailableQuoteConnectionsWithPriceLists if you need the price lists on the connections as well.
Example:

GetAllAvailableQuoteConnectionsWithPriceLists()

Gets all available connections. Some installed connections may not be available to the user. Includes price lists for the connection.
Returns: CRMScript.NetServer.NSQuoteConnection[]
This is a heavy call
Example:

GetAllInstalledQuoteConnections()

Gets all installed connections. Some installed connections may not be available to the user.
Returns: CRMScript.NetServer.NSQuoteConnection[] Example:

GetAllPriceLists(Integer,String)

Gets the all PriceLists in all currencies, including those inactive.
Returns: CRMScript.NetServer.NSPriceList[] - Will return an empty array if there is no PriceList with the stated currency available. Example:

GetAllPriceListsByCurrencyId(Integer,Integer)

Gets the all PriceLists in all currencies, including those inactive.
Returns: CRMScript.NetServer.NSPriceList[] - Will return empty array if there is no PriceList available. Example:

GetAllQuoteLineConfigurations()

Returns all the configuration fields
Returns: CRMScript.NetServer.NSQuoteLineConfiguration[] Example:

GetConfigurationFields(Integer,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 the SuperOffice database and used when InitializeConnector is called by the client.
Returns: CRMScript.Native.Map Example:

GetConnection(Integer)

Returns the specified connection.
Returns: CRMScript.NetServer.NSQuoteConnection Example:

GetConnectionConfigFields(Integer)

Returns the config fields for the connection.
Returns: CRMScript.Native.Map Example:

GetConnectionsForAssociate(Integer)

Returns all connections available for the specified user.
Returns: CRMScript.NetServer.NSQuoteConnection[] Example:

GetConnectionStartupErrors()

Returns an array of PluginResponseInfos for all failed connection initializations.
Returns: CRMScript.NetServer.NSPluginResponse[] Example:

GetConnectionStartupResponse(Integer)

Returns the PluginResponseInfo for the connection initialization.
Returns: CRMScript.NetServer.NSPluginResponse
Does not initialize the connection, just returns what happened when initialize was called.
Example:

GetConnectorCapabilities(Integer)

Gets a list of connector capabilities
Returns: CRMScript.Global.String[] Example:

GetConnectorCapabilityNames(Integer)

Gets a list of all possible connector capabilities
Returns: CRMScript.Global.String[] Example:

GetExtraInfo(String)

Converts an XML string into an object representation.
Returns: CRMScript.NetServer.NSProductExtraDataField[] Example:

GetInUseQuoteLineConfigurations()

Returns the configuration fields that should be visible in the GUI.
Returns: CRMScript.NetServer.NSQuoteLineConfiguration[] Example:

GetOrderConfirmation(Integer,Integer)

Gets 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
Returns: CRMScript.Global.String Example:

GetOrderState(Integer)

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.
Returns: CRMScript.NetServer.NSPluginUrlResponse Example:

GetPriceList(Integer)

Gets an NSPriceList object.
Returns: CRMScript.NetServer.NSPriceList Example:

GetProduct(Integer,String)

Gets a product with the given key
Returns: CRMScript.NetServer.NSProduct

GetProductFromDbId(Integer)

Gets a product with the given database ID
Returns: CRMScript.NetServer.NSProduct Example:

GetProductImage(Integer,String,Integer)

Gets an image connected to a product, from the ProductProvider
Returns: CRMScript.Global.String Example:

GetQuote(Integer)

Gets an NSQuote
Returns: CRMScript.NetServer.NSQuote Example:

GetQuoteAlternative(Integer)

Gets an NSQuoteAlternative object.
Returns: CRMScript.NetServer.NSQuoteAlternative Example:

GetQuoteAlternatives(Integer)

Gets all quote alternatives for a quote version
Returns: CRMScript.NetServer.NSQuoteAlternative[] Example:

GetQuoteEntity(Integer)

Gets a Quote
Returns: CRMScript.NetServer.NSQuoteEntity Example:

GetQuoteEntityFromSaleId(Integer)

Gets a Quote for a sale
Returns: CRMScript.NetServer.NSQuoteEntity Example:

GetQuoteFromSaleId(Integer)

Gets an NSQuote for a sale
Returns: CRMScript.NetServer.NSQuote Example:

GetQuoteLine(Integer)

Gets QuoteLine from database
Returns: CRMScript.NetServer.NSQuoteLine Example:

GetQuoteLineConfiguration(Integer)

Returns the configuration field with the given ID
Returns: CRMScript.NetServer.NSQuoteLineConfiguration Example:

GetQuoteLineConfigurationFromFieldName(String)

Returns the configuration field with the given field name
Returns: CRMScript.NetServer.NSQuoteLineConfiguration Example:

GetQuoteLineImage(Integer,Integer)

Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
Returns: CRMScript.NetServer.NSImage Example:

GetQuoteLines(Integer)

Gets all QuoteLines from an alternative
Returns: CRMScript.NetServer.NSQuoteLine[] Example:

GetQuoteList(String)

Gets a named list from the connector.
Returns: CRMScript.NetServer.NSQuoteListItem[] - Array of QuoteListItems; NULL if the given list is not supported. Example:

GetQuoteVersion(Integer)

Gets an NSQuoteVersion
Returns: CRMScript.NetServer.NSQuoteVersion Example:

GetQuoteVersions(Integer)

Gets all quote versions for a sale
Returns: CRMScript.NetServer.NSQuoteVersion[] Example:

GetQuoteVersionWorkflowButtonStates(Integer,Integer)

Gets all button states for the Quote version dialog.
Returns: CRMScript.NetServer.NSQuoteVersionWorkflowState Example:

GetQuoteVersionWorkflowImageState(Integer)

Gets state icon and name for the Quote version dialog header.
Returns: CRMScript.NetServer.NSQuoteVersionButtonState Example:

GetQuoteVersionWorkflowState(Integer,Integer)

Gets all button states for the Quote version dialog. Packages ImageState, Button states and status info into one call.
Returns: CRMScript.NetServer.NSQuoteVersionWorkflowState
Collects most important warnings/errors from across all quote lines/alternatives in this quote version.
Example:

GetQuoteVersionWorkflowStatusInfo(Integer)

Gets status info for the Quote version dialog header.
Returns: CRMScript.NetServer.NSQuoteVersionStatusInformation
Collects most important warnings/errors from across all quote lines/alternatives in this quote version.
Example:

HasConnections()

Returns: CRMScript.NetServer.NSPluginResponse - Whether or not the system has any connections available for this user. Example:

IncludeQuoteVersionAttachment(Integer,Integer,Bool)

Toggles the ‘included’ state of a quote version attachment
Returns: CRMScript.Global.Bool
Throws exceptions if called on locked versions
Example:

MoveQuoteLine(Integer,Bool)

Moves quote line rank up/down
Returns: CRMScript.Global.Void Example:

PlaceOrder(Integer,Bool,String,String,String)

Places an order in the ERP system.
Returns: CRMScript.NetServer.NSPluginUrlResponse Example:

RecalculateQuoteAlternative(Integer)

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.
Returns: CRMScript.NetServer.NSQuoteAlternativeRecalculated Example:

RecalculateQuoteLine(NSQuoteLine,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.
Returns: CRMScript.NetServer.NSQuoteLine Example:

RejectQuoteVersion(Integer,String,Integer,String)

Rejects a quote version
Returns: CRMScript.NetServer.NSApproveRejectResponse Example:

RemoveProduct(Integer)

Removes a product from the database
Returns: CRMScript.Global.Void

RestoreConnection(Integer)

Restores a connection marked as deleted.
Returns: CRMScript.Global.Void Example:

SaveConnection(NSQuoteConnection)

Saves a connection to the database.
Returns: CRMScript.NetServer.NSQuoteConnection Example:

SaveConnectionConfigFields(Integer,Map)

Saves the connection config fields.
Returns: CRMScript.Native.Map Example:

SavePriceList(NSPriceList)

Updates the existing NSPriceList or creates a new NSPriceList if the id parameter is 0
Returns: CRMScript.NetServer.NSPriceList Example:

SaveProduct(NSProduct)

Updates the existing NSProduct or creates a new NSProduct if the id parameter is 0
Returns: CRMScript.NetServer.NSProduct Example:

SaveQuote(NSQuote)

Saves an NSQuote
Returns: CRMScript.NetServer.NSQuote Example:

SaveQuoteAlternative(NSQuoteAlternative)

Updates the existing NSQuoteAlternative or creates a new NSQuoteAlternative if the id parameter is 0
Returns: CRMScript.NetServer.NSQuoteAlternative Example:

SaveQuoteEntity(NSQuoteEntity)

Saves an NSQuoteEntity.
Returns: CRMScript.NetServer.NSQuoteEntity
Versions and alternatives will not be saved by this call.
Example:

SaveQuoteLine(NSQuoteLine)

Saves the NSQuoteLine in the SuperOffice database
Returns: CRMScript.NetServer.NSQuoteLine Example:

SaveQuoteLineConfiguration(NSQuoteLineConfiguration)

Saves an NSQuoteLineConfiguration object. It is not possible to add a new configuration.
Returns: CRMScript.NetServer.NSQuoteLineConfiguration Example:

SaveQuoteLineConfigurations()

Saves a collection of QuoteLineConfigurations. It is not possible to add a new configurations.
Returns: CRMScript.NetServer.NSQuoteLineConfiguration[] Example:

SaveQuoteLineImage(Integer,NSImage,Integer)

Saves the image connected to a quoteline in the SuperOffice database
Returns: CRMScript.Global.Void Example:

SaveQuoteLines(NSQuoteLine[])

Saves the QuoteLines in the SuperOffice database
Returns: CRMScript.NetServer.NSQuoteLine[] Example:

SaveQuoteVersion(NSQuoteVersion)

Saves a quote version
Returns: CRMScript.NetServer.NSQuoteVersion Example:

SaveQuoteVersionNumber(Integer,String)

Save the quote version number if it is valid
Returns: CRMScript.Global.Bool Example:

SendQuoteVersion(Integer,DateTime,DateTime,String,String)

Sends the quote to the user’s customer.
Returns: CRMScript.NetServer.NSPluginUrlResponse
More parameters to be added later…
Example:

TestConnection(String)

Tests 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.
Returns: CRMScript.NetServer.NSPluginResponse - how the test went.
Used by the Admin clients
Example:

ToggleProductInAssortment(Integer)

Toggles if the product is in assortment or not
Returns: CRMScript.Global.Void

ToggleQuoteVersionAttachmentIncluded(Integer)

Toggle the ‘included’ state of a quote version attachment
Returns: CRMScript.Global.Bool Example:

ToggleSaleTypeQuoteAttachmentDefaultIncluded(Integer)

Toggles the ‘default included’ state of a sale type quote attachment
Returns: CRMScript.Global.Bool Example:

UpdateQuoteVersionPrices(Integer)

Updates price on the all the quote lines for each alternative in the current quote version
Returns: CRMScript.NetServer.NSQuoteVersionValidated Example:

ValidateQuoteVersion(Integer,Integer)

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.
Returns: CRMScript.NetServer.NSQuoteVersionValidated
RecalculateQuoteAlternative should typically validate all alternatives, set values in extrafields, and set the state in the version.
Example: