- Joined
- Jun 21, 2021
- Messages
- 18
- Reaction score
- 5
I am trying to integrate 3CX with Freshworks for call journaling and as most of you know currently 3CX will report calls as answered if picked up by IVR.
So I wanted to create a custom scenario to be executed after
by skipping the ReportCall scenario if
and run
This second scenario should report any call answered by the IVR as missed, but the problem is currently an inbound call whether answered by the IVR or another extension will report the call twice in the CRM:
So, I was wondering if someone was willing to take a look at my template and tell me what I am doing wrong, which would be highly appreciated.
I couldn't post the whole Template in one post, so I'm posting the relevant portion and attaching the complete template.
So I wanted to create a custom scenario to be executed after
<Scenario Id="ReportCall">by skipping the ReportCall scenario if
[Agent]=="8001"and run
<Scenario Id="ReportSystemCall">This second scenario should report any call answered by the IVR as missed, but the problem is currently an inbound call whether answered by the IVR or another extension will report the call twice in the CRM:
[DateTime]: Missed call from [Number] [Name] to [Agent] [AgentEmail][DateTime]: Answered incoming call from [Number] [Name] to [Agent] [AgentEmail] ([Duration])So, I was wondering if someone was willing to take a look at my template and tell me what I am doing wrong, which would be highly appreciated.
I couldn't post the whole Template in one post, so I'm posting the relevant portion and attaching the complete template.
XML:
<Scenario Id="ReportCall">
<Request SkipIf="[ReportCallEnabled]!=True||[IIf([EntityId]=="",[Agent]=="8001",False)]==True" Url="https://[Domain].myfreshworks.com/crm/sales/api/phone_calls" RequestType="Post" RequestEncoding="Json" ResponseType="Json">
<Headers>
<Value Key="Authorization">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="phone_call">
<Value Key="call_direction" If="[CallType]==Inbound">true</Value>
<Value Key="call_direction" If="[CallType]==Missed">true</Value>
<Value Key="call_direction" If="[CallType]==Outbound">false</Value>
<Value Key="call_direction" If="[CallType]==Notanswered">false</Value>
<Value Key="targetable_type">[EntityType]</Value>
<Object Key="targetable">
<Value Key="id">[EntityId]</Value>
</Object>
<Object Key="note">
<Value Key="description" Passes="2" If="[CallType]==Inbound">[[InboundCallText]]</Value>
<Value Key="description" Passes="2" If="[CallType]==Missed">[[MissedCallText]]</Value>
<Value Key="description" Passes="2" If="[CallType]==Outbound">[[OutboundCallText]]</Value>
<Value Key="description" Passes="2" If="[CallType]==Notanswered">[[NotAnsweredOutboundCallText]]</Value>
</Object>
</Object>
</PostValues>
</Request>
<Outputs Next="ReportSystemCall" AllowEmpty="true" />
</Scenario>
<Scenario Id="ReportSystemCall">
<Request SkipIf="[ReportCallEnabled]!=True||[IIf([EntityId]=="",[Agent]!=="8001",False)]==True" Url="https://[Domain].myfreshworks.com/crm/sales/api/phone_calls" RequestType="Post" RequestEncoding="Json" ResponseType="Json" >
<Headers>
<Value Key="Authorization">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="phone_call">
<Value Key="call_direction" If="[CallType]==Inbound">true</Value>
<Value Key="targetable_type">[EntityType]</Value>
<Object Key="targetable">
<Value Key="id">[EntityId]</Value>
</Object>
<Object Key="note">
<Value Key="description" Passes="2" If="[CallType]==Inbound">[[MissedCallText]]</Value>
</Object>
</Object>
</PostValues>
</Request>
</Scenario>
Attachments
Last edited: