Dynamics CRM integration only stores one number; company OR mobile phone

Status
Not open for further replies.

BobF

Free User
Joined
Oct 1, 2018
Messages
36
Reaction score
3
When Dynamics CRM connection is made and a contact phones in with his direct company number, the contact is found and stored into 3CX phonebook with his companynumber only although there is a registered mobile number as well.

Next time he calls with his mobile, the contact is found and updates the stored record in 3CX phonebook but only storing his mobile number and deleting the direct company number.

Why not add both phonenumbers into the 3cx Phonebook record or not delete the existing stored number?
 
When Dynamics CRM connection is made and a contact phones in with his direct company number, the contact is found and stored into 3CX phonebook with his companynumber only although there is a registered mobile number as well.

Next time he calls with his mobile, the contact is found and updates the stored record in 3CX phonebook but only storing his mobile number and deleting the direct company number.

Why not add both phonenumbers into the 3cx Phonebook record or not delete the existing stored number?
This is a known issue. The problem is that Dynamics has too many phone number fields, many more than 3CX. So we can't map all of them to 3CX fields. Then, we need to add the calling number to the corresponding 3CX field, and some existing values might be lost in this case. The next time this customer calls you with the company number, the contact record will be updated in 3CX.
 
This is a known issue. The problem is that Dynamics has too many phone number fields, many more than 3CX. So we can't map all of them to 3CX fields. Then, we need to add the calling number to the corresponding 3CX field, and some existing values might be lost in this case. The next time this customer calls you with the company number, the contact record will be updated in 3CX.
Ok but 3cx has a business phone number and a mobile phonenumber

When I call with my mobile, the mobile phone number is filled and business phonenumber is emptied.
When I call with a business phonenumber this is filled into the business phonenumber of 3CX, perfect. But the mobile phone number is emtied. That is not needed in my opinion.
 
Ok but 3cx has a business phone number and a mobile phonenumber

When I call with my mobile, the mobile phone number is filled and business phonenumber is emptied.
When I call with a business phonenumber this is filled into the business phonenumber of 3CX, perfect. But the mobile phone number is emtied. That is not needed in my opinion.
As I mentioned, Dynamics has many more phone fields than 3CX, and this is the only way we could make it work querying all the fields.
 
I just make a small lineup, off course when we can make it configurable it would even be nicer
But just do not clear the mobile field when a business phone number comes in is the first step.
Mapping is done on mobile and businessphone so there is no need to flush the mobile number when this is still filled at contact record within CRM.
Now:
CRM business phone -> 3CX Business phone (and flushing mobile in 3CX)
CRM mobile phone -> 3CX Mobile and flushing Business phone in 3CX

Can't we make this mapping as a default, is always better then only accepting one number:
3CX has:
Mobile, Mobile2, Home, Home 2, Business, Business 2, Business Fax, Home Fax, Pager

CRM has:
telephone1 map to BusinessPhone
telephone2 map to BusinessPhone 2
telephone3 map to Other
mobilephone map to MobilePhone
address1_telephone1 map to BusinessPhone
address1_telephone2 map to BusinessPhone 2
address1_telephone3 map to Other
address2_telephone1 map to BusinessPhone
address2_telephone2 map to BusinessPhone 2
address2_telephone3 map to Other
address3_telephone1 map to BusinessPhone
address3_telephone2 map to BusinessPhone 2
address3_telephone3 map to Other

Off course it can occur that businessphone will be overwritten by address1_telephone1 but it is defendable.

Or can we manage this when we edit the default Dynamics CRM template?
 
When I look into the template this mapping is already be done and almost the same. :)

But then I have to conclude that only the last called in number is stored in 3CX and the already mapped numbers from previous called in other fields in 3CX are flushed.
 
You can change the mapping we did by updating the template. But you will end up with a custom template, and therefore you will miss any update we provide.
 
I checked the template and found the issue I believe.

There are 2 contact lookup queries:
1st one is (Yellow) without Mobile number. So this one will not match when calling in with mobile number

