Show / Hide Table of Contents

Class QuoteConnectorExtender

Base class that allows 3rd party modules to extend the SuperOffice Quote Connector without directly linking to the specific version of the QuoteConnector.dll

This class is made to make it easier to make some installation specific changes to a connector without directly linking to the connector itself.

Just inherit QuoteConnectorExtender and override the function you need to change or extend the functionality. IQuoteConnector

Inheritance
Object
QuoteConnectorExtender
Implements
IQuoteConnector
IDisposable
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.CRM
Assembly: SuperOffice.Plugins.dll
Syntax
public class QuoteConnectorExtender : IQuoteConnector, IPlugin, IDisposable
Remarks

This class will call your interface implementations if they exist, otherwise it will call the inherited

Constructors

QuoteConnectorExtender()

Default Constructor of the extender. Extend the SuperOfficeQuoteConnector in "SuperOffice.QuoteConnector.Dll".

Declaration
public QuoteConnectorExtender()

QuoteConnectorExtender(String)

Constructor of the extender.

Declaration
public QuoteConnectorExtender(string nameOfPluginToExtend)
Parameters
Type Name Description
String nameOfPluginToExtend

Relative or absolute path to the assembly, Ex: "C:\Program Files (x86)\SuperOffice\Plugins\MyConnector.dll"

Fields

_connector

The connector that the extender extends.

Declaration
protected IQuoteConnector _connector
Field Value
Type Description
IQuoteConnector

Properties

ConnectorName

Returns the ConnectorName from the attribute

Declaration
protected string ConnectorName { get; }
Property Value
Type Description
String

CRMConnectionId

Return the id of this connector. CRMConnectionId

Declaration
public virtual int CRMConnectionId { get; set; }
Property Value
Type Description
Int32

NextConnectorKeyname

Concatenates the ConnectorName and "_NextConnectorKey"

Declaration
protected string NextConnectorKeyname { get; }
Property Value
Type Description
String

Methods

CanProvideCapability(String)

Will call the base connector's CanProvideCapability(String) unless you override this method.

Declaration
public virtual bool CanProvideCapability(string capabilityName)
Parameters
Type Name Description
String capabilityName

Name of the capability, see CRMQuoteConnectorCapabilities

Returns
Type Description
Boolean

List of what the connector can do

Dispose()

Declaration
public void Dispose()

FindProduct(QuoteAlternativeContextInfo, String, String, String)

Will call the base connector's FindProduct(QuoteAlternativeContextInfo, String, String, String) unless you override this method.

Declaration
public virtual ProductInfo[] FindProduct(QuoteAlternativeContextInfo context, string currencyCode, string userinput, string priceListKey)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
String currencyCode
String userinput
String priceListKey
Returns
Type Description
ProductInfo[]

GetActivePriceLists(String)

Will call the base connector's GetActivePriceLists(String) unless you override this method.

Declaration
public virtual PriceListInfo[] GetActivePriceLists(string isoCurrencyCode)
Parameters
Type Name Description
String isoCurrencyCode
Returns
Type Description
PriceListInfo[]

GetAddresses(QuoteAlternativeContextInfo)

