Drupal CRM Integrations

Drupal 8 Integrations with 3rd Party Services

Quicklinks: Project Brief, Solutions, How we did it

Our latest website we built in Drupal 8 needed a custom integration with a 3rd party job management website. We were supposed to display all company job positions by department.
This website gave us two options for integration, an iframe and a RSS feed.

The RSS feed's format was something like this:

<entry> <title>IL North</title> <link rel="alternate" href="https://www.upward.ro/careers.XX?gnk=job&amp;gni=1a7885a864d9f8980164dbe77cba34d0" /> <category term="Field Services" /> <author> <name>United States Columbus OH 45502</name> </author> <id>1a7885a864d9f8980164dbe77cba34d0</id> <updated>2018-07-27T13:23:39Z</updated> <published>2018-07-27T13:22:18Z</published> <summary type="html">&lt;div&gt;Job details I&amp;nbsp;&lt;/div&gt;</summary> <upward:jobId>100</upward:jobId> <upward:openings>1</upward:openings> <upward:department>Department 1</upward:department> <upward:location>Columbus</upward:location> <upward:priority>Normal</upward:priority> <upward:country>United States</upward:country> <upward:state>OH</upward:state> <upward:postal_code>60007</upward:postal_code> </entry>

Solutions

The iframe solution would have been the easier and fast route that we could have taken, but it would limit the quality of the page were we're going to display the job postings, lowering the overall design of the page and decreasing the chances of good potential candidates to find the jobs our client had to offer.

We were left with only viable option, to read the RSS feed

The inital plan was simple. We were going to use the Aggregator Drupal 8 module that comes out of the box, import the data, cache it for better webpage delivery performance and then display the data in the manner our design team invisioned it.

We were going to set up the feed, use the Drupal's cron job to import it each hour to make sure we have always the latest data, then build a custom block to display the custom html code.

Unfortunatelly this idea did not work because, the aggregator module only imports the main rss field values like Author, Title, Link, Description, Timestamp and GUID. We had no chance of grouping the jobs by department.

The Breakthrough

We hoped to not have to use any contributed Drupal 8 modules, but in this case, it was time to give the famous Drupal 7 Feeds module a chance. We created a content type that would hold all the data needed for a single job position, we created the feed type and then we hit another bump in the road. We couldn't map the <upward:department> to the department field in our newly added content type.

Reading through the Drupal Feed module we realised we could build a custom feed parser and a Zend extension where we can actually extract the data we need. A custom module, few more lines of code and the data was imported. Success. From now on, no RSS feed will be a challenge for us.

If you're in a need for a custom CRM integration with a Drupal 8 website, don't hesitate to contact us