Newer Version Available

This content describes an older version of this product. View Latest

Create an SFDX Project

Allow Service Cloud Voice to communicate with your telephony provider. The package you’re creating includes a connector, contact center, settings metadata, and more.
  1. Clone the scv-external-telephony-quickstart GitHub repository, and install Salesforce CLI.
    1git clone --recurse-submodules https://github.com/service-cloud-voice/scv-external-telephony-quickstart
    2cd scv-external-telephony-quickstart
    3npm install # This will install sfdx CLI
    • You can also install the Salesforce CLI separately. To learn more, see Salesforce CLI.
    • If you already have Salesforce CLI installed, make sure to update it to the latest version sfdx update. This step is important because we’ve added our new Metadata type supported.
    • Make sure to use API version 52.0 in the sfdx project; you can find it in the sfdx-project.json. If you have the local API version override, make sure it’s set to 52.0. To troubleshoot, see Error: API Version Mismatch.
    • If you aren’t using API version 52.0 or are using an older Salesforce CLI version, you may see errors related to ConversationVendorInfo Metadata type. The error message from Salesforce CLI looks like this:
      1Unexpected file found in package directory: 
      2/Users/.../scv-external-telephony-quickstart/force-app/main/default/ConversationVendorInformation/sampleVendor.ConversationVendorInformation-meta.xml
  2. Develop your connector. For a demo implementation, see this open-source SCV demo connector Github repo.
  3. Update ConversationVendorInfo in scv-external-telephony-quickstart/force-app/main/default/ConversationVendorInformation/sampleVendor.ConversationVendorInformation-meta.xml.
    1. ConversationVendorInfo is a setup object that stores basic information about a telephony vendor.
    2. An AppExchange package should at least have one ConversationVendorInfo record.
    3. A ConversationVendorInfo record is required when customers creating a Contact Center by importing an XML file.
    4. Set the bridgeComponent to: <package-namespace>:<lms bridge name>. If you aren’t using it, you can remove it. If you’re testing with the demo-scv-connector, you can use {your_namespace}:lwcBridge or {your_namespace}:AuraBridge. To learn more see Use the Lightning Message Bridge.
    5. Set the clientAuthMode. Possible values are “SSO”, “Custom” and “Mixed”.
    6. Set the connectorUrl to the URL of the connector.
      i. If you’re testing with the demo-scv-connector, use the absolute link from Use the Demo Connector. For example, https://www.myTelephonyDemo.com:8080.
      ii. You can also choose to host the connector as a Visualforce page from the same Salesforce managed package, use the relative URL format from Host the Connector as a Visualforce Page. For example,/apex/<namespace>__<connector visual force page name>.
    7. Set customLoginUrl to the URL that is used to load the telephony system login page. If you aren’t using it, remove it. If you’re testing with the demo-scv-connector, use the link from Use the Demo Connector. For example, https://www.myTelephonyDemo.com:8080/login.html.
    8. Set the developerName to a desired unique name. It must match the file name.
    9. Set the masterLabel to the desired display name for the Telephony Provider. This label shows up in the Contact Center record as the telephony provider.
    10. Set the serverAuthMode. Possible values are OAuth and None.
  4. Update the following resources as needed. For details, see Use the Lightning Message Bridge. If you don’t plan to use the Lightning Message Bridge, remove the /aura, /lwc and /messageChannels folders.
    1. Aura Bridge: This example is a sample Aura bridge component. When referring to the LMS channel, use the namespace as a prefix: <namespace>__<lms channel name>__c.
      i. In force-app/main/default/aura/AuraBridge/AuraBridge.cmp, change <lightning:messageChannel type="REPLACE_WITH_NAMESPACE_NAME__ServiceCloudVoiceMessageChannel__c" .. to <lightning:messageChannel type="<namespace>__<lms channel name>__c" ..
    2. Aura LMS Sample: This sample Aura component subscribes to the lightning message channel. When referring to the LMS channel, use the namespace as a prefix: <namespace>__<lms channel name>__c.
      i. In force-app/main/default/aura/AuraLmsSample/AuraLmsSample.cmp, change <lightning:messageChannel type="REPLACE_WITH_NAMESPACE_NAME__ServiceCloudVoiceMessageChannel__c" .. to <lightning:messageChannel type="<namespace>__<lms channel name>__c"
    3. LWC Bridge: This example is a sample LWC bridge component. When referring to the LMS channel, don’t use the namespace as a prefix.
    4. LWC LMS Sample: This is a sample LWC component that subscribes to the lightning message channel. When referring to the LMS channel, don’t use the namespace as a prefix.