Declaration
public virtual AddressInfo[] GetAddresses(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
Returns
Type Description
AddressInfo[]

GetAllPriceLists(String)

Will call the base connector's GetAllPriceLists(String) unless you override this method.

Declaration
public virtual PriceListInfo[] GetAllPriceLists(string isoCurrencyCode)
Parameters
Type Name Description
String isoCurrencyCode
Returns
Type Description
PriceListInfo[]

GetCapabilities()

Will call the base connector's GetCapabilities() unless you override this method.

Declaration
public virtual Dictionary<string, bool> GetCapabilities()
Returns
Type Description
Dictionary<String, Boolean>

List of what the connector can do

GetConfigurationFields()

Will call the base connector's GetConfigurationFields() unless you override this method.

Declaration
public virtual Dictionary<string, FieldMetadataInfo> GetConfigurationFields()
Returns
Type Description
Dictionary<String, FieldMetadataInfo>

GetNumberOfActivePriceLists(String)

Will call the base connector's GetNumberOfActivePriceLists(String) unless you override this method.

Declaration
public virtual int GetNumberOfActivePriceLists(string isoCurrencyCode)
Parameters
Type Name Description
String isoCurrencyCode
Returns
Type Description
Int32

GetNumberOfProductImages(String)

Will call the base connector's GetNumberOfProductImages(String) unless you override this method.

Declaration
public virtual int GetNumberOfProductImages(string erpProductKey)
Parameters
Type Name Description
String erpProductKey
Returns
Type Description
Int32

GetOrderState(QuoteAlternativeContextInfo)

Calls the base class's implementation of GetOrderState(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual OrderResponseInfo GetOrderState(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context

The alternative to place and order for

Returns
Type Description
OrderResponseInfo

An updated alternative. Fill in the delivered quantity, change the state or reason flags on quote lines to reflect the state of the order in the ERP system.

GetProduct(QuoteAlternativeContextInfo, String)

Will call the base connector's GetProduct(QuoteAlternativeContextInfo, String) unless you override this method.

Declaration
public virtual ProductInfo GetProduct(QuoteAlternativeContextInfo context, string erpProductKey)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
String erpProductKey
Returns
Type Description
ProductInfo

GetProductImage(String, Int32)

Will call the base connector's GetProductImage(String, Int32) unless you override this method.

Declaration
public virtual string GetProductImage(string erpProductKey, int rank)
Parameters
Type Name Description
String erpProductKey
Int32 rank
Returns
Type Description
String

GetProducts(QuoteAlternativeContextInfo, String[])

Will call the base connector's GetProducts(QuoteAlternativeContextInfo, String[]) unless you override this method.

Declaration
public virtual ProductInfo[] GetProducts(QuoteAlternativeContextInfo context, string[] erpProductKeys)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
String[] erpProductKeys
Returns
Type Description
ProductInfo[]

GetQuoteLinesFromProduct(QuoteAlternativeContextInfo, String)

Will call the base connector's GetQuoteLinesFromProduct(QuoteAlternativeContextInfo, String) unless you override this method.

Declaration
public virtual QuoteLineInfo[] GetQuoteLinesFromProduct(QuoteAlternativeContextInfo context, string erpProductKey)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
String erpProductKey
Returns
Type Description
QuoteLineInfo[]

GetQuoteList(String)

Will call the base connector's GetQuoteList(String) unless you override this method.

Declaration
public virtual ListItemInfo[] GetQuoteList(string quoteListType)
Parameters
Type Name Description
String quoteListType
Returns
Type Description
ListItemInfo[]

GetSearchableFields()

Calls the base class's implementation of GetSearchableFields() unless you override this method.

Declaration
public virtual FieldMetadataInfo[] GetSearchableFields()
Returns
Type Description
FieldMetadataInfo[]

Metadata structures

GetSearchResults(SearchRestrictionInfo[])

Calls the base class's implementation of GetSearchResults(SearchRestrictionInfo[]) unless you override this method.

Declaration
public virtual ProductInfo[] GetSearchResults(SearchRestrictionInfo[] restrictions)
Parameters
Type Name Description
SearchRestrictionInfo[] restrictions

Array of restrictions chosen by the user; see SearchRestrictionInfo for details

Returns
Type Description
ProductInfo[]

Array (possibly empty) of hits, populated as fully as reasonably possible (should follow same policy as

InitializeConnection(QuoteConnectionInfo, UserInfo, Boolean, Dictionary<String, String>, IProductRegisterCache)

Will call the base connector's InitializeConnection(QuoteConnectionInfo, UserInfo, Boolean, Dictionary<String, String>, IProductRegisterCache) unless you override this method.

Declaration
public virtual PluginResponseInfo InitializeConnection(QuoteConnectionInfo connectionData, UserInfo user, bool isOnTravel, Dictionary<string, string> connectionConfigFields, IProductRegisterCache productRegister)
Parameters
Type Name Description
QuoteConnectionInfo connectionData

Information about the connection

UserInfo user

Information about the current user

Boolean isOnTravel

True if we are currently on travel

Dictionary<String, String> connectionConfigFields

Configuration parameters

IProductRegisterCache productRegister

Interface to call if a product register cache is desired

Returns
Type Description
PluginResponseInfo

OnAfterSaveQuote(QuoteAlternativeContextInfo)

Will call the base connector's OnAfterSaveQuote(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual void OnAfterSaveQuote(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context

OnAfterSentQuoteVersion(QuoteVersionContextInfo)

Will call the base connector's OnAfterSentQuoteVersion(QuoteVersionContextInfo) unless you override this method.

Declaration
public virtual QuoteSentResponseInfo OnAfterSentQuoteVersion(QuoteVersionContextInfo context)
Parameters
Type Name Description
QuoteVersionContextInfo context
Returns
Type Description
QuoteSentResponseInfo

OnBeforeCreateQuote(QuoteAlternativeContextInfo)

Will call the base connector's OnBeforeCreateQuote(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual QuoteResponseInfo OnBeforeCreateQuote(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
Returns
Type Description
QuoteResponseInfo

OnBeforeCreateQuoteAlternative(QuoteAlternativeContextInfo)

Will call the base connector's OnBeforeCreateQuoteAlternative(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual QuoteAlternativeResponseInfo OnBeforeCreateQuoteAlternative(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
Returns
Type Description
QuoteAlternativeResponseInfo

OnBeforeCreateQuoteVersion(QuoteVersionContextInfo)

Will call the base connector's OnBeforeCreateQuote(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual QuoteVersionResponseInfo OnBeforeCreateQuoteVersion(QuoteVersionContextInfo context)
Parameters
Type Name Description
QuoteVersionContextInfo context
Returns
Type Description
QuoteVersionResponseInfo

OnBeforeDeleteQuote(QuoteInfo, ISaleInfo, IContactInfo)

Will call the base connector's OnBeforeDeleteQuote(QuoteInfo, ISaleInfo, IContactInfo) unless you override this method.

Declaration
public virtual void OnBeforeDeleteQuote(QuoteInfo quote, ISaleInfo sale, IContactInfo contact)
Parameters
Type Name Description
QuoteInfo quote

Quote that will be deleted

ISaleInfo sale

Sale the quote belongs to

IContactInfo contact

Contact the sale belongs to

OnQuoteLineChanged(QuoteAlternativeContextInfo, QuoteLineInfo, String[])

Will call the base connector's OnQuoteLineChanged(QuoteAlternativeContextInfo, QuoteLineInfo, String[]) unless you override this method.

Declaration
public virtual QuoteLineInfo OnQuoteLineChanged(QuoteAlternativeContextInfo context, QuoteLineInfo ql, string[] changedFields)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
QuoteLineInfo ql
String[] changedFields
Returns
Type Description
QuoteLineInfo

PlaceOrder(QuoteAlternativeContextInfo)

Calls the base class's implementation of PlaceOrder(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual PlaceOrderResponseInfo PlaceOrder(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context

The alternative to place and order for

Returns
Type Description
PlaceOrderResponseInfo

How it went

RecalculateQuoteAlternative(QuoteAlternativeContextInfo)

Will call the base connector's RecalculateQuoteAlternative(QuoteAlternativeContextInfo) unless you override this method.

Declaration
public virtual QuoteAlternativeWithLinesInfo RecalculateQuoteAlternative(QuoteAlternativeContextInfo context)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
Returns
Type Description
QuoteAlternativeWithLinesInfo

Updated

SetConnectorToExtend(String)

Same as constructor

Declaration
protected void SetConnectorToExtend(string nameOfPluginToExtend)
Parameters
Type Name Description
String nameOfPluginToExtend

TestConnection(Dictionary<String, String>)

Will call the base connector's TestConnection(Dictionary<String, String>) unless you override this method.

Declaration
public virtual PluginResponseInfo TestConnection(Dictionary<string, string> connectionData)
Parameters
Type Name Description
Dictionary<String, String> connectionData
Returns
Type Description
PluginResponseInfo

UpdateQuoteVersionPrices(QuoteVersionContextInfo, HashSet<String>)

Will call the base connector's UpdateQuoteVersionPrices(QuoteVersionContextInfo, HashSet<String>) unless you override this method.

Declaration
public virtual QuoteVersionResponseInfo UpdateQuoteVersionPrices(QuoteVersionContextInfo context, HashSet<string> writeableFields)
Parameters
Type Name Description
QuoteVersionContextInfo context

Current quote version

HashSet<String> writeableFields
Returns
Type Description
QuoteVersionResponseInfo

Updated quote version

ValidateAlternative(QuoteAlternativeContextInfo, Boolean)

Will call the base connector's ValidateAlternative(QuoteAlternativeContextInfo, Boolean) unless you override this method. Does nothing if you are extending a connector that is not based on QuoteConnectorBase.

Declaration
protected virtual QuoteAlternativeWithLinesInfo ValidateAlternative(QuoteAlternativeContextInfo context, bool clearOldValues = false)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
Boolean clearOldValues

Should the function clear out old values for status and reason?

Returns
Type Description
QuoteAlternativeWithLinesInfo

A potentially changed alternative AND quotelines

ValidateQuoteLine(QuoteAlternativeContextInfo, QuoteLineInfo, Boolean)

Will call the base connector's ValidateQuoteLine(QuoteAlternativeContextInfo, QuoteLineInfo, Boolean) unless you override this method. Does nothing if you are extending a connector that is not based on QuoteConnectorBase.

Declaration
protected virtual QuoteLineInfo ValidateQuoteLine(QuoteAlternativeContextInfo context, QuoteLineInfo ql, bool clearOldValues = false)
Parameters
Type Name Description
QuoteAlternativeContextInfo context
QuoteLineInfo ql
Boolean clearOldValues

Should the function clear out old values for status and reason?

Returns
Type Description
QuoteLineInfo

A potentially changed quoteline

ValidateQuoteVersion(QuoteVersionContextInfo, QuoteAction)

Will call the base connector's ValidateQuoteVersion(QuoteVersionContextInfo, QuoteAction) unless you override this method.

Declaration
public virtual QuoteResponseInfo ValidateQuoteVersion(QuoteVersionContextInfo context, QuoteAction action)
Parameters
Type Name Description
QuoteVersionContextInfo context

The version with it's context

QuoteAction action
Returns
Type Description
QuoteResponseInfo

A potentially changed context

ValidateVersion(QuoteVersionContextInfo, QuoteAction, Boolean)

Will call the base connector's ValidateVersion(QuoteVersionContextInfo, QuoteAction, Boolean) unless you override this method. Does nothing if you are extending a connector that is not based on QuoteConnectorBase.

Declaration
protected virtual QuoteVersionResponseInfo ValidateVersion(QuoteVersionContextInfo context, QuoteAction action, bool clearOldValues = false)
Parameters
Type Name Description
QuoteVersionContextInfo context
QuoteAction action
Boolean clearOldValues

Should the function clear out old values for status and reason?

Returns
Type Description
QuoteVersionResponseInfo

A potentially changed version with alternative AND quotelines

Implements

IQuoteConnector
System.IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
ObjectExtensions.AssignByReflection<T>(T, T)
ObjectExtensions.GraphCopy<T>(T)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top