This was the question I asked when working on a recent project. I have come across Salesforce before and used a plugin to save leads from WordPress directly into Salesforce but this project needed to look into events, contact and opportunities too. So these all seem to be pretty standard CRM objects so there should be a plugin for these right. Well after searching around I simply couldn’t find anything that would do the job but knew that Salesforce has an extensive API and readily available php libraries so getting this info should be easy. So we would build a plugin for the project and as we have done before make a generic open source available for everyone to enjoy.
It all started well enough, we got the API details and php libraries set up and connected to Salesforce with relative ease. Next we created a lead function and that all worked fine. Next we started digging into the contacts, opportunities and events using the strangely bizarre SOSQL query language. This particular project involved searching for courses and events (course dates) in order to populate woo commerce products so site visitors could purchase places on them. The problem was however hard I looked the details I needed did not appear. At this point we sat down with the client and discovered all about Salesforce custom objects.
Penny dropped! Salesforce allows you to defined custom elements and relationships effectively building your own business structures on top of the core features that come out of the box – it makes sense of course. The result is that Salesforce becomes a powerful, flexible CRM but in order to get data in and out you need intimate knowledge of these custom elements. The API helps with this to some extent but allowing you to download a client wsdl definition file which is great it you like reading the matrix (which perversely I do!). The SOSQL query language relies on this wsdl to reveal these custom objects to the API. Of course this all means that you just can’t create a generic WordPress plugin because everyone uses it differently.
So we have to apologise if you came across this blog in the hope that it would answer your problems but don’t dispare because we can indeed read the matrix but we do also speak human and happy to help.