Salesforce Click to Call - Number formatting.

Discussion in 'CRM / Helpdesk / App Integration' started by Dragonsong3k, Jan 12, 2017.

Thread Status:
Not open for further replies.
  1. Dragonsong3k

    Joined:
    Dec 22, 2015
    Messages:
    19
    Likes Received:
    0
    I have set up the click to call functionality. However the number must be formatted in a certain way in SF for this to work.

    In SF, the number will appear 1 (123) 456-7890 When you use the click to call functionality, the following parameter DESTINATION=(123)%20456-7890 is passed into SalesforceAPI.aspx

    This causes the click to call to drop the call instantly. If I edit the web request and change the number formatting to 1xxxXXXXXXX, then the call completes.

    My 3cx is configured for 11 digits for a local call in the format 1xxxXXXXXXX (11 digits)

    Is there a way to configure the plugin to take different number formatting? or make formatting rules on 3cx?

    Thanks for any help on this.
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,083
    Likes Received:
    77
    Hi @Dragonsong3k,

    The call should progress anyway, stripping the spaces, brackets, etc. Can you provide the Salesforce.log file from "%AppData%\3CXPhone for Windows\Logs"?

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Dragonsong3k

    Joined:
    Dec 22, 2015
    Messages:
    19
    Likes Received:
    0
    Thanks for pointing the logs out. It seems you are right, the number gets reformatted to 10 digits. However, I have the system requiring 11 digits (1 as the prefix). I see in the logs Making call to '2234567890' and not 12234567890.

    1/13/2017 1:14:07 PM - MyPhoneStatusChanged - Status='LoggedIn' - Extension='881'
    1/13/2017 1:14:15 PM - Requesting outbound call to destination: (223) 456-7890
    1/13/2017 1:14:19 PM - Clearing pendingOutboundCallDescriptor, the establishment of the outgoing call has taken too long. If you're experiencing this problem too often, consider changing the configuration parameter 'OutboundCallFailureMillisecondsTimeout' in section [General] into the configuration file %AppData%\3CXPhone for Windows\3CXCRM.ini. If the parameter is missing, the default value is 30000 (ie 30 seconds). Be aware that you will not be able to make a second outbound call until this time period elapses.
    1/13/2017 1:15:43 PM - Requesting outbound call to destination: (223) 456-7890
    1/13/2017 1:15:43 PM - Making call to '2234567890' - Original destination='(223) 456-7890'
    1/13/2017 1:15:51 PM - CallStatusChanged - CallID='165:2' - RealTimeCallID='165' - Incoming='False' - OtherPartyNumber='881' - State='WaitingForNewParty'
    1/13/2017 1:15:53 PM - CallStatusChanged - CallID='165:2' - RealTimeCallID='165' - Incoming='False' - OtherPartyNumber='881' - State='Ended'
    1/13/2017 1:15:53 PM - Call ended - callType='Outbound' - callId='165'.
    1/13/2017 1:15:53 PM - Outbound Call ended - Notification ignored because callId='165' is unknown.
     
  4. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,083
    Likes Received:
    77
    Hi @Dragonsong3k,

    From the logs it seems that the number received from Salesforce doesn't have the prefix 1. Is the number stored in Salesforce with that prefix? The plug-in will dial the number exactly as it is saved in your CRM.

    Regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Dragonsong3k

    Joined:
    Dec 22, 2015
    Messages:
    19
    Likes Received:
    0
    I tried adding the 1 but it seems there is some formatting on the SF side. Not sure how to change that.

    What I have done is removed the 11 digit for local calls requirement and made it 10 digits, then prepended the 1 on the route going out. The 1 is required for my phone company.

    That seems to make it work fine. Now I have to figure this out for international calling.
     
  6. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,083
    Likes Received:
    77
    Yes, you can always use 3CX outbound rules to re-format the number before sending it to the PSTN. If the prefix is a requirement of your carrier, then it's better to do it that way and not save the number with the prefix in Salesforce. Suppose that you change your carrier in the future, you would have to change all the numbers in Salesforce...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Dragonsong3k

    Joined:
    Dec 22, 2015
    Messages:
    19
    Likes Received:
    0
    Good point. Thanks for the help.
     
Thread Status:
Not open for further replies.