<Scenario Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]&gt;0,True,False)]" Url="[Domain]/api/data/v8.2/contacts?$select=firstname,lastname,_parentcustomerid_value,telephone1,telephone2,telephone3,fax,address2_telephone1,address2_telephone2,address2_telephone3,address2_fax,pager,emailaddress1&amp;$filter=contains(telephone1,'[Number]') or contains(telephone2,'[Number]') or contains(telephone3,'[Number]') or contains(fax,'[Number]') or contains(address2_telephone1,'[Number]') or contains(address2_telephone2,'[Number]') or contains(address2_telephone3,'[Number]') or contains(address2_fax,'[Number]') or contains(pager,'[Number]')" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">value.contactid</Rule>
</Rules>
<Variables>
<Variable Name="ContactId" Path="value.contactid">
<Filter />
</Variable>
<Variable Name="AccountId" Path="value._parentcustomerid_value">
<Filter />
</Variable>
<Variable Name="FirstName" Path="value.firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="value.lastname">
<Filter />
</Variable>
<Variable Name="Email" Path="value.emailaddress1">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="value.telephone1">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" Path="value.telephone2">
<Filter />
</Variable>
<Variable Name="PhoneOther" Path="value.telephone3">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="value.address2_telephone1">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="value.address2_telephone2">
<Filter />
</Variable>
<Variable Name="PhoneHome" Path="value.address2_telephone3">
<Filter />
</Variable>
<Variable Name="PhoneHome2" Path="">
<Filter />
</Variable>
<Variable Name="FaxHome" Path="value.address2_fax">
<Filter />
</Variable>
<Variable Name="FaxBusiness" Path="value.fax">
<Filter />
</Variable>
<Variable Name="Pager" Path="value.pager">
<Filter />
</Variable>
</Variables>
<Outputs Next="GetAccountName" AllowEmpty="false" />
</Scenario>
<Scenario Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]&gt;0,True,False)]" Url="[Domain]/api/data/v8.2/contacts?$select=firstname,lastname,_parentcustomerid_value,assistantphone,managerphone,mobilephone,business2,home2,address1_telephone1,address1_telephone2,address1_telephone3,address1_fax,emailaddress1&amp;$filter=contains(assistantphone,'[Number]') or contains(managerphone,'[Number]') or contains(mobilephone,'[Number]') or contains(business2,'[Number]') or contains(home2,'[Number]') or contains(address1_telephone1,'[Number]') or contains(address1_telephone2,'[Number]') or contains(address1_telephone3,'[Number]') or contains(address1_fax,'[Number]')" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">value.contactid</Rule>
</Rules>
<Variables>
<Variable Name="ContactId" Path="value.contactid">
<Filter />
</Variable>
<Variable Name="AccountId" Path="value._parentcustomerid_value">
<Filter />
</Variable>
<Variable Name="FirstName" Path="value.firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="value.lastname">
<Filter />
</Variable>
<Variable Name="Email" Path="value.emailaddress1">
<Filter />
</Variable>
<Variable Name="PhoneBusiness" Path="value.assistantphone">
<Filter />
</Variable>
<Variable Name="PhoneBusiness2" Path="value.business2">
<Filter />
</Variable>
<Variable Name="PhoneOther" Path="value.managerphone">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="value.mobilephone">
<Filter />
</Variable>
<Variable Name="PhoneHome" Path="value.home2">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="value.address1_telephone1">
<Filter />
</Variable>
<Variable Name="PhoneHome2" Path="value.address1_telephone2">
<Filter />
</Variable>
<Variable Name="FaxBusiness" Path="value.address1_telephone3">
<Filter />
</Variable>
<Variable Name="FaxHome" Path="value.address1_fax">
<Filter />
</Variable>
<Variable Name="Pager" Path="">
<Filter />
</Variable>
</Variables>


As you can see the query result will come in different mappings where the first one will flush mobile phone since there is no value.address2_telephone1 and the 2nd one will flush Business phone since there is no value.assistantphone

This doesn't seem right by me actually.
 
Exactly, this is what I explained. Dynamics has many more phone fields than 3CX, that's why we need to split the lookup in 2 queries. If the first query returns the number, then we use the mappings from the first query. Otherwise we use the mappings from the second query... This way we can query all the phone fields.
 
Ok, perfect, so we will modify the queries then.

How can we combine to values in one field into 3CX?
Can you help me with that?
<Variable Name="LastName" Path="value.lastname"> we want to add the Accountname after the lastname.
 
How can we combine to values in one field into 3CX?
Can you help me with that?
<Variable Name="LastName" Path="value.lastname"> we want to add the Accountname after the lastname.
Variables are assigned from a single value from the response. So you need to define 2 variables:
XML:
<Variable Name="LastName" Path="value.lastname">
<Variable Name="AccountName" Path="value.name"/>

And then you concatenate these 2 variables in your output:
XML:
<Output Type="FullName" Value="[LastName] [AccountName]" />
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,324
Messages
591,897
Members
165,476
Latest member
awan05