Associating HubSpot & 3CX contacts when you don't control the SIP Trunk

Status
Not open for further replies.

Andrew Echo

New User
Joined
Mar 13, 2023
Messages
5
Reaction score
1
Hi, I have been following the guideline for integrating HubSpot & 3CX. We want to be able to have the HubSpot contact show up on 3CX for inbound and outbound calls.

However, we're always getting a new contact made 'New HubSpot contact'.

Also we don't have any control over the SIP Trunk, the IT company managing our 3CX said this is for reasons I can't recite but I trust their judgement on the issue.

Can you advise what else I can do?

I'll post follow up details as soon as I can.
 
So we've done the following:

1. First we made sure all contacts on HubSpot had the country codes per the E164 format requirements

2. Then we tested calls, they would not match and would create new contacts.

3. The new contacts created did not follow the E164 format, they would have the 0 in the number

4. We then tried changing a contact to have the 0 leading format, this did not match

5. We then tried editing the name of a new contact that was created in HubSpot by 3CX, but that would not show up on our phone system and still created new entries

6. We got our IT company to change “Advanced” > “Contacts” > “Options” to the settings 'Match Exactly', no change in what was happening

7. If we got a call from a number that 3CX had created, it would show in the phone system as 'New HubSpot contact'
 
  • Like
Reactions: Evolute IT
You'll need to check the logs and see if it found matches.

Start by using the TEST button in Settings > CRM, test different number formats there and see the results.
 
After doing this test, check the Logs tab, most probably a new contact is always being created because of some error during lookup.
 
Thank you for the suggestion, I have done a test log

Note: XYZ is the retracted data, but otherwise correct

[
{
"UnparsedOutputs": {
"FirstName": "xyz",
"LastName": "xyz",
"CompanyName": "",
"Email": "[email protected]",
"PhoneBusiness": "xyz",
"PhoneMobile": "",
"FaxBusiness": "",
"ContactUrl": "https://app.hubspot.com/contacts/xyz/contact/xyz",
"EntityId": "26451",
"EntityType": "Contacts"
},
"FirstName": "xyz",
"LastName": "xyz",
"Email": "[email protected]",
"ContactUrl": "https://app.hubspot.com/contacts/26307108/contact/26451",
"CompanyName": "",
"PhotoUrl": null,
"ContactType": 0,
"PhoneBusiness": "xyz",
"PhoneBusiness2": null,
"PhoneHome": null,
"PhoneHome2": null,
"PhoneMobile": "",
"PhoneMobile2": null,
"PhoneOther": null,
"FaxBusiness": "",
"FaxHome": null,
"Pager": null,
"ContactRawData": "26451|Contacts"
}
]

So it does successfully find my test phone number, it finds the correct entry in HubSpot with the right name.

But ringing the 3CX system brings up "New 3CX Contact xyz"

In 3CX it exists in a contact book called 'CRM'. There are multiple entries and there used to be multiple entries in HubSpot (we deleted those entries).

–––––––––––––

The log:


