Integrate Salesforce

Integrate with Salesforce for anywhere access to leads, accounts, opportunities, cases, and contracts.

Use the following process to enable the Salesforce integration. Ensure you meet the prerequisites then set up the Salesforce integration. After you complete this process, your existing level of audit logging persists, including any actions carried out by the use of Citrix Microapps.

For a comprehensive list of out-of-the-box Salesforce microapps, see Use Salesforce microapps.

Review prerequisites

After you set up this integration in Salesforce, you will need these artifacts to add the integration in Citrix Workspace Microapps:

  • Username
  • Password
  • Security Token

For OAuth 2.0:

  • Consumer Key
  • Consumer Secret
  • OAuth Authorization Base Url

Note:

We recommend that you always use OAuth 2.0 as your service authentication method where available. OAuth 2.0 ensures that your integration meets the maximum security compliance with your configured microapp.

The integration requires regular API access to your Salesforce instance, so we recommend creating a dedicated user account in Salesforce. Then use that account to configure the Salesforce integration. This account must:

  • be given full data access privileges
  • be API-enabled
  • not allow two-factor authentication.

Using a dedicated account is useful for audit logs as it helps distinguish activities done through Workspace. This page contains tutorials for both Salesforce Classic and Salesforce Lightning Experience. Both tutorials assume that you are a System Administrator in Salesforce.

Note:

Salesforce “Contact” and “Group” Editions do not support any API. The “Professional” Edition does not include it automatically. However, support can be activated upon request.

Also the number of API requests are limited in Salesforce. If you plan to frequently synchronize an extensive amount of data, see Salesforce API Request Limits and Allocations.

  • Configure Citrix Gateway to support single sign-on for Salesforce so that once users log in they are automatically logged in again without having to enter their credentials a second time. Follow the instructions in Salesforce single sign-on Configuration. For more information about configuring SSO, see Citrix Gateway Service.

Add a new profile

Follow these steps:

  1. Log in to www.salesforce.com
  2. Go to Setting icon and select Setup > Administration > Manage Users > Profiles > New Profile.
  3. Set Existing Profile to System Administrator to ensure that the user that you create for this profile has full data access privileges.
  4. Enter a Profile Name, and select Save. We recommend naming the profile something like Citrix Workspace Access for easy reference when adding the profile as a new user in a following procedure.

    A Profile panel opens with your new profile.

Enable API access for the created profile

  1. On the Profile panel, select Edit.
  2. Scroll down to Administrative Permissions and select the API Enabled check box.
  3. (Optional) To disable password expiration, select the Password Never Expires check box.

    Note:

    Using this option is a potential security vulnerability.

  4. Select Save.

Add callback URLs

Add a custom URL to your instance configuration to grant access to private data and enable OAuth authenticated user actions. The first callback that is listed does not change. The second callback depends on the target application, and can be found in your URL address bar when creating the integration. The section {yourmicroappserverurl} is composed of a tenant part, a region part, and an environment part: https://{tenantID}.{region(us/eu/ap-s)}.iws.cloud.com.

  1. Log in to Salesforce as an admin.
  2. Navigate to Platform Tools > Apps > App Manager.
  3. Select New Connected App.
  4. Under Basic Information, complete the following fields:
    • Connected App Name
    • API Name
    • Contact Email
  5. Under API, select the Enable OAuth Settings check box.
  6. In the Callback URL field, add the following authorized redirect URLs with your Microapp server URL:

    • https://{yourmicroappserverurl}/admin/api/external-services/com.sapho.services.salesforce.SalesforceService/auth/serverContext
    • https://{yourmicroappserverurl}/app/api/auth/serviceAction/callback
  7. Next to Selected OAuth Scopes, choose the following scopes under Available OAuth Scopes, and then select Add to move them to the Selected OAuth Scopes field:
    • Access and manage your data (api)
    • Access your basic information (id, profile, email, address, phone)
    • Perform requests on your behalf any time (refresh_token, offline_access)
  8. Select Save.

(Optional) Restrict log-in IP ranges

If your organization sets IP ranges for User Profiles, you can control log-in access at the user level. Specify a range of allowed IP addresses on a user’s profile. For more information, see Restrict Log-in IP Ranges in the Enhanced Profile User Interface.

If you restrict log-in IP ranges, you do not need to generate a security token in a following procedure.

Add a new user

Create a dedicated user account that is used to connect to Salesforce. Use the new profile that you added in the previous procedure, Add a new profile.

Follow these steps:

  1. Go to Setup > Administer > Manage Users > Users > New User.
  2. Complete the required fields in red.
  3. Set User License to Salesforce.
  4. Set Profile to the profile that you added in the previous procedure. In the example above, we recommended Citrix Workspace Access for easy reference when adding the profile.
  5. Click Save.

Set up the new user

After you add a dedicated user account, you receive an email at the address you provided.

Follow these steps:

  1. Find the email and click the link as instructed.
  2. Log in to Salesforce.
  3. Set a password and a password question.

