Newer Version Available

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

Unified Routing (Beta)

Unified routing lets Salesforce handle the routing of inbound voice calls to the agents. Configure unified routing so that the admins can enable the feature.

Unified routing is a pilot or beta service that is subject to the Beta Services Terms at Agreements - Salesforce.com or a written Unified Pilot Agreement if executed by Customer, and applicable terms in the Product Terms Directory. Use of this pilot or beta service is at the Customer's sole discretion.

Note

To configure unified routing so that admins can enable the feature, set the CapabilitiesSupportsUnifiedRouting field of the ConversationVendorInfo object to true, , and invoke the omni flow. The admins can then enable unified routing for the contact centers from the contact center details page. Once the supportsUnifiedRouting field is set to true, it can’t be changed to false.

When unified routing is enabled, you don’t have to handle the routing of the inbound voice calls, instead place the calls in a holding or temporary queue.

If you want to use the sample implementation in the Demo Connector, select the Unified Routing capability in the Routing Settings to enable unified routing. Also provide the omni flow dev name and the Salesforce fallback queue id in the Demo Connector. For example to support unified routing for inbound voice calls:

1startInboundCall(phoneNumber, callInfo, flowConfig) {
2        callInfo = callInfo || { isOnHold: false };
3        flowConfig = flowConfig || { isUnifiedRoutingEnabled: false };
4        callInfo.callStateTimestamp = new Date();
5        if (!this.state.agentAvailable) {
6            const message = `Agent is not available for a inbound call from phoneNumber - ${phoneNumber}`;
7            this.log(message);
8            return Promise.reject(new Error(message));
9        }
10        let callAttributes = { participantType: Constants.PARTICIPANT_TYPE.INITIAL_CALLER };
11        const id = Math.random().toString(36).substring(5);
12        let contact = new Contact({ phoneNumber, id, name: 'Customer '+ id });
13        return this.createVoiceCall(undefined, Constants.CALL_TYPE.INBOUND, phoneNumber, callInfo && callInfo.additionalFields).then((data) => {
14            callAttributes.voiceCallId = data.voiceCallId;
15            const call = new Call(Constants.CALL_TYPE.INBOUND.toLowerCase(), contact, callAttributes, new CallInfo(callInfo), data.vendorCallKey || this.generateCallId());
16            this.addCall(call);
17            const callResult = new CallResult({
18                call
19            });
20            //When Unified Routing is enabled, we need to invoke OmniFlow, otherwise regular flow to publish CALL_STARTED event.
21            if(flowConfig.isUnifiedRoutingEnabled) {
22                console.log('Inside isUnifiedRoutingEnabled ' + flowConfig.isUnifiedRoutingEnabled);
23                var response = this.executeOmniFlowForUnifiedRouting(data, flowConfig);
24                console.log('response From execute onmi flow' + response);
25            } else {
26                console.log('Non UnifiedRouting flow');
27                publishEvent({ eventType: Constants.VOICE_EVENT_TYPE.CALL_STARTED, payload: callResult });
28            }
29            return this.executeAsync('startInboundCall', callResult);
30        });
31    }