Integrating CCaaS and Salesforce

Integrate softphone to Salesforce

Integration to Salesforce or external CRM application works by writing a wrapper library that receives softphone events and performs external application specific actions.

For any event like call accepted, call rejected, call completed, agent status changes, etc, Softphone would notify wrapper library with payload and then it is responsibility of wrapper library to convert the softphone event into application specific logic.

In case CRM application need to notify Softphone about the action like initiating outbound call then it also need to happen through callbacks exposed by Softphone to Wrapper library.

Steps for integration -

  1. Write a wrapper library that implements the Softphone contract and is accessible from remote location

    Contract

    1 load(callback) Executed when softphone loads.
    Parameters -

    Property Type Purpose
    callback String callback method that wrapper library needs to call to notify softphone.

    Callback method takes two params, event type and payload. callback(eventType, payload)
    Softphone supports following event types -

    • disposition
      Array of strings that will be displayed as drop down in softphone.

      ["code1", "code2"]
    • partner_config
      It is required to allow agent to use dialpad to initiate independent outbound call.
      Sample payload -

      {
        "partnerId": "215fd887-39be-4935-981f-2670d6afeaa7",
        "businessSegmentId": "d6afeaa7-39be-4935-981f-2670215fd887",
        "channelOriginId": "57053e21-0440-4689-a27a-513d7dceebde",
      }
    • get_presence
      When application need to know current status on Softphone. In response softphone calls statusChanged()
      No payload is expected.
    • update_presence
      When application need to notify Softphone to change agent presence.
      Sample payload -

      {
        softphoneId: 'd6afeaa7-39be-4935-981f-2670215fd887'
      }
    • start_call
      When application need to notify Softphone to initiate outbound call.
      Sample payload -

      {
        "partnerId": "215fd887-39be-4935-981f-2670d6afeaa7",
        "businessSegmentId": "d6afeaa7-39be-4935-981f-2670215fd887",
        "channelOriginId": "57053e21-0440-4689-a27a-513d7dceebde",
        "dialTo": "+18883973342",
        "dialFrom": "+18449401117",
        "participantType": "Traveler/Supplier/Agent",
      }

    2 incomingCall() Executed by softphone when an incoming call is routed to the agent.
    Parameters -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    callerANI String Phone Number of caller
    language String Language selected by caller. Default - en_US

    3 callAccepted(JSONparams) Executed by softphone when call is accepted by agent.
    Properties of request JSON -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    callerANI String Phone Number of caller
    language String Language selected by caller. Default - en_US
    ivrExitPath String Intent
    channelName String
    reservationStartDate String Booking start date if booking was identified during interaction with Virtual Agent
    specialEvent String
    escalationType String
    recordingStatus String ON or OFF

    4 callRejected(JSONparams) Executed by softphone when call is rejected actively or passively.
    Properties of request JSON -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    reason String active/passive

    5 callEnded(JSONparams) Executed by softphone when call is rejected actively or passively.
    Properties of request JSON -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    duration Number Call duration in seconds
    disposition String Disposition code selected by agent.
    notes String Call Notes entered by agent.
    callType String inbound/outbound

    6 callNotesSubmitted(JSONparams) Executed by softphone when agent submits disposition and notes.
    Properties of request JSON -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    disposition String Disposition code selected by agent.
    notes String Call Notes entered by agent.

    7 outboundCallInitiated(JSONparams) Executed by softphone when agent starts independent outbound call.
    Properties of request JSON -

    Property Type Purpose
    partnerId String Unique guid to identify partner in platform
    conversationId String Unique guid to identify conversation
    dialledTo String Disposition code selected by agent.

    8 statusChanged(JSONparams) Executed by softphone when agent changes status.
    Properties of request JSON -

    Property Type Purpose
    softphoneId String Unique guid of status on softphone
          
  2. If CRM application is running on a domain other than *.expedia.com then share domain with Softphone team to add them to list of allowed domain to support cross domain script execution.
  3. Add Softphone url to application configuration that will load Softphone. Example in Salesforce it is inside call center definition.