Started scenario with empty id
Started Auth
Request text: https://api.hubapi.com/oauth/v1/token
Request form value refresh_token set to eu1-f30b-aea6-47f8-abd2-6924373c9511
Request form value grant_type set to refresh_token
Request form value client_id set to 6da8da6a-1e80-4549-a105-ff4c7b152c2b
Request form value client_secret set to 47571936-4024-48f4-82a6-8b6f0fbbbf3e
Response text: {"token_type":"bearer","refresh_token":"eu1-f30b-aea6-47f8-abd2-6924373c9511","access_token":"CO6M8JHzMBIOQAEAQAAAAQAAAAAIAAEYpNTFDCDG2LwXKJGqVjIUqmjGLPEIM53lvyHS9zQoNKmAfik6MAAAAEcAAAAAAAAAAAAAAAAAgAAAAAAAAAAAACAAAAAAAOABAAAAIAAAHAAAABAwAkIUBa29YT4FJ1rD8obJ9v9yER0JgodKA2V1MVIAWgA","expires_in":1800}
Response finished
Variable AccessToken set to CO6M8JHzMBIOQAEAQAAAAQAAAAAIAAEYpNTFDCDG2LwXKJGqVjIUqmjGLPEIM53lvyHS9zQoNKmAfik6MAAAAEcAAAAAAAAAAAAAAAAAgAAAAAAAAAAAACAAAAAAAOABAAAAIAAAHAAAABAwAkIUBa29YT4FJ1rD8obJ9v9yER0JgodKA2V1MVIAWgA
Variable ExpiresIn set to 1800
Started GetPortalID
Request text: https://api.hubapi.com/integrations/v1/me
Response text: {"portalId":26307108,"timeZone":"Europe/London","accountType":"STANDARD","currency":"GBP","utcOffset":"+01:00","utcOffsetMilliseconds":3600000}
Response finished
Variable PortalID set to 26307108
Finished GetPortalID
Finished Auth
Request text: https://api.hubapi.com/crm/v3/objects/companies/search
Request message: {"properties":["name","phone"],"filterGroups":[{"filters":[{"propertyName":"phone","operator":"EQ","value":"xyz"}]}]}
Response text: {"total":0,"results":[]}
Response finished
Finished scenario with empty id
Started scenario with empty id
Request text: https://api.hubapi.com/crm/v3/objects/contacts/search
Request message: {"properties":["firstname","lastname","company","email","phone","mobilephone","fax"],"filterGroups":[{"filters":[{"propertyName":"phone","operator":"EQ","value":"xyz"}]},{"filters":[{"propertyName":"mobilephone","operator":"EQ","value":"xyz"}]},{"filters":[{"propertyName":"fax","operator":"EQ","value":"xyz"}]}]}
Response text: {"total":1,"results":[{"id":"26451","properties":{"company":null,"createdate":"2023-01-06T17:46:43.077Z","email":"[email protected]","fax":null,"firstname":"xyz","hs_object_id":"26451","lastmodifieddate":"2023-03-30T09:04:32.570Z","lastname":"xyz","mobilephone":null,"phone":"xyz"},"createdAt":"2023-01-06T17:46:43.077Z","updatedAt":"2023-03-30T09:04:32.570Z","archived":false}]}
Response finished
Variable ContactID set to 26451
Variable FirstName set to xyz
Variable LastName set to xyz
Variable CompanyName set to
Variable Email set to [email protected]
Variable PhoneBusiness set to xyz
Variable PhoneMobile set to
Variable FaxBusiness set to
Finished scenario with empty id
Result obtained

as far as I can tell it matches. In this case xyz is the phone number with leading 0 format.
 
It seems your integration is working properly. But probably a contact from the phonebook is being taken instead. Ensure that you remove any contact from your 3CX phonebook having this number.
 
  • Like
Reactions: Evolute IT
Thank you Ernesto, I will look at having the contacts removed so i can try again
 
Ok so I got account permissions to delete all the CRM contacts that were being generated. As there were many contacts being generated called 'New 3CX Contact [Number]' that were also generated on 3CX's contact books, not just HubSpot.

Contact Creation is disabled, I just want to see if it will correctly query HubSpot contacts from an incoming call.

So I tested with my phone number and no luck. Whether I did it with a 0, or as +44, it doesn't recognise.

But when I called again, it was visible, because it then imports the hubspot contact into 3CX contact book and it reads that on the second call.

–––––––––––––

"Contact Synchronization – inbound / outbound calls from / to external numbers trigger a CRM contact lookup to add to 3CX Contacts, so the contact name is automatically shown on your phone’s display when dealing with a call."
https://www.3cx.com/docs/hubspot-pbx-crm-integration/

Am I right in thinking, the intended way this integration works is that for our phone systems, the first instance of an inbound number which exists in HubSpot, it will just show the number.

Then it will import the contact to 3CX and the second time it calls, it will display the name.

Therefore, I would be right in thinking it will not instantly display the hubspot contact on the phone display?

Call Pop-ups – when using the 3CX Web Client or Desktop App, the customer record is brought up to you automatically when you receive an inbound call.
I did notice that for the web/desktop app it will show the name with no issue.
 
The DesktopApp should show the contact name and icon as soon as a match is found.

The IP phones and mobile app will only show the name on a 2nd call because they only look into the PBX phonebook. Contacts have to be added to the phonebook to be matched by those.

If you see a contact being imported, then it works perfectly fine.

As a random thought, what app are you using to test this?
 
Status
Not open for further replies.

Members Online Now

No members online now.

Forum statistics

Threads
111,831
Messages
589,277
Members
164,660
Latest member
RJenkinsROCK