Class NSQuoteAgent
Services for the Quote Management feature, part of the Sale module.
Syntax
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSQuoteAgent()
Services for the Quote Management feature, part of the Sale module.
Declaration
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
Methods
AddSaleTypeQuoteAttachment(Integer,Integer)
Adds a new quote attachment document to a sale type
Declaration
Integer AddSaleTypeQuoteAttachment(Integer saleTypeId, Integer documentId)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer saleTypeId;
Integer documentId;
Integer res = agent.AddSaleTypeQuoteAttachment(saleTypeId, documentId);
ApproveQuoteVersion(Integer,String,Integer,String)
Declaration
NSApproveRejectResponse ApproveQuoteVersion(Integer quoteVersionId, String approvedByText, Integer approvedByAssociateId, String approvalText)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String approvedByText;
Integer approvedByAssociateId;
String approvalText;
NSApproveRejectResponse res = agent.ApproveQuoteVersion(quoteVersionId, approvedByText, approvedByAssociateId, approvalText);
CanConnectorProvideCapability(Integer,String)
Services for the Quote Management feature, part of the Sale module.
Declaration
Bool CanConnectorProvideCapability(Integer quoteConnectionId, String capabilityName)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
String |
capabilityName |
|
Returns
Type |
Description |
Bool |
Can the connector provide the capability.
|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String capabilityName;
Bool res = agent.CanConnectorProvideCapability(quoteConnectionId, capabilityName);
CopyQuoteAlternative(Integer,Integer,String)
Copies a quote alternative from the same sale and adds it to a version.
Declaration
NSQuoteAlternative CopyQuoteAlternative(Integer quoteVersionId, Integer quoteAlternativeId, String quoteAlternativeName)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
String quoteAlternativeName;
NSQuoteAlternative res = agent.CopyQuoteAlternative(quoteVersionId, quoteAlternativeId, quoteAlternativeName);
CopySuperOfficePriceList(Integer,String,DateTime,DateTime,Integer,Bool)
Creates a copy of a PriceList in the SuperOffice database
Declaration
NSPriceList CopySuperOfficePriceList(Integer originalPriceListId, String newName, DateTime validFrom, DateTime validTo, Integer newCurrencyId, Bool convertCurrency)
Parameters
Type |
Name |
Description |
Integer |
originalPriceListId |
|
String |
newName |
|
|
validFrom |
|
|
validTo |
|
Integer |
newCurrencyId |
|
Bool |
convertCurrency |
|
Returns
Examples
NSQuoteAgent agent;
Integer originalPriceListId;
String newName;
DateTime validFrom;
DateTime validTo;
Integer newCurrencyId;
Bool convertCurrency;
NSPriceList res = agent.CopySuperOfficePriceList(originalPriceListId, newName, validFrom, validTo, newCurrencyId, convertCurrency);
CreateAndSaveQuote(Integer,Integer,String)
Creates a new quote on a sale.
Declaration
NSQuoteEntity CreateAndSaveQuote(Integer saleId, Integer connectionId, String firstAlternativeName)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer saleId;
Integer connectionId;
String firstAlternativeName;
NSQuoteEntity res = agent.CreateAndSaveQuote(saleId, connectionId, firstAlternativeName);
CreateAndSaveQuoteFromSale(Integer,Integer)
Creates a copy the active version with connected alternatives and quotelines from another sale.
Declaration
NSQuoteEntity CreateAndSaveQuoteFromSale(Integer copyFromSaleId, Integer copyToSaleId)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer copyFromSaleId;
Integer copyToSaleId;
NSQuoteEntity res = agent.CreateAndSaveQuoteFromSale(copyFromSaleId, copyToSaleId);
CreateAndSaveQuoteVersion(Integer)
Created a new NSQuoteVersion based on another NSQuoteVersion on the same Quote.
Declaration
NSQuoteVersion CreateAndSaveQuoteVersion(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersion res = agent.CreateAndSaveQuoteVersion(quoteVersionId);
CreateConnectionFromConnectorName(String)
Creates a new connection.
Declaration
NSQuoteConnection CreateConnectionFromConnectorName(String connectorName)
Parameters
Type |
Name |
Description |
String |
connectorName |
|
Returns
Examples
NSQuoteAgent agent;
String connectorName;
NSQuoteConnection res = agent.CreateConnectionFromConnectorName(connectorName);
CreateDefaultPriceList()
Sets default values into a new NSPriceList.
Declaration
NSPriceList CreateDefaultPriceList()
Returns
Examples
NSQuoteAgent agent;
NSPriceList thing = agent.CreateDefaultPriceList();
thing = agent.SavePriceList(thing);
CreateDefaultProduct()
Sets default values into a new NSProduct.
Declaration
NSProduct CreateDefaultProduct()
Returns
Examples
NSQuoteAgent agent;
NSProduct thing = agent.CreateDefaultProduct();
thing = agent.SaveProduct(thing);
CreateDefaultQuoteAlternative()
Sets default values into a new NSQuoteAlternative.
Declaration
NSQuoteAlternative CreateDefaultQuoteAlternative()
Returns
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.CreateDefaultQuoteAlternative();
thing = agent.SaveQuoteAlternative(thing);
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
Declaration
NSQuoteVersionAttachment[] CreateOrUpdateQuoteVersionAttachments(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionAttachment[] res = agent.CreateOrUpdateQuoteVersionAttachments(quoteVersionId);
CreateQuoteAlternative(Integer,String,String)
Creates a new quote alternative on a version.
Declaration
NSQuoteAlternative CreateQuoteAlternative(Integer quoteVersionId, String quoteAlternativeName, String quoteAlternativeDescription)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
String |
quoteAlternativeName |
|
String |
quoteAlternativeDescription |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String quoteAlternativeName;
String quoteAlternativeDescription;
NSQuoteAlternative res = agent.CreateQuoteAlternative(quoteVersionId, quoteAlternativeName, quoteAlternativeDescription);
CreateQuoteLine(Integer,String)
Creates a quoteline based on a product key.
Declaration
NSQuoteLine CreateQuoteLine(Integer quoteAlternativeId, String eRPProductKey)
Parameters
Type |
Name |
Description |
Integer |
quoteAlternativeId |
|
String |
eRPProductKey |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
String eRPProductKey;
NSQuoteLine res = agent.CreateQuoteLine(quoteAlternativeId, eRPProductKey);
CreateQuoteLineFromProduct(Integer,NSProduct)
Creates a quoteline based on a product.
Declaration
NSQuoteLine CreateQuoteLineFromProduct(Integer quoteAlternativeId, NSProduct product)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
NSProduct product;
NSQuoteLine res = agent.CreateQuoteLineFromProduct(quoteAlternativeId, product);
DeleteConnection(Integer)
Marks a connection as deleted.
Declaration
Void DeleteConnection(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
agent.DeleteConnection(quoteConnectionId);
DeletePriceList(Integer)
Declaration
Void DeletePriceList(Integer priceList)
Parameters
Type |
Name |
Description |
Integer |
priceList |
|
Returns
Examples
NSQuoteAgent agent;
agent.DeletePriceList(123);
DeleteProduct(Integer)
Declaration
Void DeleteProduct(Integer product)
Parameters
Type |
Name |
Description |
Integer |
product |
|
Returns
Examples
NSQuoteAgent agent;
agent.DeleteProduct(123);
DeleteQuote(Integer)
Declaration
Void DeleteQuote(Integer quoteId)
Parameters
Type |
Name |
Description |
Integer |
quoteId |
|
Returns
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
DeleteQuoteAlternative(Integer)
Deletes a quote alternative
Declaration
Void DeleteQuoteAlternative(Integer quoteAlternativeId)
Parameters
Type |
Name |
Description |
Integer |
quoteAlternativeId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
agent.DeleteQuoteAlternative(quoteAlternativeId);
DeleteQuoteLine(Integer)
Deletes the QuoteLine in the SuperOffice database
Declaration
Void DeleteQuoteLine(Integer quoteLineId)
Parameters
Type |
Name |
Description |
Integer |
quoteLineId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineId;
agent.DeleteQuoteLine(quoteLineId);
DeleteQuoteLines(Integer[])
Deletes the QuoteLines in the SuperOffice database
Declaration
Void DeleteQuoteLines(Integer[] quoteLineIds)
Parameters
Type |
Name |
Description |
Integer[] |
quoteLineIds |
|
Returns
Examples
NSQuoteAgent agent;
Integer[] quoteLineIds;
agent.DeleteQuoteLines(quoteLineIds);
DeleteSaleTypeQuoteAttachment(Integer)
Deletes the sale type quote attachment with the given ID
Declaration
Void DeleteSaleTypeQuoteAttachment(Integer saleTypeQuoteAttachmentId)
Parameters
Type |
Name |
Description |
Integer |
saleTypeQuoteAttachmentId |
|
Returns
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
FindProduct(Integer,String,String)
Gets a product, from the ProductProvider
Declaration
NSProduct[] FindProduct(Integer quoteAlternativeId, String userInput, String priceListKey)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
String userInput;
String priceListKey;
NSProduct[] res = agent.FindProduct(quoteAlternativeId, userInput, priceListKey);
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.
Declaration
NSQuotePublishDocuments GenerateQuoteDocuments(Integer quoteVersionId, Integer emailBodyTemplateId, Bool attachMainDocument, Integer quotedProductsTemplateId, Bool includeAttachments, String rawMailSubject)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Integer |
emailBodyTemplateId |
|
Bool |
attachMainDocument |
|
Integer |
quotedProductsTemplateId |
|
Bool |
includeAttachments |
|
String |
rawMailSubject |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer emailBodyTemplateId;
Bool attachMainDocument;
Integer quotedProductsTemplateId;
Bool includeAttachments;
String rawMailSubject;
NSQuotePublishDocuments res = agent.GenerateQuoteDocuments(quoteVersionId, emailBodyTemplateId, attachMainDocument, quotedProductsTemplateId, includeAttachments, rawMailSubject);
GetActivePriceLists(Integer,String)
Gets the available active PriceLists in a specific currency.
Declaration
NSPriceList[] GetActivePriceLists(Integer quoteConnectionId, String currency)
Parameters
Returns
Type |
Description |
NSPriceList[] |
Will return empty array if there is no PriceList with the stated currency available.
|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String currency;
NSPriceList[] res = agent.GetActivePriceLists(quoteConnectionId, currency);
GetActivePriceListsByCurrencyId(Integer,Integer)
Gets the available active PriceLists in a specific currency.
Declaration
NSPriceList[] GetActivePriceListsByCurrencyId(Integer quoteConnectionId, Integer currencyId)
Parameters
Returns
Type |
Description |
NSPriceList[] |
Will return empty array if there is no PriceList with the stated currency available.
|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Integer currencyId;
NSPriceList[] res = agent.GetActivePriceListsByCurrencyId(quoteConnectionId, currencyId);
GetAllAvailableQuoteConnections()
Gets all available connections. Some installed connections may not be available to the user.
Declaration
NSQuoteConnection[] GetAllAvailableQuoteConnections()
Returns
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllAvailableQuoteConnections();
GetAllAvailableQuoteConnectionsWithPriceLists()
Gets all available connections. Some installed connections may not be available to the user. Includes price lists for the connection.
Declaration
NSQuoteConnection[] GetAllAvailableQuoteConnectionsWithPriceLists()
Returns
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllAvailableQuoteConnectionsWithPriceLists();
GetAllInstalledQuoteConnections()
Gets all installed connections. Some installed connections may not be available to the user.
Declaration
NSQuoteConnection[] GetAllInstalledQuoteConnections()
Returns
Examples
NSQuoteAgent agent;
NSQuoteConnection[] res = agent.GetAllInstalledQuoteConnections();
GetAllPriceLists(Integer,String)
Gets the all PriceLists in all currencies, including those inactive.
Declaration
NSPriceList[] GetAllPriceLists(Integer quoteConnectionId, String currency)
Parameters
Returns
Type |
Description |
NSPriceList[] |
Will return an empty array if there is no PriceList with the stated currency available.
|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String currency;
NSPriceList[] res = agent.GetAllPriceLists(quoteConnectionId, currency);
GetAllPriceListsByCurrencyId(Integer,Integer)
Gets the all PriceLists in all currencies, including those inactive.
Declaration
NSPriceList[] GetAllPriceListsByCurrencyId(Integer quoteConnectionId, Integer currencyId)
Parameters
Returns
Type |
Description |
NSPriceList[] |
Will return empty array if there is no PriceList available.
|
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Integer currencyId;
NSPriceList[] res = agent.GetAllPriceListsByCurrencyId(quoteConnectionId, currencyId);
GetAllQuoteLineConfigurations()
Returns all the configuration fields
Declaration
NSQuoteLineConfiguration[] GetAllQuoteLineConfigurations()
Returns
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] res = agent.GetAllQuoteLineConfigurations();
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.
Declaration
Map GetConfigurationFields()
Parameters
Type |
Name |
Description |
Integer |
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
Examples
NSQuoteAgent agent;
Integer connectionId;
String connectorName;
Map res = agent.GetConfigurationFields(connectionId, connectorName);
GetConnection(Integer)
Returns the specified connection.
Declaration
NSQuoteConnection GetConnection(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
NSQuoteConnection res = agent.GetConnection(quoteConnectionId);
GetConnectionConfigFields(Integer)
Returns the config fields for the connection.
Declaration
Map GetConnectionConfigFields(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
Primary key of the connection.
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Map res = agent.GetConnectionConfigFields(quoteConnectionId);
GetConnectionsForAssociate(Integer)
Returns all connections available for the specified user.
Declaration
NSQuoteConnection[] GetConnectionsForAssociate(Integer associateId)
Parameters
Type |
Name |
Description |
Integer |
associateId |
|
Returns
Examples
NSQuoteAgent agent;
Integer associateId;
NSQuoteConnection[] res = agent.GetConnectionsForAssociate(associateId);
GetConnectionStartupErrors()
Returns an array of PluginResponseInfos for all failed connection initializations.
Declaration
NSPluginResponse[] GetConnectionStartupErrors()
Returns
Examples
NSQuoteAgent agent;
NSPluginResponse[] res = agent.GetConnectionStartupErrors();
GetConnectionStartupResponse(Integer)
Returns the PluginResponseInfo for the connection initialization.
Declaration
NSPluginResponse GetConnectionStartupResponse(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
NSPluginResponse res = agent.GetConnectionStartupResponse(quoteConnectionId);
GetConnectorCapabilities(Integer)
Gets a list of connector capabilities
Declaration
String[] GetConnectorCapabilities(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String[] res = agent.GetConnectorCapabilities(quoteConnectionId);
GetConnectorCapabilityNames(Integer)
Gets a list of all possible connector capabilities
Declaration
String[] GetConnectorCapabilityNames(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String[] res = agent.GetConnectorCapabilityNames(quoteConnectionId);
Converts an XML string into an object representation.
Declaration
NSProductExtraDataField[] GetExtraInfo(String quoteLineExtraData)
Parameters
Type |
Name |
Description |
String |
quoteLineExtraData |
|
Returns
NSQuoteAgent agent;
String quoteLineExtraData;
NSProductExtraDataField[] res = agent.GetExtraInfo(quoteLineExtraData);
GetInUseQuoteLineConfigurations()
Returns the configuration fields that should be visible in the GUI.
Declaration
NSQuoteLineConfiguration[] GetInUseQuoteLineConfigurations()
Returns
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] res = agent.GetInUseQuoteLineConfigurations();
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
Declaration
String GetOrderConfirmation(Integer quoteVersionId, Integer confirmationTemplateId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Integer |
confirmationTemplateId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer confirmationTemplateId;
String res = agent.GetOrderConfirmation(quoteVersionId, confirmationTemplateId);
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.
Declaration
NSPluginUrlResponse GetOrderState(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSPluginUrlResponse res = agent.GetOrderState(quoteVersionId);
GetPriceList(Integer)
Gets an NSPriceList object.
Declaration
NSPriceList GetPriceList(Integer priceListId)
Parameters
Type |
Name |
Description |
Integer |
priceListId |
|
Returns
Examples
NSQuoteAgent agent;
NSPriceList thing = agent.GetPriceList(123);
GetProduct(Integer,String)
Gets a product with the given key
Declaration
NSProduct GetProduct(Integer quoteConnectionId, String eRPProductKey)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
String |
eRPProductKey |
|
Returns
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
GetProductFromDbId(Integer)
Gets a product with the given database ID
Declaration
NSProduct GetProductFromDbId(Integer productId)
Parameters
Type |
Name |
Description |
Integer |
productId |
|
Returns
Examples
NSQuoteAgent agent;
Integer productId;
NSProduct res = agent.GetProductFromDbId(productId);
GetProductImage(Integer,String,Integer)
Gets an image connected to a product, from the ProductProvider
Declaration
String GetProductImage(Integer quoteConnectionId, String eRPProductKey, Integer rank)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
String eRPProductKey;
Integer rank;
String res = agent.GetProductImage(quoteConnectionId, eRPProductKey, rank);
GetQuote(Integer)
Declaration
NSQuote GetQuote(Integer quoteId)
Parameters
Type |
Name |
Description |
Integer |
quoteId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuote res = agent.GetQuote(quoteId);
GetQuoteAlternative(Integer)
Gets an NSQuoteAlternative object.
Declaration
NSQuoteAlternative GetQuoteAlternative(Integer quoteAlternativeId)
Parameters
Type |
Name |
Description |
Integer |
quoteAlternativeId |
|
Returns
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.GetQuoteAlternative(123);
GetQuoteAlternatives(Integer)
Gets all quote alternatives for a quote version
Declaration
NSQuoteAlternative[] GetQuoteAlternatives(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteAlternative[] res = agent.GetQuoteAlternatives(quoteVersionId);
GetQuoteEntity(Integer)
Declaration
NSQuoteEntity GetQuoteEntity(Integer quoteId)
Parameters
Type |
Name |
Description |
Integer |
quoteId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuoteEntity res = agent.GetQuoteEntity(quoteId);
GetQuoteEntityFromSaleId(Integer)
Declaration
NSQuoteEntity GetQuoteEntityFromSaleId(Integer saleId)
Parameters
Type |
Name |
Description |
Integer |
saleId |
|
Returns
Examples
NSQuoteAgent agent;
Integer saleId;
NSQuoteEntity res = agent.GetQuoteEntityFromSaleId(saleId);
GetQuoteFromSaleId(Integer)
Gets an NSQuote for a sale
Declaration
NSQuote GetQuoteFromSaleId(Integer saleId)
Parameters
Type |
Name |
Description |
Integer |
saleId |
|
Returns
Examples
NSQuoteAgent agent;
Integer saleId;
NSQuote res = agent.GetQuoteFromSaleId(saleId);
GetQuoteLine(Integer)
Gets QuoteLine from database
Declaration
NSQuoteLine GetQuoteLine(Integer quoteLineId)
Parameters
Type |
Name |
Description |
Integer |
quoteLineId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineId;
NSQuoteLine res = agent.GetQuoteLine(quoteLineId);
GetQuoteLineConfiguration(Integer)
Returns the configuration field with the given ID
Declaration
NSQuoteLineConfiguration GetQuoteLineConfiguration(Integer quoteLineConfigurationId)
Parameters
Type |
Name |
Description |
Integer |
quoteLineConfigurationId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineConfigurationId;
NSQuoteLineConfiguration res = agent.GetQuoteLineConfiguration(quoteLineConfigurationId);
GetQuoteLineConfigurationFromFieldName(String)
Returns the configuration field with the given field name
Declaration
NSQuoteLineConfiguration GetQuoteLineConfigurationFromFieldName(String fieldName)
Parameters
Type |
Name |
Description |
String |
fieldName |
|
Returns
Examples
NSQuoteAgent agent;
String fieldName;
NSQuoteLineConfiguration res = agent.GetQuoteLineConfigurationFromFieldName(fieldName);
GetQuoteLineImage(Integer,Integer)
Gets an image connected to a quoteline, either from the ERPProvider or from the SuperOffice database
Declaration
NSImage GetQuoteLineImage(Integer quoteLineId, Integer rank)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineId;
Integer rank;
NSImage res = agent.GetQuoteLineImage(quoteLineId, rank);
GetQuoteLines(Integer)
Gets all QuoteLines from an alternative
Declaration
NSQuoteLine[] GetQuoteLines(Integer quoteAlternativeId)
Parameters
Type |
Name |
Description |
Integer |
quoteAlternativeId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
NSQuoteLine[] res = agent.GetQuoteLines(quoteAlternativeId);
GetQuoteList(String)
Gets a named list from the connector.
Declaration
NSQuoteListItem[] GetQuoteList(String quoteListType)
Parameters
Type |
Name |
Description |
String |
quoteListType |
|
Returns
Type |
Description |
NSQuoteListItem[] |
Array of QuoteListItems; NULL if the given list is not supported.
|
Examples
NSQuoteAgent agent;
String quoteListType;
NSQuoteListItem[] res = agent.GetQuoteList(quoteListType);
GetQuoteVersion(Integer)
Declaration
NSQuoteVersion GetQuoteVersion(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersion res = agent.GetQuoteVersion(quoteVersionId);
GetQuoteVersions(Integer)
Gets all quote versions for a sale
Declaration
NSQuoteVersion[] GetQuoteVersions(Integer quoteId)
Parameters
Type |
Name |
Description |
Integer |
quoteId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteId;
NSQuoteVersion[] res = agent.GetQuoteVersions(quoteId);
Gets all button states for the Quote version dialog.
Declaration
NSQuoteVersionWorkflowState GetQuoteVersionWorkflowButtonStates(Integer quoteVersionId, Integer quoteAlternativeId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Integer |
quoteAlternativeId |
|
Returns
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
NSQuoteVersionWorkflowState res = agent.GetQuoteVersionWorkflowButtonStates(quoteVersionId, quoteAlternativeId);
GetQuoteVersionWorkflowImageState(Integer)
Gets state icon and name for the Quote version dialog header.
Declaration
NSQuoteVersionButtonState GetQuoteVersionWorkflowImageState(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionButtonState res = agent.GetQuoteVersionWorkflowImageState(quoteVersionId);
GetQuoteVersionWorkflowState(Integer,Integer)
Gets all button states for the Quote version dialog. Packages ImageState, Button states and status info into one call.
Declaration
NSQuoteVersionWorkflowState GetQuoteVersionWorkflowState(Integer quoteVersionId, Integer quoteAlternativeId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Integer |
quoteAlternativeId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer quoteAlternativeId;
NSQuoteVersionWorkflowState res = agent.GetQuoteVersionWorkflowState(quoteVersionId, quoteAlternativeId);
GetQuoteVersionWorkflowStatusInfo(Integer)
Gets status info for the Quote version dialog header.
Declaration
NSQuoteVersionStatusInformation GetQuoteVersionWorkflowStatusInfo(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionStatusInformation res = agent.GetQuoteVersionWorkflowStatusInfo(quoteVersionId);
HasConnections()
Services for the Quote Management feature, part of the Sale module.
Declaration
NSPluginResponse HasConnections()
Returns
Type |
Description |
NSPluginResponse |
Whether or not the system has any connections available for this user.
|
Examples
NSQuoteAgent agent;
NSPluginResponse res = agent.HasConnections();
IncludeQuoteVersionAttachment(Integer,Integer,Bool)
Toggles the 'included' state of a quote version attachment
Declaration
Bool IncludeQuoteVersionAttachment(Integer quoteVersionId, Integer documentId, Bool include)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer documentId;
Bool include;
Bool res = agent.IncludeQuoteVersionAttachment(quoteVersionId, documentId, include);
MoveQuoteLine(Integer,Bool)
Moves quote line rank up/down
Declaration
Void MoveQuoteLine(Integer quoteLineId, Bool direction)
Parameters
Type |
Name |
Description |
Integer |
quoteLineId |
|
Bool |
direction |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineId;
Bool direction;
agent.MoveQuoteLine(quoteLineId, direction);
PlaceOrder(Integer,Bool,String,String,String)
Places an order in the ERP system.
Declaration
NSPluginUrlResponse PlaceOrder(Integer quoteAlternativeId, Bool markSaleAsSold, String poNumber, String orderComment, String culture)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternativeId;
Bool markSaleAsSold;
String poNumber;
String orderComment;
String culture;
NSPluginUrlResponse res = agent.PlaceOrder(quoteAlternativeId, markSaleAsSold, poNumber, orderComment, culture);
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.
Declaration
NSQuoteAlternativeRecalculated RecalculateQuoteAlternative(Integer quoteAlternative)
Parameters
Type |
Name |
Description |
Integer |
quoteAlternative |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteAlternative;
NSQuoteAlternativeRecalculated res = agent.RecalculateQuoteAlternative(quoteAlternative);
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.
Declaration
NSQuoteLine RecalculateQuoteLine(NSQuoteLine quoteLine, String[] changedFields)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteLine quoteLine;
String[] changedFields;
NSQuoteLine res = agent.RecalculateQuoteLine(quoteLine, changedFields);
RejectQuoteVersion(Integer,String,Integer,String)
Declaration
NSApproveRejectResponse RejectQuoteVersion(Integer quoteVersionId, String rejectedByText, Integer rejectedByAssociateId, String rejectionText)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String rejectedByText;
Integer rejectedByAssociateId;
String rejectionText;
NSApproveRejectResponse res = agent.RejectQuoteVersion(quoteVersionId, rejectedByText, rejectedByAssociateId, rejectionText);
RemoveProduct(Integer)
Removes a product from the database
Declaration
Void RemoveProduct(Integer productId)
Parameters
Type |
Name |
Description |
Integer |
productId |
|
Returns
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
RestoreConnection(Integer)
Restores a connection marked as deleted.
Declaration
Void RestoreConnection(Integer quoteConnectionId)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
agent.RestoreConnection(quoteConnectionId);
SaveConnection(NSQuoteConnection)
Saves a connection to the database.
Declaration
NSQuoteConnection SaveConnection(NSQuoteConnection connection)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteConnection connection;
NSQuoteConnection res = agent.SaveConnection(connection);
SaveConnectionConfigFields(Integer,Map)
Saves the connection config fields.
Declaration
Map SaveConnectionConfigFields(Integer quoteConnectionId, Map connectionConfigFields)
Parameters
Type |
Name |
Description |
Integer |
quoteConnectionId |
Primary key of the connection
|
|
connectionConfigFields |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteConnectionId;
Map connectionConfigFields;
Map res = agent.SaveConnectionConfigFields(quoteConnectionId, connectionConfigFields);
SavePriceList(NSPriceList)
Updates the existing NSPriceList or creates a new NSPriceList if the id parameter is 0
Declaration
NSPriceList SavePriceList(NSPriceList priceList)
Parameters
Type |
Name |
Description |
NSPriceList |
priceList |
The NSPriceList to save.
|
Returns
Examples
NSQuote agent;
NSPriceList thing = agent.CreateDefaultPriceList();
thing = agent.SavePriceList(thing);
SaveProduct(NSProduct)
Updates the existing NSProduct or creates a new NSProduct if the id parameter is 0
Declaration
NSProduct SaveProduct(NSProduct product)
Parameters
Type |
Name |
Description |
NSProduct |
product |
The NSProduct to save.
|
Returns
Examples
NSQuote agent;
NSProduct thing = agent.CreateDefaultProduct();
thing = agent.SaveProduct(thing);
SaveQuote(NSQuote)
Declaration
NSQuote SaveQuote(NSQuote quote)
Parameters
Type |
Name |
Description |
NSQuote |
quote |
|
Returns
Examples
NSQuoteAgent agent;
NSQuote quote;
NSQuote res = agent.SaveQuote(quote);
SaveQuoteAlternative(NSQuoteAlternative)
Updates the existing NSQuoteAlternative or creates a new NSQuoteAlternative if the id parameter is 0
Declaration
NSQuoteAlternative SaveQuoteAlternative(NSQuoteAlternative quoteAlternative)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteAlternative thing = agent.CreateDefaultQuoteAlternative();
thing = agent.SaveQuoteAlternative(thing);
SaveQuoteEntity(NSQuoteEntity)
Declaration
NSQuoteEntity SaveQuoteEntity(NSQuoteEntity quoteEntity)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteEntity quoteEntity;
NSQuoteEntity res = agent.SaveQuoteEntity(quoteEntity);
SaveQuoteLine(NSQuoteLine)
Saves the NSQuoteLine in the SuperOffice database
Declaration
NSQuoteLine SaveQuoteLine(NSQuoteLine quoteLine)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteLine quoteLine;
NSQuoteLine res = agent.SaveQuoteLine(quoteLine);
SaveQuoteLineConfiguration(NSQuoteLineConfiguration)
Saves an NSQuoteLineConfiguration object. It is not possible to add a new configuration.
Declaration
NSQuoteLineConfiguration SaveQuoteLineConfiguration(NSQuoteLineConfiguration quoteLineConfiguration)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration quoteLineConfiguration;
NSQuoteLineConfiguration res = agent.SaveQuoteLineConfiguration(quoteLineConfiguration);
SaveQuoteLineConfigurations()
Saves a collection of QuoteLineConfigurations. It is not possible to add a new configurations.
Declaration
NSQuoteLineConfiguration[] SaveQuoteLineConfigurations(NSQuoteLineConfiguration[] quoteLineConfigurations)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteLineConfiguration[] quoteLineConfigurations;
NSQuoteLineConfiguration[] res = agent.SaveQuoteLineConfigurations(quoteLineConfigurations);
SaveQuoteLineImage(Integer,NSImage,Integer)
Saves the image connected to a quoteline in the SuperOffice database
Declaration
Void SaveQuoteLineImage(Integer quoteLineId, NSImage image, Integer rank)
Parameters
Type |
Name |
Description |
|
quoteLineId |
|
|
image |
|
Integer |
rank |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteLineId;
NSImage image;
Integer rank;
agent.SaveQuoteLineImage(quoteLineId, image, rank);
SaveQuoteLines(NSQuoteLine[])
Saves the QuoteLines in the SuperOffice database
Declaration
NSQuoteLine[] SaveQuoteLines(NSQuoteLine[] quoteLines)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteLine[] quoteLines;
NSQuoteLine[] res = agent.SaveQuoteLines(quoteLines);
SaveQuoteVersion(NSQuoteVersion)
Declaration
NSQuoteVersion SaveQuoteVersion(NSQuoteVersion quoteVersion)
Parameters
Returns
Examples
NSQuoteAgent agent;
NSQuoteVersion quoteVersion;
NSQuoteVersion res = agent.SaveQuoteVersion(quoteVersion);
SaveQuoteVersionNumber(Integer,String)
Save the quote version number if it is valid
Declaration
Bool SaveQuoteVersionNumber(Integer quoteVersionId, String number)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
String number;
Bool res = agent.SaveQuoteVersionNumber(quoteVersionId, number);
SendQuoteVersion(Integer,DateTime,DateTime,String,String)
Sends the quote to the user's customer.
Declaration
NSPluginUrlResponse SendQuoteVersion(Integer quoteVersionId, DateTime expiryDate, DateTime followupDate, String followupText, String culture)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
|
expiryDate |
|
|
followupDate |
|
String |
followupText |
|
String |
culture |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
DateTime expiryDate;
DateTime followupDate;
String followupText;
String culture;
NSPluginUrlResponse res = agent.SendQuoteVersion(quoteVersionId, expiryDate, followupDate, followupText, culture);
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.
Declaration
NSPluginResponse TestConnection(String connectorName, Map connectionData)
Parameters
Type |
Name |
Description |
String |
connectorName |
|
Returns
Examples
NSQuoteAgent agent;
String connectorName;
Map connectionData;
NSPluginResponse res = agent.TestConnection(connectorName, connectionData);
ToggleProductInAssortment(Integer)
Toggles if the product is in assortment or not
Declaration
Void ToggleProductInAssortment(Integer productId)
Parameters
Type |
Name |
Description |
Integer |
productId |
|
Returns
Examples
NSQuoteAgent agent;
agent.callMethod(arg1, arg2);
ToggleQuoteVersionAttachmentIncluded(Integer)
Toggle the 'included' state of a quote version attachment
Declaration
Bool ToggleQuoteVersionAttachmentIncluded(Integer quoteVersionAttachmentId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionAttachmentId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionAttachmentId;
Bool res = agent.ToggleQuoteVersionAttachmentIncluded(quoteVersionAttachmentId);
ToggleSaleTypeQuoteAttachmentDefaultIncluded(Integer)
Toggles the 'default included' state of a sale type quote attachment
Declaration
Bool ToggleSaleTypeQuoteAttachmentDefaultIncluded(Integer saleTypeQuoteAttachmentId)
Parameters
Type |
Name |
Description |
Integer |
saleTypeQuoteAttachmentId |
|
Returns
Examples
NSQuoteAgent agent;
Integer saleTypeQuoteAttachmentId;
Bool res = agent.ToggleSaleTypeQuoteAttachmentDefaultIncluded(saleTypeQuoteAttachmentId);
UpdateQuoteVersionPrices(Integer)
Updates price on the all the quote lines for each alternative in the current quote version
Declaration
NSQuoteVersionValidated UpdateQuoteVersionPrices(Integer quoteVersionId)
Parameters
Type |
Name |
Description |
Integer |
quoteVersionId |
|
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
NSQuoteVersionValidated res = agent.UpdateQuoteVersionPrices(quoteVersionId);
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.
Declaration
NSQuoteVersionValidated ValidateQuoteVersion(Integer quoteVersionId, Integer action)
Parameters
Returns
Examples
NSQuoteAgent agent;
Integer quoteVersionId;
Integer action;
NSQuoteVersionValidated res = agent.ValidateQuoteVersion(quoteVersionId, action);