<?xml version="1.0"?>
<Crm xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" Country="US" Name="Freshworks CRM" Version="2" SupportsEmojis="false">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="16" />
<Parameters>
<Parameter Name="Domain" Type="String" Parent="General Configuration" Editor="String" Title="Domain Part:" />
<Parameter Name="ApiKey" Type="String" Parent="General Configuration" Editor="String" Title="API Key:" />
<Parameter Name="LookupOrder" Type="List" Parent="General Configuration" Editor="String" Title="Contact Lookup Order:" Default="Contacts/Accounts" ListValues="Contacts/Accounts,Accounts/Contacts" />
<Parameter Name="ReportCallEnabled" Type="Boolean" Editor="String" Title="Enable Call Journaling" Default="False" />
<Parameter Name="InboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Inbound Call:" Default="[DateTime]: Answered incoming call from [Number] [Name] to [Agent] ([Duration])" />
<Parameter Name="MissedCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Missed Call:" Default="[DateTime]: Missed call from [Number] [Name] to [Agent]" />
<Parameter Name="OutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Answered Outbound Call:" Default="[DateTime]: Answered outgoing call from [Agent] to [Number] [Name] ([Duration])" />
<Parameter Name="NotAnsweredOutboundCallText" Type="String" Parent="ReportCallEnabled" Editor="String" Title="Unanswered Outbound Call:" Default="[DateTime]: Unanswered outgoing call from [Agent] to [Number] [[Name]" />
<Parameter Name="ReportChatEnabled" Type="Boolean" Editor="String" Title="Enable Chat Journaling" Default="False" />
<Parameter Name="ChatSubject" Type="String" Parent="ReportChatEnabled" Editor="String" Title="Chat Subject:" Default="3CX PhoneSystem Chat Session" />
<Parameter Name="CreateContactEnabled" Type="Boolean" Editor="String" Title="Enable Contact Creation" Default="False" />
<Parameter Name="CreateOnCallDirection" Type="List" Parent="CreateContactEnabled" Editor="String" Title="Create Contacts on Call Direction:" Default="Inbound" ListValues="Inbound,Inbound/Outbound" />
<Parameter Name="CreateContactFirstName" Type="String" Parent="CreateContactEnabled" Editor="String" Title="New Contact First Name:" Default="New" />
<Parameter Name="CreateContactLastName" Type="String" Parent="CreateContactEnabled" Editor="String" Title="New Contact Last Name:" Default="3CX Contact [Number]" />
</Parameters>
<Authentication Type="No" />
<Scenarios>
<Scenario Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]>0,True,False)]" Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Number]&f=work_number&entities=contact&include=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contacts.contacts.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactId" Path="contacts.contacts.id">
<Filter />
</Variable>
<Variable Name="FirstName">contacts.contacts.first_name<Filter /></Variable>
<Variable Name="LastName">contacts.contacts.last_name<Filter /></Variable>
<Variable Name="CompanyName">contacts.sales_accounts.name<Filter /></Variable>
<Variable Name="PhoneBusiness">contacts.contacts.work_number<Filter /></Variable>
<Variable Name="PhoneMobile">contacts.contacts.mobile_number<Filter /></Variable>
<Variable Name="Email">contacts.contacts.email<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/contacts/[ContactId]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="Email" Passes="0" Value="" />
<Output Type="EntityType" Passes="0" Value="contact" />
<Output Type="EntityId" Passes="0" Value="[ContactId]" />
</Outputs>
</Scenario>
<Scenario Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]>0,True,False)]" Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Number]&f=mobile_number&entities=contact&include=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contacts.contacts.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactId" Path="contacts.contacts.id">
<Filter />
</Variable>
<Variable Name="FirstName">contacts.contacts.first_name<Filter /></Variable>
<Variable Name="LastName">contacts.contacts.last_name<Filter /></Variable>
<Variable Name="CompanyName">contacts.sales_accounts.name<Filter /></Variable>
<Variable Name="PhoneBusiness">contacts.contacts.work_number<Filter /></Variable>
<Variable Name="PhoneMobile">contacts.contacts.mobile_number<Filter /></Variable>
<Variable Name="Email">contacts.contacts.email<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/contacts/[ContactId]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="EntityType" Passes="0" Value="contact" />
<Output Type="EntityId" Passes="0" Value="[ContactId]" />
</Outputs>
</Scenario>
<Scenario Type="REST" EntityId="Accounts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]>0,True,False)]" Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Number]&f=phone&entities=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">sales_accounts.sales_accounts.id</Rule>
</Rules>
<Variables>
<Variable Name="AccountId" Path="sales_accounts.sales_accounts.id">
<Filter />
</Variable>
<Variable Name="CompanyName">sales_accounts.sales_accounts.name<Filter /></Variable>
<Variable Name="PhoneBusiness">sales_accounts.sales_accounts.phone<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/accounts/[AccountId]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="EntityType" Passes="0" Value="salesAccount" />
<Output Type="EntityId" Passes="0" Value="[AccountId]" />
</Outputs>
</Scenario>
<Scenario Id="LookupByEmail_Contacts" Type="REST" EntityId="Contacts" EntityOrder="[LookupOrder]">
<Request SkipIf="[IIf([FoundRecordCount]>0,True,False)]" Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Email]&f=email&entities=contact&include=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contacts.contacts.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactId" Path="contacts.contacts.id">
<Filter />
</Variable>
<Variable Name="FirstName">contacts.contacts.first_name<Filter /></Variable>
<Variable Name="LastName">contacts.contacts.last_name<Filter /></Variable>
<Variable Name="CompanyName">contacts.sales_accounts.name<Filter /></Variable>
<Variable Name="PhoneBusiness">contacts.contacts.work_number<Filter /></Variable>
<Variable Name="PhoneMobile">contacts.contacts.mobile_number<Filter /></Variable>
<Variable Name="Email">contacts.contacts.email<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/contacts/[ContactId]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="PhoneBusiness" Passes="0" Value="[PhoneBusiness]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="EntityType" Passes="0" Value="contact" />
<Output Type="EntityId" Passes="0" Value="[ContactId]" />
</Outputs>
</Scenario>
<Scenario Id="ReportCall" Type="REST">
<Request SkipIf="[ReportCallEnabled]!=True||[EntityId]==""" Url="https://[Domain].myfreshworks.com/crm/sales/api/phone_calls" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="phone_call">
<Value Key="call_direction" If="[CallType]==Inbound" Passes="0" Type="String">true</Value>
<Value Key="call_direction" If="[CallType]==Missed" Passes="0" Type="String">true</Value>
<Value Key="call_direction" If="[CallType]==Outbound" Passes="0" Type="String">false</Value>
<Value Key="call_direction" If="[CallType]==Notanswered" Passes="0" Type="String">false</Value>
<Value Key="targetable_type" Passes="0" Type="String">[EntityType]</Value>
<Object Key="targetable">
<Value Key="id" Passes="0" Type="String">[EntityId]</Value>
</Object>
<Object Key="note">
<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>
</Object>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
<Scenario Id="ReportChat" Type="REST">
<Request SkipIf="[ReportChatEnabled]!=True" Url="https://[Domain].myfreshworks.com/crm/sales/api/notes" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="note">
<Value Key="description" Passes="2" Type="String">[[ChatSubject]]
[[ChatEndTimeLocal].ToString("yyyy-MM-dd HH:mm:ss")]
[[ChatMessages].Replace("\","")]</Value>
<Value Key="targetable_type" Passes="0" Type="String">[IIf([EntityType]==contact,Contact,SalesAccount)]</Value>
<Value Key="targetable_id" Passes="0" Type="String">[EntityId]</Value>
</Object>
</PostValues>
</Request>
<Variables />
<Outputs AllowEmpty="false" />
</Scenario>
<Scenario Id="CreateContactRecord" Type="REST">
<Request SkipIf="[CreateContactEnabled]!=True||[IIf([CreateOnCallDirection]==Inbound,[CallDirection]!=Inbound,False)]==True" Url="https://[Domain].myfreshworks.com/crm/sales/api/contacts" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="contact">
<Value Key="first_name" Passes="2" Type="String">[[CreateContactFirstName]]</Value>
<Value Key="last_name" Passes="2" Type="String">[[CreateContactLastName]]</Value>
<Value Key="mobile_number" Passes="1" Type="String">[Number]</Value>
</Object>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">*.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactId">contact.id<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/contacts/[ContactId]" />
<Output Type="FirstName" Passes="2" Value="[[CreateContactFirstName]]" />
<Output Type="LastName" Passes="2" Value="[[CreateContactLastName]]" />
<Output Type="PhoneBusiness" Passes="0" Value="[Number]" />
<Output Type="EntityType" Passes="0" Value="contact" />
<Output Type="EntityId" Passes="0" Value="[ContactId]" />
</Outputs>
</Scenario>
<Scenario Id="CreateContactRecordFromClient" Type="REST">
<Request SkipIf="[CreateContactEnabled]!=True" Url="https://[Domain].myfreshworks.com/crm/sales/api/contacts" MessagePasses="0" RequestEncoding="Json" RequestType="Post" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
<PostValues>
<Object Key="contact">
<Value Key="first_name" Passes="2" Type="String">[FirstName]</Value>
<Value Key="last_name" Passes="2" Type="String">[LastName]</Value>
<Value Key="email" If="[Email]!=""" Passes="1" Type="String">[Email]</Value>
<Value Key="mobile_number" If="[Number]!=""" Passes="1" Type="String">[Number]</Value>
</Object>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">*.id</Rule>
</Rules>
<Variables>
<Variable Name="ContactId">contact.id<Filter /></Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactUrl" Passes="0" Value="https://[Domain].myfreshworks.com/crm/sales/contacts/[ContactId]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneBusiness" Passes="0" Value="[Number]" />
<Output Type="EntityType" Passes="0" Value="contact" />
<Output Type="EntityId" Passes="0" Value="[ContactId]" />
</Outputs>
</Scenario>
<Scenario Id="LookupFromCFD_Contacts_LookupNumber" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Number]&f=mobile_number&entities=contact&include=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contacts.contacts.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Contacts_LookupID" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/contacts/[EntityID]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contact.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Contacts_LookupFreeQuery" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Query]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">contacts.contacts.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Accounts_LookupNumber" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Number]&f=phone&entities=sales_account" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">sales_accounts.sales_accounts.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Accounts_LookupID" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/sales_accounts/[EntityID]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">sales_account.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
<Scenario Id="LookupFromCFD_Accounts_LookupFreeQuery" Type="REST">
<Request Url="https://[Domain].myfreshworks.com/crm/sales/api/lookup?q=[Query]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json">
<Headers>
<Value Key="Authorization" Passes="0" Type="String">Token token=[ApiKey]</Value>
</Headers>
</Request>
<Rules>
<Rule Type="Any" Ethalon="">sales_accounts.sales_accounts.id</Rule>
</Rules>
<Variables />
<Outputs AllowEmpty="true" />
</Scenario>
</Scenarios>
</Crm>