V18 Dynamics CRM

Status
Not open for further replies.

LEAD

Customer
Joined
Jan 5, 2021
Messages
52
Reaction score
10
Anyone else having issues with V18 Dynamics CRM Integration?

Looks like it is not properly retaining the EntityID for contacts or leads. When it is creating the post request. It adds everything but the regardingobjectid and partyid. This is causing it to fail since the partyid is a required field.

Looking at this part of the XML. I see it has changed in V18. I have tried both the V16 and V18 entries and neither work.

<Value Key="[email protected]" If="[EntityType]==Contact" Passes="0" Type="String">/contacts([EntityId])</Value>
<Value Key="[email protected]" If="[EntityType]==Lead" Passes="0" Type="String">/leads([EntityId])</Value>
<Value Key="[email protected]" If="[EntityType]==Account" Passes="0" Type="String">/accounts([EntityId])</Value>
<Array Key="phonecall_activity_parties">
<Object>
<Value Key="[email protected]" Passes="0" Type="String">/systemusers([SystemUserId])</Value>
<Value Key="participationtypemask" If="[CallType]==Inbound" Passes="0" Type="String">2</Value>
<Value Key="participationtypemask" If="[CallType]==Missed" Passes="0" Type="String">2</Value>
<Value Key="participationtypemask" If="[CallType]==Outbound" Passes="0" Type="String">1</Value>
<Value Key="participationtypemask" If="[CallType]==Notanswered" Passes="0" Type="String">1</Value>
</Object>
<Object>
<Value Key="[email protected]" If="[EntityType]==Contact" Passes="0" Type="String">/contacts([EntityId])</Value>
<Value Key="[email protected]" If="[EntityType]==Lead" Passes="0" Type="String">/leads([EntityId])</Value>
<Value Key="[email protected]" If="[EntityType]==Account" Passes="0" Type="String">/accounts([EntityId])</Value>
<Value Key="participationtypemask" If="[CallType]==Inbound" Passes="0" Type="String">1</Value>
<Value Key="participationtypemask" If="[CallType]==Missed" Passes="0" Type="String">1</Value>
<Value Key="participationtypemask" If="[CallType]==Outbound" Passes="0" Type="String">2</Value>
<Value Key="participationtypemask" If="[CallType]==Notanswered" Passes="0" Type="String">2</Value>
 
Last edited:
The EntityId is retrieved during contact lookup, and stored in the 3CX Contact. Then this is available during Call/Chat Journaling.

If these variables are empty during Call/Chat Journaling, you will need to enable verbose logs to understand why. Please, enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings, then make a test call, and check the 3cxSystemService.log file. In this file you will see all the interactions between 3CX and the CRM.
 
I did just that. It pulls the contact correctly and I see that the GUID is also being pulled, yet it is still not working.
 
What version of 3CX are you using?
 
This was with v18 alpha 5 and beta 1 (experienced it in both versions)
 
Please, enable verbose logs from the 3CX Console > Dashboard > Activity Log > Settings. Then reproduce the issue, and generate the support information bundle as described here:
https://www.3cx.com/docs/collecting-logs-for-3cx-support/

Finally upload this ZIP file to the cloud, and send me the download link in a private message, so I can check it.
 
Ok, I will do that during the weekend. How do I remove the username and password from the support bundle?
 
How do I remove the username and password from the support bundle?
3CX will not store your Dynamics credentials, because we use OAuth2 for the authorization. However, the logs inside the ZIP file will contain the access token, so please don't post it here, send it to me in a private message.
 
  • Like
Reactions: Evolute IT
Ok. That's not going to work. We will have to remove that from the logs so it will take me some time to make sure nothing is missed.
 
You can analyze the 3cxSystemService.log file yourself if you feel more comfortable with that. I'm just offering help. I can't do much more without seeing the log.
 
I'm experiencing the same issue with Zoho Bigin integration. 3CX is not persisting the EntityID and EntityType variables when it comes time to call the CreateCall Scenario.
 
I'm experiencing the same issue with Zoho Bigin integration. 3CX is not persisting the EntityID and EntityType variables when it comes time to call the CreateCall Scenario.
It seems that by the time 3CX starts the journaling all variables related to the Contact are out of scope.
 
It seems that by the time 3CX starts the journaling all variables related to the Contact are out of scope.
Beside EntityId and EntityType, yes. The Contact:: values are no longer available during journaling. That is due to the fact that the lookup request is no longer made twice but now only once.
 
  • Like
Reactions: edossantos
Beside EntityId and EntityType, yes. The Contact:: values are no longer available during journaling. That is due to the fact that the lookup request is no longer made twice but now only once.
What is the solution/workaround?
 
  • Like
Reactions: edossantos
Use EntityId and EntityType. If needed, do the lookup yourself in the ReportCall scenario.
I'm understanding that you are saying that EntityID and EntityType do not lose scope inside the CreateCall Scenario. But, we are stating that it does. I've confirmed it. When the "CreateCall" Scenario is called both EntityID and EntityID are null/blank.