Generate a security token

If you restricted log-in IP ranges for the dedicated user profile, you can skip this step. The security token is not required for accounts connecting to the Salesforce API from a white listed IP block.

Follow these steps:

  1. Log in and select the account name.
  2. Go to My Settings > Personal > Reset My Security Token.
  3. Select Reset Security Token.

    The new security token is sent to the email address that you provided in the personal settings for this account. You also get a new security token whenever the password for this account is reset.

You can now complete adding the integration. Enter the Username and Password of the dedicated user account in the input fields of Salesforce service definition.

If you white listed the IP, you don’t need to enter a Security Token. Otherwise, paste the Security Token that was sent to the email box of the dedicated account.

Filter queries

Most Salesforce entities support filtering. Choose between predefined queries or write your own custom queries using Salesforce SOQL language. For more information, see Salesforce Object Query Language documentation.

Add the integration to Citrix Workspace Microapps

Add the Salesforce integration to Citrix Workspace Microapps to connect to your application. This delivers out-of-the-box microapps with pre-configured notifications and actions which are ready to use within your Workspace.

Follow these steps:

  1. From the overview page, select Get Started.

    The Manage Integrations page opens.

  2. Select Add New Integration, and Add a new integration from Citrix-provided templates.
  3. Choose the Salesforce tile.
  4. Enter a name for the integration.

    Salesforce connector parameters, user name, Password, User Authentication, Security Token

  5. Enter the Service Authentication that you collected in the previous procedures.
    • Enter your Username and Password credentials for your target systems service authentication.
  6. Select OAuth 2.0 for Authentication Method.
    • Enter the Consumer Key and Consumer Secret that you collected in the prerequisites procedure.
    • Enter your OAuth Authorization Base Url. Allows you to configure a custom SSO login page for your Salesforce instance. Enter your domain. This is the same as the SFDC URL, where you normally log in, and requires secure HTTPS. For example, https://{your_domain}/services/oauth2/authorize.
  7. Enter your Connector parameters.
    • Enter your Security Token.
    • Toggle Sandbox if you require your data to load into a sandbox environment.
    • Leave toggle Query deleted records during incremental synchronization to remove them from cache as well enabled. If the system throws the following error after your first incremental sync: Unable to load deleted entities of type, you can disable this toggle to work around the issue.
  8. Select Add.

The Microapp Integrations page opens with your added integration and its microapps. From here you can add another integration, continue setting up your out-of-the-box microapps, or create a new microapp for this integration.

You are now ready to set and run your first data synchronization. As a large quantity of data can be pulled from your integrated application to the Microapps platform, we recommend you use the Table page to filter entities for your first data synchronization to speed up synchronization.

For more information, see Verify needed entities and Set data synchronization in the Configure the integration article.

For more details of API endpoints and table entities, see Salesforce connector specifications.

Use Salesforce microapps

Existing application integrations come with out-of-the-box microapps. Start with these microapps and customize them for your needs.

Salesforce Microapps

Our Salesforce integration comes with the following preconfigured out-of-the-box microapps:

Accounts: Search for, view, and edit accounts.

Notification or Page Use-case workflows
Account Assigned To You (Existing) notification When the owner of an account is changed, the new owner receives a notification.
Account Assigned To You (New) notification When a new account is assigned to a user, they receive a notification.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Contact Detail page Provides a read only view of a contact with details.
Edit Account page Provides a form for submitting edits to an account.
My Accounts page Provides a personalized list of accounts.

Cases: Search for, view, and edit cases that are assigned to you.

Notification or Page Use-case workflows
Case Assigned To You (Existing) notification When the owner of a case is changed, the new owner receives a notification.
Case Assigned To You (New) notification When a new case is assigned to a user, they receive a notification.
New Case Related To Your Account notification When a new case is created that relates to a users account, they receive a notification.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Case Detail page Provides a view of a case and a button for opening the edit page.
Contact Detail page Provides a read only view of a contact with details.
Edit Case page Provides a form for submitting edits to a case.
My Open Cases page Provides a personalized list of cases that are assigned to a user.

Contacts: Search for, view, and edit contacts.

Notification or Page Use-case workflows
Contact Assigned To You (Existing) notification When the owner of a contact is changed, the new owner receives a notification.
Contact Assigned To You (New) notification When a new contact is assigned to a user, they receive a notification.
Contact Detail page Provides a view of a contact and a button for opening the edit page.
Edit Contact page Provides a form for submitting edits to a contact.
My Contacts page Provides a personalized list of contacts.

Contracts: Search for, view, and edit contracts.

Notification or Page Use-case workflows
Contract Updated notification When a detail of a contract is changed, the owner of the contract receives a notification.
Expiring Contract notification When a contract passes a defined threshold before or after its end date (for example, 3 days by default), the owner receives a notification reminder.
New Contract For Activation notification When a new pending contract activation approval request is assigned to a user, they receive a notification.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Contact Detail page Provides a read only view of a contact with details.
Contract Detail page Provides a view of a contract and a button for opening the edit page and activating the contract.
Edit Contract page Provides a form for submitting edits to a contract.
My Contracts Pending Activation page Provides a personalized list of contracts pending activation.

