So in the last article, Customize Syncing Between Drupal Commerce and Salesforce – Part 1, we covered the initial checks to make sure we were targeting the right entities and also making sure they contain the right values before moving forward with our syncing to Salesforce. Now we can focus on the actual syncing with Salesforce.
Customize Syncing Between Drupal Commerce and Salesforce – Part 1
The Salesforce Suite module created to connect Drupal to Salesforce is an amazing tool and can help you get up and running with syncing your content right away. It allows you to create individual mappings between Drupal entities and Salesforce objects and have them triggered by CRUD and can be controlled using cron jobs.
Though the Salesforce Suite does not offer the ability to check for existing records along the way and often results in hundreds if not thousands of duplicates. This was a major issue for me since the site I am working with uses Commerce, Commerce Registration, and Entity Registration to allow customers to register and pay for events and courses. We needed this information to be sent to Salesforce and check along the way to see if the registrant(s) were new or if they already existed, and the same goes for their billing information.
But how? The Salesforce Suite only provides the ability of setting a single key field which limits your ability to find a match based on only 1 matching field. This can become a big issue since people share the same names or same email accounts, so you would want to take advantage of looking up records based on a series of criteria. So I was able to utilize the Salesforce API and the provided Salesforce Suite’s hooks to write the checks and take control of the entire import process myself. Note that the following code examples code probably be improved since I am fairly new to building custom modules in Drupal and also fairly new to PHP. Also the following is describing how to connect Commerce and Commerce Registration to Salesforce, so in your case you may need to skip some of this and move on to Part 2 if you are only looking for some simple examples of checking and pushing/updating records.
Living with an Apple Watch
When the Apple Watch was first introduced in 2014, I couldn’t help but feel overjoyed. I’ve always liked the idea of wearable tech after watching the show Continuum (If you haven’t seen it, bookmark this page, go watch all 3 seasons, and come back) where the main character, Kiera, has a body suite and head implant that give her almost superhuman abilities.
Of course I didn’t expect the Apple Watch to suddenly protect me from bullets and allow my eyes to scan the world around me like a thermal FLIR camera, but it was as close as I was going to get at this point in time…. [Read More]
Survive Google’s Mobile-Friendly Tester by checking Robots.txt
It’s been a couple days since “Mobilegeddon” was unleashed onto the world by Google. The search engine’s new mobile-friendly first algorithm looks at websites and if they are not mobile-friendly, they plummet in the search results on mobile devices. Surprisingly, or maybe not, a large percentage of top websites are not mobile friendly (up to 40% of Top Sites according to USA TODAY). This will result in a huge cost for companies to either adapt their current website to mobile or perform a complete rebuild. Of course as a web developer both full time and as a freelancer, I could not be happier 🙂 !
But that’s not what this post is about, this post is designated to those that have already made their website mobile-friendly, through responsive design (which should always be the way IMHO) or by creating a separate mobile site. You spent 10’s maybe 100’s of hours creating an amazing website that looks great no matter what device a user is using, yet when you test your website on Google’s Mobile Friendly Testing Tool your site suddenly comes up as Not Mobile-Friendly!
Making Your Website More Accessible
The web has revolutionized the way we find information. Because of this, it is important that the information be presented in such a way that anyone can access it – regardless of any disabilities they may have. This is where Web Content Accessibility becomes extremely important.
There is a lot to consider when dealing with accessibility on a website since not all visitors are created equal…. [Read More]