Missing Fields in CallJournal Request

Status
Not open for further replies.

mhuk98

Forum User
Joined
Jun 27, 2022
Messages
2
Reaction score
0
Hi,

In our custom crm integration using the template designer most calls have been coming through correctly- however, I have started to notice a pattern of calls with the call type of Notanswered and direction as Outbound seem to often not have an agents name/email/extension missing in the requstbody meaning calls with no agent attached are stored in our system. I've included the responsible template section below with our URL's blanked out. There doesn't appear to be a difference between the call types in how they create the request body so it's slightly confusing as to why its only these calls that are affected. These call's correctly have agent names attached to them in the 3cx portal call logs. Any advice would be appreciated.

XML:
    <Scenario Id="ReportCall" Type="REST">
      <Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Inbound,True,False)])]" Url="url" MessagePasses="0" Message="" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
        <PostValues Key="">
          <Value Key="applicationPersonId" Passes="1" Type="String">[EntityId]</Value>
          <Value Key="callType" Passes="1" Type="String">[CallType]</Value>
          <Value Key="direction" Passes="1" Type="String">[CallDirection]</Value>
          <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
          <Value Key="agentName" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
          <Value Key="agentEmail" Passes="1" Type="String">[AgentEmail]</Value>
          <Value Key="phoneNumber" Passes="1" Type="String">[Number]</Value>
          <Value Key="duration" Passes="1" Type="String">[Duration]</Value>
          <Value Key="callTime" Passes="1" Type="String">[DateTime]</Value>
        </PostValues>
      </Request>
      <Variables />
      <Outputs Next="ReportCallMissed" AllowEmpty="true" />
    </Scenario>
    <Scenario Id="ReportCallMissed" Type="REST">
      <Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Missed,True,False)])]" Url="URL" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
        <PostValues Key="">
          <Value Key="applicationPersonId" Passes="1" Type="String">[EntityId]</Value>
          <Value Key="callType" Passes="1" Type="String">[CallType]</Value>
          <Value Key="direction" Passes="1" Type="String">[CallDirection]</Value>
          <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
          <Value Key="agentName" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
          <Value Key="agentEmail" Passes="1" Type="String">[AgentEmail]</Value>
          <Value Key="phoneNumber" Passes="1" Type="String">[Number]</Value>
          <Value Key="duration" Passes="1" Type="String">[Duration]</Value>
          <Value Key="callTime" Passes="1" Type="String">[DateTime]</Value>
        </PostValues>
      </Request>
      <Variables />
      <Outputs Next="ReportCallOutbound" AllowEmpty="true" />
    </Scenario>
    <Scenario Id="ReportCallOutbound" Type="REST">
      <Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Outbound,True,False)])]" Url="url" MessagePasses="0" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
        <PostValues Key="">
          <Value Key="applicationPersonId" Passes="1" Type="String">[EntityId]</Value>
          <Value Key="callType" Passes="1" Type="String">[CallType]</Value>
          <Value Key="direction" Passes="1" Type="String">[CallDirection]</Value>
          <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
          <Value Key="agentName" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
          <Value Key="agentEmail" Passes="1" Type="String">[AgentEmail]</Value>
          <Value Key="phoneNumber" Passes="1" Type="String">[Number]</Value>
          <Value Key="duration" Passes="1" Type="String">[Duration]</Value>
          <Value Key="callTime" Passes="1" Type="String">[DateTime]</Value>
        </PostValues>
      </Request>
      <Variables />
      <Outputs Next="ReportCallNotanswered" AllowEmpty="true" />
    </Scenario>
    <Scenario Id="ReportCallNotanswered" Type="REST">
      <Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Notanswered,True,False)])]" Url="url" MessagePasses="0" Message="" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
        <PostValues Key="">
          <Value Key="applicationPersonId" Passes="1" Type="String">[EntityId]</Value>
          <Value Key="callType" Passes="1" Type="String">[CallType]</Value>
          <Value Key="direction" Passes="1" Type="String">[CallDirection]</Value>
          <Value Key="agent" Passes="1" Type="String">[Agent]</Value>
          <Value Key="agentName" Passes="1" Type="String">[AgentFirstName] [AgentLastName]</Value>
          <Value Key="agentEmail" Passes="1" Type="String">[AgentEmail]</Value>
          <Value Key="phoneNumber" Passes="1" Type="String">[Number]</Value>
          <Value Key="duration" Passes="1" Type="String">[Duration]</Value>
          <Value Key="callTime" Passes="1" Type="String">[DateTime]</Value>
        </PostValues>
      </Request>

Example Request intercepted with phone number blanked out:

JSON:
{
   "applicationPersonId":"",
   "callType":"Notanswered",
   "direction":"Outbound",
   "agent":"",
   "agentName":" ",
   "agentEmail":"",
   "phoneNumber":"0000000000",
   "duration":"00:04",
   "callTime":"8/16/2022 10:00 AM"
}
 
First of, you can remove all 3 others scenario, remove the second IIf from the first one and use one scenario for all as you already send the data as is.

(I know the wizard creates 4 scenarios but it can be cropped to 1.)
 
First of, you can remove all 3 others scenario, remove the second IIf from the first one and use one scenario for all as you already send the data as is.

(I know the wizard creates 4 scenarios but it can be cropped to 1.)
Does this look correct? and also do you think this will solve the problem? - I have edited my original post to show an example request.
XML:
     <Request SkipIf="[IIf([ReportCallEnabled]!=True,True,[IIf([CallType]!=Inbound,True,False)])]" Url="url" MessagePasses="0" Message="" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">

changing to

XML:
     <Request SkipIf="[IIf([ReportCallEnabled]!=True,True)]" Url="url" MessagePasses="0" Message="" RequestContentType="application/json" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
 
Like this:
XML:
SkipIf="[ReportCallEnabled]!=True"

And it may or may not. With custom CRM templates it's hard to figure sometimes.
 
  • Like
Reactions: TheodorosG_3CX
Status
Not open for further replies.

Forum statistics

Threads
112,322
Messages
591,889
Members
165,470
Latest member
Robert Lee