How to Create a Salesforce Contact for Users Not Assigned to the Salesforce App using Okta Workflows

In this guide:

Okta Workflows guides

Okta Workflows guides offer questions and answers from the Okta Workflows community office hours. They also come from the #okta-workflows channel on the Mac Admins Slack and other places. Read all the other guides.

How to create a Salesforce Contact for an Unassigned Okta user using Okta Workflows

This guide will teach you how to create a Salesforce Contact for users who are not assigned to the Salesforce application using Okta Workflows.

Create Salesforce Contact

The solution has two flows:

  1. List Salesforce users: finds users who are not assigned to Salesforce
  2. 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.
List users not assigned to Salesforce.

How the flow works

  1. The Okta-List Users Assigned to Application action returns every user assigned to the Salesforce application (assigned users).
  2. The List-Pluck card extracts and returns just the user IDs from the assigned users list.
  3. The Okta-List Users with Search card returns every user in the Okta org with a status of PROVISIONED (all users).
  4. The List-Pluck function extracts and returns just the user IDs from the all users list.
  5. 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.
  6. 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.
Create a Salesforce Contact.

How the flow works

  1. The Helper Flow card receives a User ID from the main flow.
  2. The Okta-Read User action returns user information: Username, First name, Last name, Primary email, and Title.
  3. The Salesforce-Create Record action creates a new contact record in Salesforce.
Salesforce
New Contacts in Salesforce.

Okta Workflows resources

Leave a Reply

Discover more from Max Katz

Subscribe now to keep reading and get access to the full archive.

Continue reading