- Joined
- Nov 29, 2023
- Messages
- 2
- Reaction score
- 4
Hello,
I am trying to display the contact details and a URL to our custom CRM when our users receive a call from a contact.
This was working fine with version 18. We are now using version 20 Update 8.
On the client side, we activated the CRM integration using the server-side configuration.
The workflow is working correctly when using the test button.
Each time a client calls, our CRM receives a contact lookup request and responds successfully.
Here is the XML configuration file:
<?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="HAPY OAuth2 CRM" Version="1" SupportsEmojis="true">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="1" />
<Parameters>
<Parameter Name="ClientId" Type="String" Parent="General Configuration" Editor="String" Title="Client ID:" />
<Parameter Name="ClientSecret" Type="String" Parent="General Configuration" Editor="String" Title="Client Secret:" />
<Parameter Name="RefreshToken" Type="OAuth" Parent="General Configuration" Editor="String" Title="Refresh Token:" RequestUrl="https://our.crm.fr/oauth/authorize" RequestUrlParameters="response_type=code&client_id=[ClientId]&redirect_uri=[RedirectUri]&state=[State]&scope=search-contacts" ResponseScenario="OAuthGetRefreshToken" />
</Parameters>
<Authentication Type="Scenario">
<Value>Auth</Value>
</Authentication>
<Scenarios>
<Scenario Id="Auth" Type="REST">
<Request Url="https://our.crm.fr/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="refresh_token" Passes="0" Type="String">[RefreshToken]</Value>
<Value Key="grant_type" Passes="0" Type="String">refresh_token</Value>
<Value Key="client_id" Passes="0" Type="String">[ClientId]</Value>
<Value Key="client_secret" Passes="0" Type="String">[ClientSecret]</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">access_token</Rule>
</Rules>
<Variables>
<Variable Name="AccessToken" Path="access_token">
<Filter />
</Variable>
<Variable Name="ExpiresIn" Path="expires_in">
<Filter />
</Variable>
<Variable Name="TmpRefreshToken" Path="refresh_token" >
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="HeaderName" Passes="0" Value="Authorization" />
<Output Type="HeaderValue" Passes="0" Value="Bearer [AccessToken]" />
<Output Type="BearerExpiration" Passes="0" Value="[ExpiresIn]" />
<Output Type="RefreshToken" Passes="0" Value="[TmpRefreshToken]" />
</Outputs>
</Scenario>
<Scenario Id="OAuthGetRefreshToken" Type="REST">
<Request Url="https://our.crm.fr/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="code" Passes="0" Type="String">
I am trying to display the contact details and a URL to our custom CRM when our users receive a call from a contact.
This was working fine with version 18. We are now using version 20 Update 8.
On the client side, we activated the CRM integration using the server-side configuration.
The workflow is working correctly when using the test button.
Each time a client calls, our CRM receives a contact lookup request and responds successfully.
Here is the XML configuration file:
<?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="HAPY OAuth2 CRM" Version="1" SupportsEmojis="true">
<Number Prefix="AsIs" MaxLength="[MaxLength]" />
<Connection MaxConcurrentRequests="1" />
<Parameters>
<Parameter Name="ClientId" Type="String" Parent="General Configuration" Editor="String" Title="Client ID:" />
<Parameter Name="ClientSecret" Type="String" Parent="General Configuration" Editor="String" Title="Client Secret:" />
<Parameter Name="RefreshToken" Type="OAuth" Parent="General Configuration" Editor="String" Title="Refresh Token:" RequestUrl="https://our.crm.fr/oauth/authorize" RequestUrlParameters="response_type=code&client_id=[ClientId]&redirect_uri=[RedirectUri]&state=[State]&scope=search-contacts" ResponseScenario="OAuthGetRefreshToken" />
</Parameters>
<Authentication Type="Scenario">
<Value>Auth</Value>
</Authentication>
<Scenarios>
<Scenario Id="Auth" Type="REST">
<Request Url="https://our.crm.fr/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="refresh_token" Passes="0" Type="String">[RefreshToken]</Value>
<Value Key="grant_type" Passes="0" Type="String">refresh_token</Value>
<Value Key="client_id" Passes="0" Type="String">[ClientId]</Value>
<Value Key="client_secret" Passes="0" Type="String">[ClientSecret]</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">access_token</Rule>
</Rules>
<Variables>
<Variable Name="AccessToken" Path="access_token">
<Filter />
</Variable>
<Variable Name="ExpiresIn" Path="expires_in">
<Filter />
</Variable>
<Variable Name="TmpRefreshToken" Path="refresh_token" >
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="HeaderName" Passes="0" Value="Authorization" />
<Output Type="HeaderValue" Passes="0" Value="Bearer [AccessToken]" />
<Output Type="BearerExpiration" Passes="0" Value="[ExpiresIn]" />
<Output Type="RefreshToken" Passes="0" Value="[TmpRefreshToken]" />
</Outputs>
</Scenario>
<Scenario Id="OAuthGetRefreshToken" Type="REST">
<Request Url="https://our.crm.fr/oauth/token" MessagePasses="0" RequestContentType="application/x-www-form-urlencoded" RequestEncoding="UrlEncoded" RequestType="Post" ResponseType="Json">
<PostValues>
<Value Key="code" Passes="0" Type="String">
Code:
</Value>
<Value Key="grant_type" Passes="0" Type="String">authorization_code</Value>
<Value Key="client_id" Passes="0" Type="String">[ClientId]</Value>
<Value Key="client_secret" Passes="0" Type="String">[ClientSecret]</Value>
<Value Key="redirect_uri" Passes="0" Type="String">[RedirectUri]</Value>
<Value Key="state" Passes="0" Type="String">[state]</Value>
<Value Key="scope" Passes="0" Type="String">search-contacts</Value>
</PostValues>
</Request>
<Rules>
<Rule Type="Any">refresh_token</Rule>
</Rules>
<Variables>
<Variable Name="Result" Path="refresh_token">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="Result" Passes="0" Value="[Result]" />
</Outputs>
</Scenario>
<Scenario Id="" Type="REST">
<Request Url="[URL='https://our.crm.fr/api/search-contact?phone=%5bNumber%5d']https://our.crm.fr/api/search-contact?phone=[Number][/URL]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="company">
<Filter />
</Variable>
<Variable Name="Email" Path="email">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="phone">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="phone2">
<Filter />
</Variable>
<Variable Name="CustomValue" Path="type">
<Filter />
</Variable>
<Variable Name="ContactUrl" Path="url">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="PhoneMobile2" Passes="0" Value="[PhoneMobile2]" />
<Output Type="CustomValue" Passes="0" Value="[CustomValue]" />
<Output Type="ContactUrl" Passes="0" Value="[ContactUrl]" />
<Output Type="EntityId" Passes="0" Value="[ContactID]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
</Outputs>
</Scenario>
<Scenario Id="LookupByEmail" Type="REST">
<Request Url="[URL='https://our.crm.fr/api/search-contact?email=%5bEmail%5d']https://our.crm.fr/api/search-contact?email=[Email][/URL]" MessagePasses="0" RequestEncoding="UrlEncoded" RequestType="Get" ResponseType="Json" />
<Rules>
<Rule Type="Any">id</Rule>
</Rules>
<Variables>
<Variable Name="ContactID" Path="id">
<Filter />
</Variable>
<Variable Name="FirstName" Path="firstname">
<Filter />
</Variable>
<Variable Name="LastName" Path="lastname">
<Filter />
</Variable>
<Variable Name="CompanyName" Path="company">
<Filter />
</Variable>
<Variable Name="Email" Path="email">
<Filter />
</Variable>
<Variable Name="PhoneMobile" Path="phone">
<Filter />
</Variable>
<Variable Name="PhoneMobile2" Path="phone2">
<Filter />
</Variable>
<Variable Name="CustomValue" Path="type">
<Filter />
</Variable>
<Variable Name="ContactUrl" Path="url">
<Filter />
</Variable>
</Variables>
<Outputs AllowEmpty="false">
<Output Type="ContactID" Passes="0" Value="[ContactID]" />
<Output Type="FirstName" Passes="0" Value="[FirstName]" />
<Output Type="LastName" Passes="0" Value="[LastName]" />
<Output Type="CompanyName" Passes="0" Value="[CompanyName]" />
<Output Type="Email" Passes="0" Value="[Email]" />
<Output Type="PhoneMobile" Passes="0" Value="[PhoneMobile]" />
<Output Type="PhoneMobile2" Passes="0" Value="[PhoneMobile2]" />
<Output Type="CustomValue" Passes="0" Value="[CustomValue]" />
<Output Type="ContactUrl" Passes="0" Value="[ContactUrl]" />
<Output Type="EntityId" Passes="0" Value="[ContactID]" />
<Output Type="EntityType" Passes="0" Value="Contacts" />
</Outputs>
</Scenario>
</Scenarios>
</Crm>