> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start the client

> How to start the quote connector client

Connections are initialized on demand.

The SuperOffice windows client calls `InitializeConnection` during startup using the values saved from the **Create** connection dialog in the Admin client and then checks the return value to see if the ERP system is available.

If the connection initialized OK, then SuperOffice will mark the connection as available for use.

If the `InitializeConnection` returned NOT OK then the connection is marked as unavailable - and the connection will not be used for the remainder of the session. This means that any quotes created using this connection cannot be edited, and the **OPEN** button will be disabled.

![06][img1]

If a connection fails to initialize then the result is cached, so that the client can get the initialize result later (for tooltips and the like).

## Int CRMConnectionId

The ID of this connection in the CRM system.

## PluginResponseInfo InitializeConnection( QuoteConnectionInfo connectionData, Dictionary \<string, string> configurationFields, IProductRegisterCache productRegister)

Set up the connection to the ERP system. Will be called as part of SuperOffice client startup for each installed connection.

Configuration data comes from the config dialog shown in the Admin client. See `IQuoteConnectorSetup.GetConfigurationFields` in [the setup][1].

The key in the Dictionary is the `FieldKey`, and must match the key in the `FieldMetadataInfo`. The value is the user's input during setup.

**Return value IsOk:**

False means the connection is not available, and quotes based on this connection cannot be edited. `IsOk`is set to false if the connector can't provide service (no network). Text will explain this to the user.

## Dictionary \< string, PluginResponseInfo > GetCapabilities()

Returns a set of capability name-status pairs that tell the system what capabilities this connector provides.

Using the `PluginResponseInfo` gives the connector the possibility to disable a capability, with a reason string that might be shown to the user.

## QuoteVersionResponseInfo OnBeforeCreateQuote ( QuoteContextInfo context )

Called when a user is creating a quote. Returns an updated context.

The Quote does not exist in database at this time. Any changes in the returned `QuoteContextInfo` will be saved and the GUI updated.

The following parts of the QuoteContextInfo can be updated by this method:

* Quote
* QuoteVersion
* QuoteAlternative

Changes to other parts of the `QuoteContextInfo` will be ignored.

## void OnAfterSaveQuote( QuoteContextInfo context )

Called after a sale containing a quote is saved: after quote is created, and after quote dialog is closed.

<Note>
  New items have now gotten their ids in the CRM system.
</Note>

Changes to the QuoteContextInfo are ignored.

## void OnBeforeDeleteQuote( QuoteInfo quote, ISaleInfo sale )

Called before a sale containing a quote is deleted. Clean up in the ERP system, if needed.

[1]: ./set-up

[img1]: /media/loc/en/api/plugins/image006-2.jpg


## Related topics

- [Debug Web client](/en/onsite/debug/web-client.md)
- [Set up the Database Mirroring client](/en/online/mirroring/setup-guide.md)
- [Create a new client secret](/en/developer-portal/create-app/config/get-client-secret.md)
- [SuperOffice WebApi Client Library](/en/api/reference/webapi/index.md)
- [How to upgrade SuperOffice 7 Windows clients to SuperOffice 8 Windows App](/en/onsite/upgrade/75-to-8/win-client.md)
- [NetServer ClientConfigurationProvider element (SuperOffice only)](/en/onsite/web-config/clientconfigurationprovider.md)
