This is the third post in a four part series of posts that explain how users can integrate with and extend Salesforce using itDuzzit. Previously, we looked at using pre-built Salesforce duzzits. Now we’ll look at how you can create custom Salesforce integrations using pre-built Salesforce duzzits.
In this post, let’s create a duzzit that retrieves leads created today, and inserts lead data into a google spreadsheet. To get started, we’ll click “Create a Duzzit”:
We’ll just create a blank duzzit, so click “Next”:
Let’s name the duzzit “Salesforce Lead to Google Spreadsheet”, and create it:
Now we’ll edit the new duzzit. In the first step, we’ll click on “(add a do)”, which allows us to choose from a large selection of possible actions:
Since we want to get Salesforce leads, we’ll click on Salesforce, and then scroll down to choose “Salesforce Lookup Leads”. This is the same lead lookup duzzit that we ran directly in the previous post, but in this case, we’re having our custom duzzit run it. Now we need to configure how it will be run:
For the purposes of this example, we only care about leads that have been created today. As you may recall, the “Salesforce Lookup Leads” duzzit takes a date string formatted as yyyy-mm-dd (e.g. 2011-10-24). For convenience, we can click on “select value” next to the “created after” input, and use the value picker to select an appropriate date value:
There are a lot of date value choices, so we’ll have to scroll down a fairly far to get to the formatted date section:
We’ll select the appropriate format. The “created after” input now is set:
Now we’ll save the configuration by clicking on “accept”. The outputs from the “Salesforce Lookup Leads” duzzit are now displayed as inputs on the left”:
In the next few steps, we’ll be using duzzits that create and insert data into a Google spreadsheet. In order to do this, you’ll need to have a Google account and will need to add authentication to Google spreadsheets for your itDuzzit account. First, let’s call a duzzit to create a spreadsheet. We’ll do this by dropping a “Do” into the step, clicking on “Google”, and choosing the “Create New Spreadsheet” duzzit:
Here we’ve named the new spreadsheet “Leads”, and have indicated the columns that will be created in the spreadsheet.
Next, we’ll add a Loop step (dragging a loop from the “more…” menu):
We’ll loop through leads. To configure this, drag the “leads” input (under SalesforceLeads on the left) onto (select value). Now the loop looks like this:
Within the loop, we’ll add a step (drag a step into the loop), and add a “Do” within the step. For this “Do”, we’ll select the “Google Spreadsheets – Add Row” duzzit:
In this example, we’ve filled in the name of the spreadsheet, the key for the spreadsheet (which was returned when the spreadsheet was created), and column names / values for first name, last name, and title.
Now let’s run the duzzit. (From the edit screen, clicking on “Do It” brings up the duzzit run screen, and here you can click on “Do It Now”). If everything has been configured correctly, you should now have a Google spreadsheet named leads that looks something like this:
This example just scratches the surface of what can be done to quickly connect Salesforce with virtually any other application that provides web service APIs.
In the next post, we’ll look at how to create connectors for Salesforce objects (which you’ll need to do if you want to work with custom objects), and how to use SOQL within itDuzzit.