Overview
This document refers to our salesforce Case Creation and Lead Creation addon (Allow staff users to create leads and cases from discussions and comments.). It does not refer to Salesforce OAuth2 SSO functionality.
Requirements
You must have SSL enabled on your domain. (Your forum must be served over HTTPS).
Features
This addon allows users that have the Staff.Allow
permission to do the following:
- Link your Salesforce account to your Vanilla user profile.
- Create Salesforce cases and leads from Vanilla discussions (per discussion, not per comment).
- Salesforce cases and leads appear as “attachments” on your Vanilla discussion for authorized users.
- View Salesforce leads from Vanilla user profiles.
- Sync Vanilla users with Salesforce contacts when a user edits their profile or registers.
- Visualize a snapshot of their "Open Cases" on Vanilla profile pages (available only with individual connections).
The Vanilla administrator may alternatively setup a global Salesforce connection rather than using individual connections.
We also offer single sign-on from Salesforce.
Setup
On Salesforce: Create & Configure Application
- Log into your Salesforce Account
- Create new Connected App in Salesforce.
- Platform Tools → Apps → App Manager → New Connected Apps
- Fill the required fields: Connected App Name, API Name, Contact Email.
- Enable OAuth Settings.
- Set a Callback URL by appending
/profile/salesforceconnect
to the end of your forum’s URL. - Add to Selected OAuth Scopes:
- Full access (full)
- Perform requests on your behalf at any time (refresh_token, offline_access)
- Save.
On Vanilla: Enable & Configure Addon
- Log into your Vanilla forum.
- Dashboard → Addons, and click the Salesforce addon’s settings icon.
- Fill out ApplicationID (Consumer Key) and Secret (Consumer Secret) as below
- Fill out Authentication URL (usually the default)
- If you plan to sync Users to Contacts, click Enable Global Login button
- Click "Sync users with SalesForce contacts?" toggle
- Click Save
- Click Connect for Global Login
Where to find your ApplicationID and Secret in Salesforce?
In the app creation section mentioned under API you will see Consumer Key (which is the ApplicationID) and Consumer Secret (which is the Secret)
Connect your forum to Salesforce
There are two ways to connect your forum to Salesforce.
- Global Connection: if you want any agent on your forum to be able to create Leads and Cases using a universal "forum" Salesforce user, follow the Global Connection instructions.
- Individual Connections: agents who have users on Salesforce can connect and create cases and leads as themselves from the forum. Follow the Individual Connection instructions.
Global Connection
- As an Administrator, log into the Vanilla dashboard.
- Go to the Salesforce Addon.
- Next to Global Login click on Connect.
- You will be brought to Salesforce and ask to login.
Individual Connections
- Login to Vanilla.
- Go to your profile page.
- Edit your profile.
- Click on the Social section. (/profile/connections)
- Click “Connect” on Salesforce.
- Follow the instructions from there.
Send Profile Extender Fields to Salesforce
To send custom fields over to SalesForce make sure the SalesForceID
field on Vanilla's "Profile Fields" settings is set:
For "Contact Standard Fields" it should match "Field Name" found in your Salesforce.
Would be as below in Vanilla's Profile Field Extender
For "Contact Custom Fields" it should match "API Name" found in your Salesforce.
Would be as below in Vanilla's Profile Field Extender
Create Cases
Users who have Moderation privileges (Garden.Staff.Allow
) can click on the cog next to a discussion or comment and select "Salesforce - Create Case" to create a case from the content of the post. If the author of the post's email address does not match the email address of any user already stored as contacts in Salesforce, a contact will be created as well.
The data sent automatically from the forum to Salesforce during case creation are:
-
ContactId
: This ID is retrieved from Salesforce via an API query based on the author's email address. If there is no contact for this email address, one is created. -
Status
: The status pick-list values are retrieved from Salesforce via API. -
Origin
: This is set to 'Vanilla'. It can be manually changed in the forum config (Salesforce.OriginValue
, ask your Customer Success Manager). -
Priorit
: The priority pick-list values are retrieved from Salesforce via API. -
Subject
: Defaults to the title on the discussion. Description
: Defaults to the body of the discussion or comment.
Data that the moderator can add to complete the Salesforce record by filling in the Case Creation Form:
-
FirstName
- Vanilla doesn't store First Name or Last Name values so these have to be added by the Moderator. -
FirstName
The payload of the API call will look like this:
{
"ContactId": "115C3Ct7QAF",
"Description": "Charlie Bucket is a poor boy who lives near the Wonka Candy Company. The company's owner,",
"Origin": "Vanilla",
"Priority": "Medium",
"Status": "New",
"Subject": "I have a golden ticket."
}
When the Case has been successfully created, the post where it was done will display this to moderators only:
Create Leads
Users who have Moderation privileges (Garden.Staff.Allow
) can click on the cog next to a discussion or comment and select "Salesforce - Add Lead" to create a lead from the author of the post. If the author of the post's email address does not match the email address of any user already stored as contacts in Salesforce, a contact will be created as well. If the user's email matches the email of an existing Lead, the form will not render and it will display a "This Lead already exists" message.
The data sent automatically from the forum to Salesforce during case creation are:
-
ContactId
: This ID is retrieved from Salesforce via an API query based on the author's email address. If there is no contact for this email address, one is created. Email
: The email of the author of the comment or discussion. - 'Status': (Salesforce
Status
) The status pick-list values are retrieved from Salesforce via API. -
LeadSource
: This is set to 'Vanilla'. It can be manually changed in the forum config (Salesforce.LeadSourceValue
, ask your Customer Success Manager). Description
: The body of the text of the Discussion or Comment.
Data that the moderator can add to complete the Salesforce record by filling in the Case Creation Form:
-
FirstName
-
LastName
-
Company
-
Title
The payload of the API call will look like this:
{
"Company": "Wonka Candy Company",
"Description": "I have a golden ticket.",
"Email": "willy@wonkafactory.com",
"FirstName": "Willy",
"LastName": "Wonka",
"LeadSource": "Vanilla",
"Status": "Working - Contacted",
"Title": "President"
}
When the Lead has been successfully created, the post where it was done will display this to moderators only:
View Open Cases
Users (Agents) who have connected their Vanilla profiles to their SFDC accounts can view their Open Cases directly from their Vanilla profile. Each case can be opened in Salesforce to view more details.
To enable this feature just toggle option "Display Open Cases in Profile Page?" on the Salesforce settings page on the dashboard.
Troubleshooting
I can’t link my account.
If you get stuck on a page that says “error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration”,
make sure that the URL you are on when you are in the social section of your profile matches the Callback URL that you set in the configuration.
Example: If the URL when you are on in your profile’s social section is https://forum.example.com/somedirectory/profile/connections
, you should have https://forum.example.com/somedirectory/profile/salesforceconnect
in your configuration.