Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Lawrence Drew
Lawrence Drew
5,233 Points

Linking Wordpress and Salesforce

Hi everyone

Real noob here! I tried searching for this, both on the Treehouse forums and elsewhere online, but was unable to find an answer I understood.

I've been tasked at work with exploring whether we can link our Wordpress site with data from Salesforce. The most likely use is for us to dynamically update a post with one or more data points, once these have been created in Salesforce. Once we have done this, we want to go further and create further posts based on the equivalent data points from a wider set of articles.

(To be clear, our first step will be to create a collection of articles about schools and include a set of data point within each of these that lists useful information like number of students, exam results, gender of students and so forth. This information may change once a year, so we will use data collection to create records in Salesforce- we have made the decision to keep all of our data in Salesforce as this data is likely to be required on several different websites.. We then want to be able to either automatically connect the Salesforce data to the specific data points in the article, and have e.g. the number of pupils in a school automatically updated, saving us having to manually edit hundreds of articles).

Firstly, is this possible? If so, what would I need to learn to be able to do this? (At present I am familiar with HTML and CSS. I am capable of very rough editing of PHP files, but little more). I am willing to learn, but at present am struggling to know what it is I should be learning! Alternatively, I imagine this may have been done before, and if so can anyone recommend a useful plugin or resource that would help?

I apologise if this is repeat info; again, I tried searching in multiple locations and couldn't find a useful answer to me, although I accept this may be due to my lack of knowledge!

Thanks

Mike

1 Answer

Bobby Verlaan
Bobby Verlaan
29,538 Points

Hi Mike, I'm not the expert in Salesforce either, but did some work with another programmer once and might give you some insight how to approach your problem.

You are mentioning you want keep data stored in Salesforce. In order to display data out of Salesforce to your website you need to know whether Salesforce enables you to programmatically take data out of Salesforce. Most services make this possible through an Application Programming Interface (in short API). It's like asking Salesforce a question and Salesforce will answer with a response. Fortunately, I know Salesforce has several API's you can use. See https://help.salesforce.com/HTViewHelpDoc?

Your first challenge probably lies in speaking the language to get the right information out of Salesforce. If you are trying to access private data, you should login programmatically to the service. After your login succeeds, you can ask questions in which Salesforce sends you a response with the requested data. This response can be used to display it on another website, e.g. a Wordpress website.

Skills you need to develop to tackle your challenge:

  • See what Salesforce API's you need to use to get the data you want (probably an API that sends a response in JSON)
  • Learn the Front-end developers track here at Treehouse (it gives you the basics of html, css and JavaScript, especially pay attention to the JavaScript part where they will be explaining accessing the Flickr API and how to parse JSON back to an usable JavaScript object)
  • Learn the PHP course on Treehouse in order to understand the language in which Wordpress is written
  • Learn the Wordpress plugin course on Treehouse in order to extend functionality of default Wordpress installations

It will be quite a lot learning, but I think you need all of this make your solution a reality. Hope this helps!