CRM Contact URL Not Popping Up

Status
Not open for further replies.

paoloLac

Free User
Joined
Jan 22, 2021
Messages
51
Reaction score
8
Hi,

We have 2 issues. Custom Integration template has been working for v16 but got issues on v18.

1. Contact URL is not popping up. We are outputting the ContactURL, FirstName, LastName and PhoneBusiness as per the documentation. Actions:
  • When doing a test call, if no contact exist, it's able to create the contact in 3cx as well as the CRM but no popup. Checked the logs and can see that the lookup is able to return a match from the CRM.
  • On the 2nd test call (contact already exists), we updated the contact name in the CRM and did a test call. 3cx was able to return results and update the 3cx contact but still no popup.
  • Run test via the `Test` option when uploading the template. It goes through successfully and the test log shows that there is a contactURL being created with the correct format.
2. EntityId being passed as empty string. The value for this attribute is being set on the outputs of the chained scenario.

I don't seem to see what the issue is and have been going through the logs several times.

Plan: Enterprise
3CX version: 18.0 (Build 965)
Number of TrunkLines: 2
IVR: Yes
3CX Phone: WebClient (Chrome Extension)
Automatically open contact URL when CRM integration is enabled: On

XML:
<Scenario Id="" Type="REST">
    <Request Url="[APIDomain]/phone-contacts?q=[Number]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json"/>
    <Rules>
      <Rule Type="Any">result.contact._id</Rule>
    </Rules>
    <Variables>
      <Variable Name="Id" Path="result.contact._id">
        <Filter />
      </Variable>
      <Variable Name="FirstName" Path="result.contact.first_name">
        <Filter />
      </Variable>
      <Variable Name="LastName" Path="result.contact.last_name">
        <Filter />
      </Variable>
      <Variable Name="PhoneBusiness" Path="result.contact.phone">
        <Filter />
      </Variable>
    </Variables>
    <Outputs Next="CreateEngagement"/>
  </Scenario>
  <Scenario Id="CreateEngagement" Type="REST">
    <Request SkipIf="[ReportCallEnabled]!=True" Url="[APIDomain]/phone-contacts/engagements/create" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
      <PostValues>
        <Value Key="contact_id" Passes="2" Type="String">[[Id]]</Value>
        <Value Key="customer_id" Passes="0" Type="String"></Value>
        <Value Key="transaction_id" Passes="0" Type="String"></Value>
        <Value Key="engagement_type" Passes="2" Type="String">[[CallType]]</Value>
        <Value Key="call_direction" Passes="2" Type="String">[[CallDirection]]</Value>
        <Value Key="phone_number" Passes="1" Type="String">[Number]</Value>
        <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
        <Value Key="agent_id" Passes="0" Type="String"></Value>
        <Value Key="customer_number" Passes="1" Type="String">[Number]</Value>
        <Value Key="status" Passes="0" Type="String">in-progress</Value>
        <Value Key="provider" Passes="1" Type="String">3CX</Value>
        <Value Key="duration" Passes="0" Type="String"></Value>
        <Value Key="body" Passes="0" Type="String"></Value>
      </PostValues>
    </Request>
    <Rules>
      <Rule Type="Any">data._id</Rule>
    </Rules>
    <Variables>
      <Variable Name="EngagementId" Path="data._id">
          <Filter/>
      </Variable>
      <Variable Name="TransactionId" Path="data.transaction_id">
          <Filter/>
      </Variable>
    </Variables>
    <Outputs AllowEmpty="false">
      <Output Type="EngagementId" Passes="2" Value="[[EngagementId]]"/>
      <Output Type="TransactionId" Passes="2" Value="[[TransactionId]]"/>
      <Output Type="ContactId" Passes="1" Value="[Id]" />
      <Output Type="FirstName" Passes="1" Value="[FirstName]" />
      <Output Type="LastName" Passes="1" Value="[LastName]" />
      <Output Type="PhoneBusiness" Passes="1" Value="[Number]" />
      <Output Type="DisplayName" Passes="1" Value="[FirstName] [LastName]" />
      <Output Type="EntityId" Passes="2" Value="[[Id]]:[[TransactionId]]:[[EngagementId]]"/>
      <Output Type="ContactUrl" Passes="1" Value="https://[Domain]/phone-systems/contacts?q=[Number]&amp;contact_id=[Id]"/>
    </Outputs>
  </Scenario>
  <Scenario Id="ReportCall" Type="REST">
    <Request SkipIf="[ReportCallEnabled]!=True" Url="[APIDomain]/phone-contacts/engagements/update" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
      <PostValues>
        <Value Key="engagement_type" Passes="2" Type="String">[[CallType]]</Value>
        <Value Key="call_direction" Passes="2" Type="String">[[CallDirection]]</Value>
        <Value Key="phone_number" Passes="1" Type="String">[Number]</Value>
        <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
        <Value Key="customer_number" Passes="1" Type="String">[Number]</Value>
        <Value Key="status" If="[CallType]==Inbound" Passes="2" Type="String">completed</Value>
        <Value Key="status" If="[CallType]==Missed" Passes="2" Type="String">[[CallType]]</Value>
        <Value Key="status" If="[CallType]==Outbound" Passes="2" Type="String">completed</Value>
        <Value Key="status" If="[CallType]==Notanswered" Passes="2" Type="String">abandoned</Value>
        <Value Key="provider" Passes="1" Type="String">3CX</Value>
        <Value Key="duration" Passes="1" Type="String">[Duration]</Value>
        <Value Key="body" If="[CallType]==Inbound" Passes="2" Type="String">[[InboundCallText]]</Value>
        <Value Key="body" If="[CallType]==Missed" Passes="2" Type="String">[[MissedCallText]]</Value>
        <Value Key="body" If="[CallType]==Outbound" Passes="2" Type="String">[[OutboundCallText]]</Value>
        <Value Key="body" If="[CallType]==Notanswered" Passes="2" Type="String">[[NotAnsweredOutboundCallText]]</Value>
        <Value Key="from_pbx" Passes="1" Type="Boolean">True</Value>
        <Value Key="transaction_data" Passes="0" Type="String">[EntityId]</Value>
      </PostValues>
    </Request>
    <Variables/>
    <Outputs/>
  </Scenario>

Any help would be much appreciated.

Thanks in advance.
 
Done sending you the DM @ConceptsWeb . Thank you so much!
 
Hi @ConceptsWeb ,

Good day! Would just like to ask if you have any updates with the 3cx template I shared via DM?

Thanks
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,891
Members
165,470
Latest member
Robert Lee