Overview
This article explains how to create a Salesforce Contact for users who are not assigned to the Salesforce application using Okta Workflows.
Solution
The solution has two flows:
- List Salesforce users: finds users who are not assigned to Salesforce
- Add Salesforce contact: creates a Salesforce contact
List unassigned users
The List Salesforce users flow finds users who are not assigned to the Salesforce application.
List users not assigned to Salesforce.
How the flow works
- The Okta-List Users Assigned to Application action returns every user assigned to the Salesforce application (assigned users).
- The List-Pluck card extracts and returns just the user IDs from the assigned users list.
- The Okta-List Users with Search card returns every user in the Okta org with a status of PROVISIONED (all users).
- The List-Pluck function extracts and returns just the user IDs from the all users list.
- The List-Difference function compares all users against assigned users and returns unassigned users — the user IDs that exist in the org but are not assigned to the Salesforce application.
- The List-For Each card iterates over the unassigned users list. It passes each user to the helper flow to create a Salesforce Contact.
Create Salesforce Contact
The Add Salesforce contact flow creates a Salesforce contact.
Create a Salesforce Contact.
How the flow works
- The Helper Flow card receives a User ID from the main flow.
- The Okta-Read User action returns user information: Username, First name, Last name, Primary email, and Title.
- The Salesforce-Create Record action creates a new contact record in Salesforce.
New Contacts in Salesforce.
Related References
- How to Create a Flow or Folder Backup and Save It to Google Drive
- How to Create an All-Day Event in Google Calendar Using Okta Workflows