Create Account: Create a new account.

Notification or Page Use-case workflows
Create Account page Provides a form for submitting a new account.

Create Case: Create a new case.

Notification or Page Use-case workflows
Create Case page Provides a form for submitting a new case.

Create Contact: Create a new contact.

Notification or Page Use-case workflows
Create Contact page Provides a form for submitting a new contact.

Create Contract: Create a new contract.

Notification or Page Use-case workflows
Create Contract page Provides a form for submitting a new contract.

Create Event: Create a new event.

Notification or Page Use-case workflows
Create Event page Provides a form for submitting a new event.

Create Lead: Create a new lead.

Notification or Page Use-case workflows
Create Lead page Provides a form for submitting a new lead.

Create Opportunity: Create a new opportunity.

Notification or Page Use-case workflows
Create Opportunity page Provides a form for submitting a new opportunity.

Create Task: Create a new task.

Notification or Page Use-case workflows
Create Task page Provides a form for submitting a new task.

Events: Search for, view, and edit events.

Notification or Page Use-case workflows
Event Reminder notification When an event passes a defined threshold before or after its activity date and time (for example, 1 hour by default), the owner receives a notification reminder.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Contact Detail page Provides a read only view of a contact with details.
Edit Event page Provides a form for submitting edits to an event.
Event Detail page Provides a view of an event and a button for opening the edit page.
My Events page Provides a personalized list of events.

Leads: Search for, view, edit, and convert leads.

Notification or Page Use-case workflows
Lead Assigned To You (Existing) notification When the owner of a lead is changed, the new owner receives a notification.
Lead Assigned To You (New) notification When a new lead is assigned to a user, they receive a notification.
Convert Lead page Provides a form for converting a lead.
Edit Lead page Provides a form for submitting edits to a lead.
My Active Leads page Provides a personalized list of leads.

Opportunities: Search for, view, and edit opportunities.

Notification or Page Use-case workflows
Opportunity Assigned To You (Existing) notification When the owner of an opportunity is changed, the new owner receives a notification.
Opportunity Assigned To You (New) notification When a new opportunity is assigned to a user, they receive a notification.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Contact Detail page Provides a read only view of a contact with details.
Edit Opportunity page Provides a form for submitting edits to an opportunity.
My Open Opportunities page Provides a personalized list of opportunities.
Opportunity Detail page Provides a view of an opportunity and a button for opening the edit page.

Pending Account Approvals: Search for and approve or reject accounts.

Notification or Page Use-case workflows
New Account For Approval notification When a new account is submitted for an actor’s approval, they receive a notification.
Approve Account page Provides a form for approving or rejecting an account.
My Pending Account Approvals page Provides a personalized list of pending account approvals and links to the approval page.

Pending Contact Approvals: Search for and approve or reject contacts.

Notification or Page Use-case workflows
New Contact For Approval notification When a new contact is submitted for an actor’s approval, they receive a notification.
Approve Contact page Provides a form for approving or rejecting a contact.
My Pending Contact Approvals Provides a personalized list of pending contact approvals and links to the approval page.

Pending Contract Approvals: Search for and approve contracts.

Notification or Page Use-case workflows
New Contract For Approval notification When a new contract is submitted for an actor’s approval, they receive a notification.
Approve Contract page Provides a form for approving or rejecting a contract.
My Pending Contract Approvals Provides a personalized list of pending contract approvals and links to the approval page.

Tasks: Search for, view, and edit tasks.

Notification or Page Use-case workflows
Task Reminder notification When a task passes a defined threshold before or after its activity date and time (for example, 1 hour by default), the owner receives a notification reminder.
Account Detail page Provides a view of an account with details including contacts and a link to contact details.
Contact Detail page Provides a read only view of a contact with details.
Edit Task page Provides a form for submitting edits to a task.
My Open Tasks page Provides a personalized list of tasks.
Task Detail page Provides a view of a task and a button for opening the edit page.

Add picklists’ values table

Due to the nature of the Salesforce schema, not all data is available as table entities. Use the picklistvalue table to see every Salesforce object’s picklist and all of its options.

  1. Open a Salesforce microapp and navigate to the page builder.
  2. Select and drag a Select component to the field.
  3. Under Select Properties, clear the Map to Data Column toggle. This allows you to view all Salesforce objects.
  4. Select picklistvalue from the Data Table menu.
  5. Select EDIT FILTER to open the data filter.
  6. Select the object and the field that you need data from. Select All Conditions Must Match and SAVE to close the filter. The following screenshot shows an example of setting up the filter: Setting picklistvalue filters This screenshot shows the database objects and fields that we are trying to access: Example Salesforce database
  7. Finish setting up this component. For more information, see Page builder components.