The following blog was written by Drupal Association Premium Supporting Partner, Message Agency.

After months of work, hundreds of commits, and lots of new thinking, the Salesforce Suite for Drupal 8 is reaching maturity.  There is tremendous interest in these modules, and many enterprises are waiting for this milestone to integrate D8 sites with Salesforce. In an effort to accelerate refinement and adoption of this important contribution, the module’s developers are raising awareness about the release and asking the community to start downloading and contributing.

A few months ago at Drupalcon Baltimore, Message Agency announced a release candidate (8.x-3.0-rc1) for the Salesforce Suite in Drupal 8.  This collection of modules supports integration with Salesforce by mapping Drupal entities with standard or custom Salesforce objects and pushing Drupal data to Salesforce as well as pulling Salesforce data into Drupal.

Since then, we've continued to expand the Suite and build out critical features. We've also continued to groom the 8.x roadmap, solicit community participation through webinars, and build awareness about how to use the modules. With a solid foundation and full functionality, the Suite is beginning to gain traction and see increasing adoption as projects switch to Drupal 8.

What’s new in the Suite?

The modules are a complete rewrite of the Suite for Drupal 8, and they fully leverage Drupal core’s object-oriented code patterns.  Message Agency’s senior software engineer, Aaron Bauman, was the original architect of the Suite for 6.x in 2009 and has continued to support this important tool ever since. He took the lead in porting the modules for Drupal 8, based on feedback from the community, clients, and nearly a decade of experience integrating these two powerful platforms.

There is much to be excited about in this new version. There have been a number of updates from Drupal 7.x:

  • Queue on failure. There is now an attempt to push synchronization immediately on entity save and enqueue for asynchronous push only on failure. This feature idea is a great compromise between the previous binary sync/async decision point.
  • Test coverage.  Testing 3rd-party web services can be tricky, and requires careful planning and mocking. This Salesforce 8.x release includes test coverage for push and pull operations using mock REST features, allowing for proper regression testing and test-driven development.
  • Push queue overhaul, and cron-based push.  Drupal 7's asynchronous push left a lot to be desired. Lack of error handling made debugging and troubleshooting difficult to impossible. Lack of optimizations burned unnecessary API calls. Both of these limitations were imposed by Drupal Queue API's fundamental nature. In Drupal 7, our options for extending the Queue system were limited. In Drupal 8, we've implemented a Salesforce Push Queue service, building on Drupal core's overhauled Queue API. We've taken the opportunity to normalize queue items, optimize queue operations, and implement error handling and recovery.
  • Objectification of Salesforce resources. Moving in the direction of a proper REST PHP SDK, we now have proper classes for Query Result, SObject, Salesforce ID, various REST Responses, and others. This not only allows for simple type-hinting across other classes, but also gives developers consistent and reliable interfaces, and paves the way for even greater extensibility in the future.
  • Queue settings per mapping. The Suite now allows administrators to assign sync intervals per-mapping, instead of running all sync operations on every cron run. This feature idea will allow administrators to tweak their synchronizations according to business needs, without the need to implement extensive hook-based logic.

Several new features for Drupal 8 also have been developed:

  • Goodbye hooks, hello events.  Leveraging Salesforce.api.php, we mapped old hooks onto new events—a key advantage for folks already familiar with the 7.x version.
  • A new plugin system for mapping fields.  There has been a mapping UI overhaul.  Salesforce Mapping Fields now enjoy their own plugin system, allowing for maximum extensibility. For example, "Record Type" is now its own mapping field plugin type, rather than receiving special treatment in the push and pull systems.
  • Pluggable everything. including the REST Client itself, thanks to Drupal services and Dependency Injection.  
  • Examples module.  There is now a working examples module with an event subscriber, exported mapping config, and demonstration of using the  REST client to connect to an Apex endpoint.

The new version also builds in some important re-includes from 7.x - 2.x branch.

  • Mapped Objects are tied to Mappings
  • Custom push queue
  • Re-attempt on failure
  • Encryption support

What is the current status? And how can you help?

The Suite has advanced to 8.x-3.0-rc6 and is nearing a stable release.  It’s time to start downloading and using the modules to help us identify and smooth out the rough spots.

For a quick start overview, watch this Acquia webinar, delivered by Aaron Bauman on how to install and configure the Suite.

https://youtu.be/9tKrpxW1sMk

https://www.acquia.com/resources/webinars/how-use-salesforce-suite-drupal-8-quick-start-guide?r=735547932

Keep those issues coming in the queue!

The Heavy Lifting

This amount of work is never done alone.  By the numbers, so far:

  • 5 contributors including 2 Message Agency staff.  (Shout out to evanjenkins, bezhermoso, and gcb for their contributions.)
  • Merged 7 major branches.
  • More than 200 commits.
  • Nearly 400 hours logged across 5 Message Agency dev and PM staff, and 3 drupal.org users

Also, major thanks to Acquia's Drupal 8 Module Acceleration Program for connecting us with clients to fund and advance module development.