Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Get User Data from JSON String Action

Get User Data from JSON String Action

Retrieve the value of a specific attribute from a JSON object that has been serialized into a string. Use this action to retrieve user information from the user info response or ID token during authentication provider user registration flows. Then, create and update user records with the user information that you retrieved from this action.

Required Editions

View supported editions.

This action is available only for the Identity User Registration Flow type.

In Flow Builder, add an Action element to your flow. In the Action field, enter Get, and then select Get User Data from JSON String.

Set Input Values

Input Parameter Description
JSON Object String

A JSON object that represents a map of attributes and that has been serialized into a string.

In authentication provider user registration flows, to pass in the user info response or ID token, first create an Apex-defined variable for the Auth.UserData object. For the input parameter, specify one of these properties from the Auth.UserData object.

  • idTokenJSONString
  • userInfoJSONString
JSON Attribute Key

A key that contains the full JSON variable path for a specific attribute from the JSON object.

For example, to get the value of the first type claim in this JSON structure, use the JSON variable path $.location[0].type as the key.

{"location": [ { "type": "office", "city": "San Francisco"}, {"type": "home", "city":"New York"}]}

Store Output Values

Each action returns a single attribute. To rename the output so that it’s easier for you to use it in the flow, assign the output to a variable. For example, if you retrieve an attribute that stores a single sign-on identifier from the provider, store it in a new federationIdentifier variable. Reference the variable when you create and update user records.

Input Parameter Description
Attribute Value The value for the attribute that was specified in the JSON attribute key. The value is stored in an instance of the Auth.JsonValueOutput class in a property that corresponds to the value type. For example, if the retrieved value is an integer, it’s stored in the integerValue property.
 
Loading
Salesforce Help | Article