Solved CRM Salesforce - Call Journaling Disabled

Status
Not open for further replies.

MrL

New User
Joined
Sep 1, 2021
Messages
8
Reaction score
1
Hello,

We had Call Journaling enabled for our CRM that was established by another admin, through salesforce. I've gone through the documentation and the settings look correct from both the Salesforce and 3CX admin portal. But for some reason I cant get the logs to appear on our CRM. Below is the error code when I test the CRM Provider Config. and the log beneath that.

The Key and Secret are all correct and I've tried refreshing the Authorize Token Button.

Thanks in advance guys.

Error:
Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason=Bad Request - Content={"error":"invalid_grant","error_description":"authentication failure"}

Log:
Started scenario with empty id
Started Auth
Request text: https://login.salesforce.com/services/oauth2/token
Request form value grant_type set to refresh_token
Request form value refresh_token set to "Token"
Request form value client_id set to "Client ID"
Request form value client_secret set to "Client Secret"
System.Exception: Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason=Bad Request - Content={"error":"invalid_grant","error_description":"authentication failure"}
at CrmIntegration.ScenarioProcessorBase.ProcessRequest(ScenarioRequest request, IValueManager customManager, HttpClient client, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.ScenarioAuthHttpClientProvider.PerformScenarioIfNeeded(CancellationToken token)
at CrmIntegration.ScenarioAuthHttpClientProvider.Create(CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.ProcessScenario(ProtocolScenario scenario, IValueManager customManager, CancellationToken token)
at CrmIntegration.ScenarioProcessorBase.Execute(ProtocolScenario scenario, CancellationToken token)
at CrmIntegration.CrmProcessor.GetContactInfoFromCrm(String contactNumber, Boolean isInboundCall, String destinationEmail, Boolean createIfNotFound, CancellationToken token)
 
Are you using the Salesforce or SalesforceV2 template? You can check this from the 3CX Console > Settings > CRM. You should use V2 which uses the full OAuth2 flow, and we're only providing new features like Chat Journaling there.

As you're having problems with the authentication, I need to understand this first.
 
  • Like
Reactions: Evolute IT
Hi Santos,
Thanks for that. The V2 OAuth has been set. It seems like the authentication might be the issue.
 
Hi Santos,
Thanks for that. The V2 OAuth has been set. It seems like the authentication might be the issue.
Did you click the Authorize button in the 3CX Console > Settings > CRM > SalesforceV2? Are you getting a Refresh Token back?
 
Hi Santos, I have the following settings, Im also talking with someone from Salesforce to get this configured. I really appreciate your help
 

Attachments

  • 3cx settings.png
    3cx settings.png
    47.2 KB · Views: 14
  • 3cx_1.png
    3cx_1.png
    37.2 KB · Views: 14
From the screenshot I can see that you have a Refresh Token, provided by Salesforce. That's the first part of the OAuth2 flow. And you're getting the error when you try to get an Access Token. Please check if the application you created in Salesforce is properly configured as explained here:
https://www.3cx.com/docs/salesforce-crm-integration/#h.iwrwzza590ku
 
The settings are the same.
I was given a tip to check the IP security from one of the Salesforce guys.

I changed it from
Enforce IP restrictions to
Relax IP restrictions.

There's about 4 different ip settings in there.

Testing now.
They are also going to try and check the logs when the request is apparently trying to go through.
 

Attachments

  • ip restrictions.png
    ip restrictions.png
    61 KB · Views: 7
Waiting to hear back from those guys but when trying to test a number that's in SF with the Test CRM Integration tool on 3CX it came up with this error:

Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason=Bad Request - Content={"error":"invalid_grant","error_description":"authentication failure"}

I'll keep you updated. Thanks.
 
Waiting to hear back from those guys but when trying to test a number that's in SF with the Test CRM Integration tool on 3CX it came up with this error:

Server returned a non successful status code - HTTPStatusCode=BadRequest - Reason=Bad Request - Content={"error":"invalid_grant","error_description":"authentication failure"}

I'll keep you updated. Thanks.
Does your Client ID or Client Secret have special characters? In some cases something different than letters or numbers might cause an encoding issue. Just something to check...

Apart from that, wait for the feedback from Salesforce, maybe they can see something from their side.
 
  • Like
Reactions: Evolute IT
Thanks for being diligent on this matter here Santos. I got a reply from the SF guys stating the following:

____

Good to know that the authentication part is sorted now. So going back to the original issue described in case, is the call logs still not created?
In order to understand what may be going on, you may want to enable verbose log in 3CX, make a test call, and see what is captured in the log. I've also found this discussion on the 3CX forum:
https://www.3cx.com/community/threads/3cx-salesforce-integration-call-journaling-not-working.79907/
where one of the 3CX Support member suggested that:
"Please note that your Salesforce users must have their extension numbers configured in Salesforce, otherwise calls will not be logged. Only calls to these extensions will be logged."
The poster also commented that "Converting to using 10 digit lookups fixed everything for me".
I would suggest checking the above, and start with 3CX logs to see if relevant request has been sent from 3CX to log a call in Salesforce.
____

I didn't needed to check the logs as after I Authorized the Token the log TEST had fixed the errors that were coming up.

It then took some hours I guess to register from Friday for the token to be recognised as it was being logged when I was making calls. The thing is I ended up Authorising the token initially when I first started having this issue. I guess something to look for next time is to just smash that button until it works again. I'm not sure why it had stopped working at all or why it didn't work after I authorized it initially.

Thank you for your help Santos
 
  • Like
Reactions: edossantos
I lied. The logs are working but only for certain contacts now. I'll update soon.
 
There was a bit of misdirection from my staff. It appears it did work after all. Thanks mate.
 
Thanks for the feedback @MrL, and glad yo know you have it working!
 
Status
Not open for further replies.

Forum statistics

Threads
112,147
Messages
590,961
Members
165,167
Latest member
Finatra.us