Demostack and Salesforce Integration Technical Guide
This guide is tailored for technical users to facilitate an in-depth understanding of the Demostack and Salesforce integration. It utilizes the "Connected App" framework from Salesforce, enabling efficient third-party authentication and data management.
Contents
- Integration Overview
- Connecting Demostack and Salesforce
2.1 Via Salesforce Administrator
2.2 Via Integration User
- Configuring Custom Fields
- Permission Overview
- Detailed Authentication Process
1. Integration Overview
The Demostack and Salesforce integration helps with translating data into business value.
By establishing a secure connection, it enhances data interchange, thereby expanding the capabilities of both platforms. This integration employs Salesforce's "Connected App" architecture to enable third-party authentication, streamlining the process of data access.
Data Flow and Usage
The integration is characterized by two primary stages:
Stage 1: Connecting Demostack & Salesforce
The user begins the process within the Demostack web application, setting up the integration via Salesforce's 'Connected App' feature. Upon Salesforce's approval, the secure connection is established, and the authentication tokens are encrypted and stored.
Stage 2: Data Flow From Demostack to Salesforce
The integration facilitates two main data flows:
- For Opportunity Engagement: When an opportunity is selected in Demostack for a demo presentation, the resulting activity and analytics are sent to Salesforce, linked to that specific opportunity.
2. Connecting Demostack and Salesforce
2.1 Via Salesforce Administrator
Simplified Setup: When using an administrator account, the integration automatically creates necessary custom fields and sets permissions, streamlining the setup process.
2.2 Via Integration User
For scenarios requiring limited permissions:
- Custom Field Creation: Manually set up the required custom fields as outlined in the "Custom Fields" section.
- Integration User Setup: Create a user with a 'Salesforce Integration' license and assign the 'Salesforce API Integration' permissions.
- Permission Sets: Create a new permission set with the specified permissions and assign it to the integration user. Except for the Activity (Event) object, all permissions are "view only”:
More information about permissions can be found on section 5.
4. Integration Connection: Utilize the integration user credentials to connect integration from the Demostack integration page.Limitations: If your Salesforce instance already utilizes 100 custom fields under the "Activity Event", you must clear some fields before proceeding with the integration.
Note: The integration indicator may appear gray initially, signifying a pending verification of custom field setup. A successful data push will turn it green, indicating a successful integration.
3. Configuring Custom Fields
This section is relevant only if the integration wasn’t connect by SFDC administrator
To fully operationalize the integration, create the following custom fields under the "Activity" object:
URL Field:
Asset Link-
- Label: Asset Link
- Field Name: DemostackAssetLink
- Length: 255
- Description: Saves a link to the Demostack asset for activities related to Playbook, Demo, or Tour.
Text Fields:
Opportunity Stage-
- Label: Opportunity Stage
- Field Name: DemostackOpportunityStage
- Length: 100
- Description: Captures the opportunity stage at the time of the event, useful when presenting a demo associated with an opportunity.
- Label: Presenter Name
- Field Name: DemostackPresenterName
- Length: 100
- Description: Records the name of the person who presented the demo, applicable for Playbook or Demo presentations linked to an opportunity.
- Label: Asset ID
- Field Name: DemostackAssetID
- Length: 100
- Description: Stores the Demostack asset ID for Salesforce activity summary events.
- Label: Share ID
- Field Name: DemostackShareId
- Length: 100
- Description: Identifies the share object ID when an activity is triggered via a shared asset link, relevant for sharing Demo or Tour assets.
Number Fields:
Duration in Minutes- Label: Duration In Minutes
- Field Name: DemostackDurationInMin
- Length: 5, Decimal: 2
- Description: Logs the active duration on an asset, pertinent to activity summary events.
- Label: Viewed Screens
- Field Name: DemostackDemoScreens
- Length: 5, Decimal: 0
- Description: Counts the number of screens viewed during a demo presentation.
Completed Tour Steps
- Label: Completed Steps
- Field Name: DemostackCompletedSteps
- Length: 5, Decimal: 0
- Description: Tracks the number of completed steps in a tour for tour activity summary events.
- Label: Total Steps
- Field Name: DemostackTotalSteps
- Length: 5, Decimal: 0
- Description: Indicates the total number of steps in the tour, useful for tour activity summary events.
Checkbox Field:
Tour Completion- Label: Is Tour Completed
- Field Name: DemostackIsTourCompleted
- Default Value: Unchecked
- Description: A boolean field that indicates whether the tour was completed, applicable to tour activity summary events.
Ensure these custom fields are properly configured in your Salesforce environment to leverage the full capabilities of the Demostack integration.
4. Permission overview.
Access Activities & Edit Events:
Demostack integrates activities to Opportunities, Accounts, and User profiles in Salesforce. To facilitate this, access to Salesforce activities is essential. The "Edit Events" permission is required to modify activities post-submission, allowing for additional information updates or corrections.
View Roles, Profiles, and Setup:
During integration setup, Demostack saves the profile name of the user initiating the connection. This detail aids in diagnosing permission issues or setup discrepancies. In order to receive the profile ID in user queries, we must enable "View Setup" and "View Roles" permissions.
View Users:
Certain Demostack workflows involve identifying Salesforce users by email, for instance, assigning activity ownership. The "View Users" permission enables this capability by allowing query users by email.
Object Permissions:
For an effective and detailed analysis, Demostack necessitates access to Salesforce accounts, contacts and leads data. This access enables Demostack to integrate and analyze data across both platforms, enhancing the understanding of the impact Demostack demos and marketing activities have on our customers' operations. By leveraging this data, we aim to provide our customers with actionable insights, thereby aiding in the optimization of their sales strategies and overall performance.
Account (Read & View All):
Demostack requires access to account information, including account names and their associated opportunities. This access also supports opportunity filtering by account.
Contact (Read, Create & View All Records):
Demostack requires access to Contact information, to measure the support of prospects engagement through association of demo activities with contacts.
Lead (Read, Create & View All Records):
Demostack requires access to Lead information, to measure the support of lead generation initiatives through association of demo and marketing activities with leads.
Field Permissions:
Contacts:
- Account ID (Read): Links contacts to accounts.
- Email (Read): Essential for queries based on contact email.
- Optional Fields (Read): Includes Lead Source, Title, and Description.
- intended for detailed analysis reports.
Leads:
- Email (Read): Required for lead identification based on email.
- Optional Fields (Read): Description, Industry, Leadsource, NumberOfEmployees, oppstage_c, Title, Website
- Intended for detailed analysis reports.
Accounts:
- Optional Fields (Read): Site, AccountSource, Active__c, AnnualRevenue, Description, NumberOfEmployees, Industry, Ownership, ParentID, Type, Website, YearStarted.
- Intended for detailed analysis reports.
Opportunities:
- Account ID (Read): Connects opportunities to specific accounts.
- Optional Fields (Read): Amount, Description, ExpectedRevenue, LeadSource, NextStep, Type.
- Intended for detailed analysis reports.
Events (Read & Edit):
- IsAllDayEvent, DemostackAssetID__c, DemostackAssetLink__c,
DemostackCompletedSteps__c, Description, DemostackDurationInMin__c,
DemostackIsTourCompleted__c, WhoId, DemostackOpportunityStage__c,
DemostackPresenterName__c, WhatId, DemostackShareId__c,
DemostackTotalSteps__c, Type, DemostackDemoScreens__c
Demostack often utilizes event objects, necessitating read and edit permissions to both revise or correct existing records.
5. Detailed Authentication Process
Establishing the Initial Connection:
The integration setup begins when a designated Demostack admin user, who holds the role of a Salesforce Administrator or Salesforce Integration User on the Salesforce instance, initiates the connection through the Demostack application. This is a one-time process done by a single user.
Upon initiating the connection, the user is redirected to Salesforce's authorization URL:
Here's what each parameter signifies:
- response_type=code:
This parameter instructs Salesforce that we expect an authorization code in response, which will be used to obtain the necessary tokens. Note that this code is single-use.
- client_id=XXX:
This identifies the Demostack-connected app within Salesforce, allowing it to request and utilize access and refresh tokens.
- redirect_uri=https://api.demostack.com/integrations/salesforce/callback:
This tells Salesforce where to send the authorization code.
- state=STATE:
This signed string contains essential details for Demostack to verify the user initiating the connection and other relevant information for finalizing the setup on our end.
Following the authorization, we use the received code to request access and refresh tokens from Salesforce. Upon obtaining these tokens, we securely encrypt and store them in our database. The refresh token, designed for long-term use, only needs re-invocation under specific circumstances such as explicit actions in Salesforce or if the connecting user is deactivated or removed.
Maintaining the Connection:
For ongoing interactions with Salesforce, we utilize the previously obtained access token. We first check if this token is still valid; if it is, we proceed with the request. If the token has expired, we employ the refresh token to acquire a new access token, which is then used for subsequent Salesforce requests. This ensures a seamless and secure connection between Demostack and Salesforce, facilitating efficient data exchange and integration functionality.
💬 Need Help?
If you have any questions, reach out to your Customer Success Manager or visit the Help Center.