Community
Showing results for 
Search instead for 
Do you mean 
Reply

Webhooks not working

Accepted Solution Solved
Copper Contributor
Posts: 5
Country: Ukraine
Accepted Solution

Webhooks not working

I have register 4 webhooks for contact: create + update and opportunities: create + update. All hooks correctly displayed at /act.web.api/api/webhooks but there are no requests to registered urls. I found that necessary to install a notification service (act!-premium-web-administrators-guide.pdf  - page 15). Where can I get act.webhook.notification.exe? And with what tool can I generate Tenants?

 

 


Accepted Solutions
Solution
Accepted by topic author Vladimir
‎04-22-2019 12:34 AM
Employee
Posts: 109
Country: USA

Re: Webhooks not working

The webhooks notification service will install with Act! V21 or greater or you can run the API updater from V20 for any version of Act! back to V18.2.  The link can be found here the link below.

 

      https://www.act.com/download/download-act!-premium-v21

 

As far as the tenant question, the answer should be yes, but we have not tested that part yet.  It does request manual changes for now, but I think I see a few issues with the process now.  There is a tenants.config file that needs to be created, this file hold each tenants API configuration setting that is documented in the act!-premium-web-administrators-quide.pdf.  However, the problem that I see is that the path to the API web.config in this service seems to only hold only one API path.  I think I am going to have to add the web.config path to the tenants file as well.  You can manual configure the WebhooksDBConfigurationString for now until I fix that issue.

 

Steps:

In the webhooks notification service configuration file, modify this settings.

 

Just pick one of you tenants API:

<add key="FileAndPathToApiWebConfig" value="[path]\web.config" />
<add key="FileAndPathToActWebApiHostingExe" value="[path]\bin\act.web.api.hosting.exe" />

<add key="IsManualConfigure" value="true" />

<add key="Tenants" value="[path]\tenants.config" />     // create this tenants.config file as defined in the act!-premium-web-administrators-guide.pdf

 

When you start the service, the API's web.config file's connection string will automatically be created/modified  (WebhooksDBConnectionString) for the API defined (FileAndPathToApiWebConfig).  You will need to manual copy this connection string to all the other APIs.  FYI: Each time the service is started, it modifies the password for that connection string.  So if you stop/start the service you will need to modify all the API's (This is what I need to fix).  Other than that issue, it should work.

 

Let me get back to you on this when I get a working cloud deployment or multiple tenant configuration.

 

 

 

View solution in original post


All Replies
Solution
Accepted by topic author Vladimir
‎04-22-2019 12:34 AM
Employee
Posts: 109
Country: USA

Re: Webhooks not working

The webhooks notification service will install with Act! V21 or greater or you can run the API updater from V20 for any version of Act! back to V18.2.  The link can be found here the link below.

 

      https://www.act.com/download/download-act!-premium-v21

 

As far as the tenant question, the answer should be yes, but we have not tested that part yet.  It does request manual changes for now, but I think I see a few issues with the process now.  There is a tenants.config file that needs to be created, this file hold each tenants API configuration setting that is documented in the act!-premium-web-administrators-quide.pdf.  However, the problem that I see is that the path to the API web.config in this service seems to only hold only one API path.  I think I am going to have to add the web.config path to the tenants file as well.  You can manual configure the WebhooksDBConfigurationString for now until I fix that issue.

 

Steps:

In the webhooks notification service configuration file, modify this settings.

 

Just pick one of you tenants API:

<add key="FileAndPathToApiWebConfig" value="[path]\web.config" />
<add key="FileAndPathToActWebApiHostingExe" value="[path]\bin\act.web.api.hosting.exe" />

<add key="IsManualConfigure" value="true" />

<add key="Tenants" value="[path]\tenants.config" />     // create this tenants.config file as defined in the act!-premium-web-administrators-guide.pdf

 

When you start the service, the API's web.config file's connection string will automatically be created/modified  (WebhooksDBConnectionString) for the API defined (FileAndPathToApiWebConfig).  You will need to manual copy this connection string to all the other APIs.  FYI: Each time the service is started, it modifies the password for that connection string.  So if you stop/start the service you will need to modify all the API's (This is what I need to fix).  Other than that issue, it should work.

 

Let me get back to you on this when I get a working cloud deployment or multiple tenant configuration.

 

 

 

Employee
Posts: 109
Country: USA

Re: Webhooks not working

Correction to my Post:

 

When configuring for Cloud or multi-tenant configuration, you only need to modify these app settings:

 

    // create this tenants.config file as defined in the act!-premium-web-administrators-guide.pdf

<add key="IsManualConfigure" value="true" />
<add key="Tenants" value="[path]\tenants.config" />

When IsManualConfigure is set to true, the service will not auto-build the connection strings, so this will have to be done manually.

 

First, modify the "WebhooksDBConnectionString" connection string in the act.webhooks.notification.config.exe file.  You should only have to change the Server= and Password=.  You will need to create a SQL Server Login, doesn't matter what you call it, but I would recommend that you just use what's there already (ACTWEBHOOKS).  This login should have dbCreator and public server roles.

 

Now the hard part, copy the connection string and pasted it to every tenant's API.  Now when you start the service, it will create the webhook's registration database.  The server doesn't have to be on the [DBSERVER]\ACT7 instance, but it can.

 

 

 

<connectionStrings>
    <add name="WebhooksDBConnectionString" connectionString="Server=[databaseservername];Database=ActWebHooks;User Id=ACTWEBHOOKS;Password=[givenpassword];" providerName="System.Data.SqlClient" />
</connectionStrings>

 

 

 

Now the notification service will manage all the tenant's APIs.  There are some restrictions.  The notification service must exists on the same server as the API's.  If you have multiple servers, you would have to install one notification service for each server.  If that is the case, you would have have different database names for each server or a server for each database.

 

<connectionStrings>
    <add name="WebhooksDBConnectionString" connectionString="Server=localhost\ACT7;Database=MyServer_ActWebHooks;User Id=ACTWEBHOOKS;Password=;" providerName="System.Data.SqlClient" />
</connectionStrings>

That should do it.  Let me know if you have any issues.