Configure Multiple Connector URLs

You can add multiple connector URLs and the corresponding login URLs in the managed package. The admin can select a connector URL during contact center creation or from the contact center details page.

  1. Set the CapabilitiesSupportsMultiVendorConfig field of the ConversationVendorInfo object to true.

  2. Implement the service_cloud_voice.VendorConfigProvider Apex interface and related classes.

    When the CapabilitiesSupportsMultiVendorConfig field is set to true, the service_cloud_voice.VendorConfigProvider Apex interface must be implemented. Otherwise, the ConversationVendorInfo object can’t be created or updated.

Use these sample code blocks as guides.

This sample interface definition implements the VendorConfigProvider Apex interface to send multiple connector and login URLs.

Implement the VendorConfigRequest Apex class to define the request payload for the getVendorConfigDetails method. This class definition represents the structure of the request containing information about the contact center. A sample implementation is:

Implement the VendorConfigResponse Apex class to define the list of configurations returned to the system. This class definition represents the format of the response returned from the getVendorConfigDetails method. A sample implementation is:

Implement the VendorConfigInfo Apex class to pair a connector URL with its corresponding login URL. This class serves as the primary pairing logic between the connector and login URLs. The class definition represents the structure of individual entries in the selection list for admins. A sample implementation is:

Implement the VendorUrl Apex class to define a specific URL endpoint along with the display name shown to admins in the UI. This class definition represents the structure of individual URL entries. Each URL has the actual URL and a display name field shown to admins in the selection list. A sample implementation is:

An example implementation for the VendorConfigProvider apex interface is:

Consider the following information before implementing the multiple connector URL feature:

  • The values of connector URL and login URL from the ConversationVendorInfo (CVI) are used as default values. If the admin doesn’t select a connector URL, the CVI defaults are used.
  • Do not send the default CVI URLs in the Apex response to avoid duplicate entries.
  • If no login URL is provided in the Apex response or if you provide a VendorURL object with a null login URL, the default login URL from the CVI is used.
  • Connector URL is mandatory. If not provided in the response, or if VendorURL objects contain a null connector URL, the entry is ignored and isn’t shown to the admin in the UI.