Extensions‎ > ‎

Salesforce

Getting started

This Add-on provides a 2 way integration between our modules and Sales Force. It can push data to Salesforce, such as leads, contacts or any other entity, and it can also query Salesforce using SOQL - which is an SQL-like query language provided by Salesforce. Once data is retrieved, it can be stored in tokens and used in other actions down the stack.

Salesforce's customer relationship management (CRM) service is broken down into several broad categories: Sales Cloud, Service Cloud, Data Cloud (including Jigsaw), Collaboration Cloud (including Chatter) and Custom Cloud (including Force.com). Salesforce users can configure their CRM application at the "platform" level. In the Salesforce system, there are tabs such as "Contacts", "Reports", "Accounts", etc. Each tab contains associated information. For example, "Contacts" has standard fields like First Name, Last Name, and Email. 

In addition to the web interface, Salesforce.com offers a SOAP Web service API that enables integration with other systems. Here is were you, the DNN admin come into play! Now users can add entities and run queries, not only at the "platform" level, but from DNN platform too! An administrator can add this extension in Action Form, set up a few things, and his DNN users are good to go! This is how Action From communicates with Salesforce.

Step 1 - Sign up for an account with Salesforce

There are a few steps one has to take before starting to set up Action Form. First thing to do would be to have an account on Salesforce, with access to the SOAP API. This seems to depend on which type of subscription you have with Salesforce. You can also start with a new developer account which gets access to the API implicitly. You can open such an account at developer.salesforce.com. Or, if you already have a Salesforce account login at login.salesforce.com.

Note that you will need to activate the account, by clicking on a link you should receive in an activation email for your free Developer Edition account. Once the account is active, you will need a security token.

Step 2 - Get a Security Token from Salesforce


To get the security token, you will have to 
reset the security token, which is not so intuitive to do. In the upper right corner: <Your User Name> > My Settings. Then, on the left side: My Settings > Personal > Reset security token. After resetting it, a new security token will be sent to the account's email. 


reset security token

Step 3 - Setup Action Form

Once you have the Salesforce username, password and security token, you can proceed to setup Action Form. The Salesforce integration is provided as an add-on that can be purchased from DNN Store. So you will need to already have Action Form on the server before installing the Salesforce add-on. You can install both packages from Host > Extensions.

In this guide we will create two simple forms: one to create a Lead and one to query some data from Salesforce.

Create a Lead form

Start by adding a new Action Form module to the desired page. At the initial configuration step, for demo purposes, we will choose a Blank Form. It creates an empty form so you build everything from scratch. For our example we will add three text boxes to collect the Last Name, the Email and the Company for the new Lead. Add these using the Add Field button in Action Form - Manage Screen. Also add a button to perform the desired action.

Note that different entities have different requirements in terms of required fields. Make sure to read the documentation.

Action Form Salesforce demo

Add two actions on the On Click handler: 
  • a Create an Salesforce Entity action, for actually creating the entity

create an salesforce entity

  • and a Display message action, for displaying the newly created entity's id and URL. You can pass these tokens for later use in other actions.

display message



Query Salesforce form

Start by adding a new Action Form module to the desired page. At the initial configuration step, for demo purposes, we will choose a Blank Form. It creates an empty form so you build everything from scratch. For our example we will need a button to perform the desired action. Add this using the Add Field button in Action Form - Manage Screen. 

SOQL is very similar to SQL. Make sure to read the documentation at http://www.salesforce.com/us/developer/docs/soql_sosl/index_Left.htm. The example below returns the Id and Phone of an Account for which we know the name.

SOQL query

Settings Reference

  • Salesforce Username
    Required. A valid Username, Password and Security Token must be passed to Salesforce in order to authenticate and establish a secure session.
  • Salesforce Password
    Required. A valid Username, Password and Security Token must be passed to Salesforce in order to authenticate and establish a secure session.
  • Salesforce Security Token
    Required. A valid Username, Password and Security Token must be passed to Salesforce in order to authenticate and establish a secure session.
  • Salesforce Entity Type
    The entity type intended to create. There is a dropdown list with the most common type entities, Lead, Case, Contact, Account, but you can always select a different entity by clicking on the Expr button at the end of the dropdown list, and entering manually your own type of entity.
    You can see 
    a list of standard objects and their standard fields in the Salesforce documentation.
  • Fields
    Select which data to pass to salesforce. Map Salesforce's Fields to Action Form Fields or Expressions. For example, map LastName to SomeFieldId01, FirstName to SomeFieldId02, etc. Note that some Salesforce Fields are mandatory! Read Salesforce's documentation on which fields are required!
    You can see a list of standard objects and their standard fields in the Salesforce documentation. Lookout for the required fields! Different object have different required fields.
  • Output Entity's ID Token Name
    Optionally provide a token name where to store the newly created Entity's ID. For example, store Entity's ID that is needed later in another action.
  • Output Entity's URL Token Name
    Optionally provide a token name where to store the newly created Entity's URL. For example, store Entity's URL that is needed later in another action, like redirect, etc.

  • SOQL Query
    Salesforce Object Query Language (SOQL) query to execute. Can contain My Tokens. For more info on SOQL, check Force.com SOQL Reference.

  • Extract Columns
    Optionally provide an association table to parse columns into context data. Can contain other context tokens, for example [Name], and My Tokens.

See it in action!

Check out the cool video below! :)

DNN - Sales Force Integration with Action Form