Let Oomnitza be your single source of truth!
You'll get visibility of your users as data from Salesforce is automatically transformed into consumable information and actionable insights.
Connect Oomnitza and Salesforce in minutes
You'll get visibility of your Salesforce users by creating configurable workflows to automate tasks such as:
-
- Workflows for creating and deactivating a user
- Workflows for creating and updating an opportunity
- Workflows for getting SaaS user roles and last login activity
- Workflows for getting SaaS user license information
Contents
Before you start
Before you can create the integration with Oomnitza, you need to have added your Salesforce credentials to Oomnitza and set your Salesforce Subdomain as a global variable. For further information, refer to Adding your Salesforce credentials to Oomnitza.
We recommend that you also create the extended integration for Salesforce users. You can use the information retrieved in these integrations to trigger workflows that can get user information.
To run Salesforce workflows, you need to set the API version as a global variable.
- From the menu, click Configuration > General.
- Click Global Settings.
- Click Add new variable (+).
- Add the Salesforce.API_Version variable and its value. You need to enter the letter v before the version number. The default version is v50.0
- Save your changes.
Creating workflows
Create user workflows
To create a user workflow, you must complete these steps:
- Click Configuration > Workflows
- Click Add
and select People from the list.
- Edit the Begin Block and add rules to trigger the workflow. For example, if you set the Actions to New and add a rule so that the Created Date is Current Date you can trigger a workflow to activate every time a new user is created in Oomnitza. Refer to Using the Begin block.
- Drag and drop the API block onto the Sandbox.
- Click Edit on the API block and enter Salesforce in the search field.
- Select from the following presets:
- To choose a preset, click the forward arrow (>).
- Select the credentials that you created in Adding your Salesforce credentials to Oomnitza.
- Your Subdomain should be derived from the global variable you created in Adding the Salesforce Subdomain as a global variable.
- Configure the API Block following the preset instructions below, and save your changes.
- Connect the Blocks.
- Save, validate, and activate your workflow.
Using the Create user preset
Tip
We recommend editing the criteria in the Begin block so that the workflow runs every time a new user is created in Oomnitza.
The Create User preset creates a new user. The following information is required to create a new user in Salesforce:
- Username. The username of the Salesforce user.
- Email. The email of the Salesforce user.
- Last Name. The Last name of the Salesforce user.
- Alias. The user's alias. If the user does not have an alias, simply enter the user's first name.
- TimeZoneSidKey. For example, America/Los_Angeles. For a complete list, refer to Salesforce TimeZoneSidKeys.
- LocaleSidKey. For example, en_US. For a complete list, refer to Salesforce LocalSidKeys.
- EmailEncodingKey. For example, UTF-8 or ISO-8859-1. For a complete list, refer to Salesforce Email Encoding.
- ProfileId. The ID is associated with the user profile in Salesforce. You can view a profile id in Salesforce by navigating to Users>Profiles and selecting a profile name from the list. The profile id appears after the
addressin the URL. For example,https://oomnitza-dev-ed.lightning.force.com/lightning/setup/EnhancedProfiles/page?address=%2F00e7Q000003KkuY - LanguageLocaleKey. For example, en_US. For a complete list, refer to Salesforce LanguageLocaleKey.
- UserPermissionsOfflineUser. Indicates whether the user is enabled to use Offline Edition (true) or not (false).
- UserPermissionsMarketingUser. Indicates whether the user is enabled to manage campaigns in the user interface (true) or not (false).
See also Salesforce API Documentation: User - Object reference.
You can refer to an existing Oomnitza field by entering the field name in lowercase, with spaces replaced with an underscore. For example:{{first_name}}or{{email}}.
The API returns the following response if successful:
{
"id": "0057Q000ABCDEFG",
"success": true,
"errors": []
}
You can capture this response by selecting Advanced Mode > Response. To map the entire response place {{response}} in the Response field and map it to a custom long text Oomnitza field, such as API Response. Once you have the entire response, you can then parse the JSON response values to custom Oomnitza fields as per the example below.
Using the Deactivate User preset
Tip
We recommend running this preset following the SaaS user workflow. Edit the criteria in the begin block to get inactive users such as SaaS name = Salesforce, Last login date Days before 30
The Deactivate User preset deactivates a user by, User ID.
You can configure the message payload by selecting Advanced Mode > Information. You will notice that the Salesforce User ID is referenced in the property{{user_external_id}}. Ensure that this property is populated with information before you run this workflow.
Warning
If successful, this workflow returns a204 No Contentresponse code.
Using the Create Opportunity preset
The Create Opportunity preset creates a new Salesforce opportunity. When you select this preset you need to supply the following information:
- Name: A name for this opportunity. Limit: 120 characters.
- Description: Text description of the opportunity. Limit: 32,000 characters
- Close Date: Date when the opportunity is expected to close.
- Stage Name: A picklist field in Salesforce that describes the current stage of the record.
You can configure the message payload by selecting Advanced Mode.
Select the Body tab. Ensure that the message body contains information similar to the request example below.
{
"Name": "Test opportunity",
"Description": "XXXXXXXXXXXXX",
"OwnerId": "{{salesforce_user_id}}",
"CloseDate": "2022-09-25",
"StageName": "Needs Analysis"
}
Select the Response tab. You can map the entire response as per the example below.
For further information, refer to the Salesforce API Documentation: Opportunity - Supported Calls.
Using the Add Comment to Opportunity preset
The Add Comment to Opportunity preset adds a comment to an opportunity, by Opportunity ID. When you select this preset you need to supply the Opportunity ID and add a comment.
You can configure the message response by selecting Advanced Mode > Response as per the example in the Create Opportunity preset.
Using the Reassign Opportunity Owner preset
The Reassign Opportunity Owner preset reassigns a Salesforce opportunity, by Opportunity ID.
You can configure the message payload by selecting Advanced Mode.
- In the API block window, click the Advanced Mode button located in the upper right of the window.
- Select the Body tab. You will notice that the Salesforce User ID is referenced in the property
{{salesforce_user_id}}.Follow the mapping steps in Creating custom mappings so that this property exists in Oomnitza and is populated with information before you run this workflow. - Select the Response tab. You can map the entire response as per the example in the Create Opportunity preset.
Reference articles for workflows
Create SaaS user workflows
Prerequisites
Before you create a SaaS user workflow, you should have already run the extended integration for Salesforce users and selected User plus SaaS User to populate the Salesforce entry in the Software > SaaS menu.
Creating the SaaS user workflow
- Click Configuration > Workflows
- Click Add (+) and select Software SaaS Users from the list.
- Enter the name of the workflow.
Editing the begin block
The begin block is the workflow’s trigger. In this case, you create a workflow that retrieves SaaS user information from Salesforce.
- Click Edit.
- Enter the name of the begin block.
- Configure the schedule so that the user information is streamed to Oomnitza when your system is least busy.
- Select run for Active records.
- Click Add Rule and add this rule: SaaS name = Salesforce.
- Click Save.
Learn more about the Begin block
Editing the SaaS User Role block
- Drag and drop the SaaS User Role retrieval block onto the Sandbox, and then click Edit.
- Search for Salesforce and click the arrow (>).
-
Choose from one of the following options:
- Salesforce User License. Fetches the internal name of the user license (such as Analytics Cloud Integration User, Chatter External) and the user's last login date.
- Salesforce User Permissions. Fetches the user's permissions (such as CRM Content User, Marketing User, Offline User, Service Cloud User) and last login date.
- Salesforce User Role. Fetches the user's role (as defined within your organization's instance of Salesforce) and last login date.
- Enter your Salesforce subdomain. If your Salesforce URL is
https://mycompany.my.salesforce.comyour subdomain would be:mycompany.my - Enter your Salesforce API version. You need to enter the letter v before the version number. The default version is v54.0
By default, the Deactivate User checkbox is selected. This means that if the users listed in SaaS > Salesforce > Users do not exist in your SaaS application, they will be deactivated once the workflow is run.
Tip
You can add additional features to your workflow. For example, you can add a Notify block to send messages. See Adding metadata to a Notify block.
Connecting the blocks
To complete the workflow, you connect the blocks.
- Link the boxes as shown in the diagram.
- Save, validate, and activate your workflow.
Result
To view the results, complete the following steps:
- Click Software from the menu.
- Select the Saas tab, and select your software entry for Salesforce.
- Click Users in the side pane.
- The SaaS user information, such as the user's last login date, role, license, or permissions, is streamed to Oomnitza and presented in the Users window.
Comments
0 comments
Please sign in to leave a comment.