Is there an error in the template for Zoho?
 
I'm understanding that you are saying that EntityID and EntityType do not lose scope inside the CreateCall Scenario. But, we are stating that it does. I've confirmed it. When the "CreateCall" Scenario is called both EntityID and EntityID are null/blank.

Is there an error in the template for Zoho?
It should not be like that.

@edossantos
 
What is wrong with the following code? Why do EntityType and EntityID lose their scope? Everything works:
  • The contact is found
  • The correct contact url is displayed
  • ReportCall calls up the correct user
  • CreateCall writes the information to the database. Except, since the EntityID is null/blank the Call information written to the User's activities instead of the Contact's activities. I've had to hard code EntityType as the String "Contacts" for $se_module for the CreateCall Scenario to work. I've also tried hard coding the EntityID to the ID of the calling Contact and that did write the Call details to the Contact's activities.
I did confirm that EntityType and EntityID are assigned values when the Contact lookup occurs.

<Scenario Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]&gt;0,True,False)]" Url="[ApiDomain]/bigin/v1/Contacts/search?phone=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">data.id</Rule>
</Rules>
<Variables>
<Variable Name="Id">data.id<Filter /></Variable>
<Variable Name="FirstName">data.First_Name<Filter /></Variable>
<Variable Name="LastName">data.Last_Name<Filter /></Variable>
<Variable Name="Email">data.Email<Filter /></Variable>
<Variable Name="Phone">data.Phone<Filter /></Variable>
<Variable Name="HomePhone">data.Home_Phone<Filter /></Variable>
<Variable Name="MobilePhone">data.Mobile<Filter /></Variable>
<Variable Name="Fax">data.Fax<Filter /></Variable>
<Variable Name="AssistantPhone">data.Asst_Phone<Filter /></Variable>
<Variable Name="AccountName">data.Account_Name.name<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="[Domain]/bigin/Home#/contacts/[Id]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="Email" Passes="0" Value="" />
<Output Type="PhoneBusiness" Passes="0" Value="[Phone]" />
<Output Type="PhoneBusiness2" Passes="0" Value="[AssistantPhone]" />
<Output Type="PhoneHome" Passes="0" Value="[HomePhone]" />
<Output Type="PhoneMobile" Passes="0" Value="[MobilePhone]" />
<Output Type="FaxBusiness" Passes="0" Value="[Fax]" />
<Output Type="CompanyName" Passes="0" Value="[AccountName]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
<Output Type="EntityId" Passes="0" Value="[Id]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request Url="[ApiDomain]/bigin/v1/users?type=CurrentUser" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any" Ethalon="">users.id</Rule>
</Rules>
<Variables>
<Variable Name="UserId" Path="users.id">
<Filter />
</Variable>
</Variables>
<Outputs Next="CreateCall" AllowEmpty="false" />
</Scenario>
<Scenario Id="CreateCall" Type="REST">
<Request Url="[ApiDomain]/bigin/v1/Calls" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<PostValues>
<Array Key="data">
<Object>
<Value Key="Subject" Passes="2" Type="String">[[Subject]]</Value>
<Value Key="Call_Start_Time" Passes="0" Type="String">[[CallStartTimeUTC].ToString("yyyy-MM-ddTHH:mm:ssZ")]</Value>
<Value Key="Call_Duration" Passes="0" Type="String">[Duration]</Value>
<Value Key="Call_Type" Passes="0" Type="String">[IIf([CallType]==Inbound||[CallType]==Missed,Inbound,Outbound)]</Value>
<Value Key="Call_Result" Passes="0" Type="String">[IIf([CallType]==Inbound||[CallType]==Outbound,Successful,Failed)]</Value>
<Value Key="$se_module" Passes="0" Type="String">Contacts</Value>
<Value Key="Who_Id" Passes="0" Type="String">[EntityID]</Value>
<Value Key="Description" If="[CallType]==Inbound" Passes="2" Type="String">[[InboundCallText]]</Value>
<Value Key="Description" If="[CallType]==Missed" Passes="2" Type="String">[[MissedCallText]]</Value>
<Value Key="Description" If="[CallType]==Outbound" Passes="2" Type="String">[[OutboundCallText]]</Value>
<Value Key="Description" If="[CallType]==Notanswered" Passes="2" Type="String">[[NotAnsweredOutboundCallText]]</Value>
<Object Key="Owner">
<Value Key="id" Passes="0" Type="String">[UserId]</Value>
</Object>
</Object>
</Array>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
 
One is "EntityId" in the lookup output.

The ReportCall tries to use "EntityID".

Notice the capital D. Variables are case-sensitive.
 
  • Like
Reactions: edossantos
One is "EntityId" in the lookup output.

The ReportCall tries to use "EntityID".

Notice the capital D. Variables are case-sensitive.
Thanks for noticing. But I was just quickly putting everything back to normal before pasting the code in the reply. The casing was correct in the original testing.

Besides the casing what is wrong with the code?
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei