About Integrations

Today, building a website often includes integrating with a variety of third-party services ranging from external databases, CRMs, Ecommerce, Video Services, Analytics, to whatever else your project demands. While AgilityCMS (Content Manager) does have several built-in integrations such as Google Analytics, and YouTube, the true power is in the hands of you, the developer.

This article serves as a guide on how you can build integrations into your AgilityCMS instance and website.

Integration Points

There are two types of integrations:

  1. Content Manager Integrations - this includes developing custom fields connecting to data sources, and firing workflow events
  2. Website Integrations - typically includes custom development using .NET, HTML, and JavaScript

 

Content Manager Integrations

The Content Manager provides several different integration points:

  1. Custom Fields - Allows you to create your own Custom Field Type such as a dropdownlist that displays options from a third-party service. Custom Field Types are defined in JavaScript, HTML and CSS and registered within your CMS instance. They can be re-used across multiple content and module definitions. 
  2. Custom Events - Allows you to hook into CMS input form events such as onLoad, onBeforeSave, onAfterSave, onBeforePublish, onAfterPublish via JavaScript and provide custom validation. For example, validating content or inserting content in a third-party service.
  3. Webhooks - Webhooks are a critical part of Agility Ecommerce (an extension of AgilityCMS). Webhooks allow Ecommerce to notify other systems of updates to Customers, Orders, Shipment, Returns, and Subscriptions. This can be used to sync info from Ecommerce to services such as CRMs and Warehouse services.

 

Website Integrations

AgilityCMS is completely decoupled from your Website code base on ASP.NET MVC with only a single required dependency on Agility.Web (available on nuget). This means there's no limitations to what you can do in our MVC project. You can take advantage of wealth of .NET support for integrations. Want to connect to SalesForce? There's an app for that. Want to connect to Microsoft Dynamics? There's an app for that too.

A common use case is combining Content Manager and Website Integrations by building your own API to provide data to your custom input fields in AgilityCMS or to provide a validation hook that you want validate server-side and return a response to an AgilityCMS Custom Event.

Some Examples

Here's a few examples of some awesome integrations developers have come up with - just to get the juices flowing:

Custom Field for Selecting Database Records

A module has been developed that displays a listing of featured items that is sourced from an external database. The editor would like to be able to control exactly which of those items are displayed on the website.

A solution to this, was to create a Custom Field Type via JS that renders a "searchlistbox" (search based on input and select) that uses AJAX and CORS to return a list of results from that external database. Now editors, are actually selecting real records from their database, saving the ID of the record on save and then in the module code, a database query is executed to retrieve those details.

Validating Content 

A list of "Products" is maintained with AgilityCMS. Each product has a SKU field. The SKU field is used later to map and synchronize data with Microsoft Dynamics. It is imperative that the editor sets a valid SKU when they save a product in Agility.

A solution to this was to validate the SKU on the onBeforeSave event using the Custom Events JS API. A controller action result was setup on the website to accept a SKU parameter and query Dynamics to see if that SKU exists and is active. Then, in AgilityCMS every time a Product is saved, the onBeforeSave event is called which executes a JS function. Code was implemented in the function to call the Dynamics SKU validation controller action via AJAX and CORS and await a response. If the SKU was valid, the Save was allowed to continue. If it wasn't valid, the save would be cancelled and the user was prompted to enter a valid SKU.

Our Experiences

The following list represents just some of the services we've integrated with over the years:

  • YouTube
  • Vimeo
  • Google Analytics
  • Azure Application Insights
  • PayPal
  • Moneris
  • Stripe
  • SalesForce
  • Survey Monkey
  • Constant Contact
  • Mail Chimp
  • Google Site Search
  • Free-Find
  • Azure Cognitive Services
  • Swifttype
  • Microsoft Dynamics
  • NetSuite
  • SCI Warehousing
  • Smart Warehousing
  • Dare Marketing
  • Google Double-click for Publishers
  • Order Dynamics
  • Vista
  • Tessitura

Are you working on an integration and thinking about the best way to tackle it? We'd love to hear from you and offer some guidance. Please contact us and we'd be happy to help!

1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.