Salesforce - Setup DataQ Screenflow

Support DQE
Support DQE
  • Updated

Flowscreen components

Starting with version 1.45, DQE One for Salesforce provides a set of Aura components specifically designed for use within Screen Flows.

These components implement real-time API calls for the validation of postal addresses, email addresses, and phone numbers.

From a usage perspective, they behave like standard Flow field components and are available in the Custom section of the Flow component palette.

StandardComponents

Add these components to your Screen Flow in the same way as standard input fields, then bind their output values to Flow variables in order to retrieve the required information.

ComponentInFlowScreen

 

Address Lookup

Attributes: 

  • API Name: Unique identifier among the Flow variables
  • Label: Displayed label above field
  • Street Value: Output variable for Street
  • City Value: Output variable for City
  • Country Value: Output Variable for Country
  • Country Options: JSON formatted list of options like: [{'label': 'United States', 'value': 'US'}]
  • Postal Code Value: Output variable for Postal Code
  • State or Province Value : Output variable for State
  • Latitude Value : Output variable for Latitude
  • Longitude Value : Output variable for Longitude
  • Status Code : API status code after validation
  • Disabled: Prevent manual update in the input field
  • Required: Display the field as required
DQEAddressField
LatitudeLongitudeFields

Inherited global settings (from DQE Address Setup - Custom Settings)

  • Default Country
  • Autofill Address Complement : whether or not insert the additional address information in the street field
  • Autofill Geolocation Infos : insert latitude and longitude values

Email Lookup

Attributes:

  • API Name : Unique identifier among the Flow variables
  • Label : Displayed label above field
  • StatusCode : API status code after validation
  • Value : Input Value
  • Placeholder Text : Displayed inside the input field if empty
  • Required : Set the required icon beside input field
  • Disabled : Prevent manual input in the field

Inherited global settings (from DQE Email Setup - Custom Settings)

  • Suggest Username (the suggestion will only apply to the email domain)
  • Code : Blacklisted Domain
  • Code : Domain Throwable
  • Code : Inbox Full
  • Code : Invalid Email
  • Code : Syntax Error
  • Code : Unauthorized Username
  • Code : Unknown Domain
  • Code : User Not Verified
  • Code : Valid Email
  • Accept Extended Syntax

Phone Lookup

Attributes:

  • API Name : Unique identifier among the Flow variables
  • Label : Displayed label above field
  • StatusCode : API status code after validation
  • Value : Input Value
  • Country Code : Country Iso Code (ISO-2)
  • Placeholder Text : Displayed inside the input field if empty
  • Required : Set the required icon beside input field
  • Disabled : Prevent manual input in the field
DQEPhoneFields
CountryCodePhone

Inherited global settings (from DQE Phone Setup - Custom Settings)

  • Display Country Selector
  • Code : Phone is Invalid
  • Code : Phone is Valid
  • Ouput Format

Flow invokable actions

All these invokable actions must be executed asynchronously, as they perform callouts to the DQE APIs.

As a result, each call must be executed in a separate transaction. Otherwise, you will encounter an exception indicating that pending work still exists and the callout cannot be performed.

Once the response is received, the status code is stored in the field mapped in the corresponding Custom Setting, in the same way as when using a DQE Form component to create or update a record.

Requirements

The following list outlines general requirements and recommendations from Salesforce documentation regarding invokable actions and their usage.

SalesforceScreenshot

Postal Address Validation

This Apex Invokable Class can be used to validate a postal address.
Associated Custom Setting: “DQE Address Setup”

Parameters

Type: List<String>

Params:

  • RecordId (String) : record Ids
  • FieldNameAPI (String) : The Address Field name

Example: 

For an Account record - (“001KG00000Mi2khYAB“, “BillingAddress“)

Email Validation

This Apex Invokable Class can be used to verify an Email address.
Associated Custom Setting: “DQE Email Setup”

Parameters

Type: List<String>

Params:

  • RecordId (String): the records Ids
  • FieldNameAPI (String) : The Email Field name

Example: 

For an Lead record - (“00QKG000001RLeL2AW“, “Email“)

Phone Validation

This Apex Invokable Class can be used to verify a Phone number.
Associated Custom Setting: “DQE Phone Setup”

Parameters

Type: List<String>

Params:

  • RecordId (String): the records Ids
  • FieldNameAPI (String) : The Phone Field name
  • CountryCode (String) : the country code (ISO2 or ISO3) to search on

Example: 

For an Account record - (“001KG00000Mi2khYAB“, “Phone“, “USA”)

 

Step by step example

STEP 1:  Record-Triggered Flow Definition

  • Select the SObject
  • Select the event triggering
  • Select the [Action and Related Records] optimization
  • Create a scheduled Path (doesn't work otherwise because of the callout performed by the Apex Action)
RecordTriggeredConfig

You should end up with a flow structure such as:

FinalResult

STEP 2:  Parameters

  1. Define a flow variable (for example "params")
DefineFlowVariable

/!\ Take care to define it as a collection.

  1. Create a variable named targetField
  2. Assign values to it being: The record Id, the Sobject Name and the field's API Name
setparams

 

Step by Step complete example flowscreen and invokable actions

Flow Diagram for Address Validation

FlowDiagram

 

FlowDiagramComponent

 

Step by Step

  1. Create a Picklist Choice set 
PickListChoiceSet
  1. Create a screenflow for the country picklist
PicklistScreenflow
PicklistScreenflow2
  1. Create the variable Address_Status (store the address quality code)
Address_Status
  1. Create a screenflow : Where you can display all the fields you need to create your future record.
    In this scenario we even used the DQE Address Check Invokable Action (described next chapter) after the record is created.
AddressScreenFlow

Data Binding :
The key idea here is to make a mapping between the attributes of the DQE Address Field Component and the Standard Address Field. In this Example they are respectively labelled as:

  • DQE_Address
  • AddressField

So we endup with the following mapping.

DQEAddressMaaping
AddressFieldMapping
  1. Create the variable CityValue
CityValue
  1. Create Check Manual Input

Even if the mapping we made at the previous step seems to be bidirectional, a manual update in the AddressField component will not update the value in the DQE_Address component.

This allows you to check after the form filling if there have been a manual input after DQE completed the informations.

CheckIfManuallyChanged
  1. Create assignment "Reset Quality Code"
ResetQualityCode
  1. Create variable Type Record Object
NewLeadCreation
  1. Create assigment "Set Fields"
CreateAssigment
  1. Create a component "Create a record"
CreateRecords
  1. Create a decision "Check If address has status code"
CreateDecision
  1. Create variable "params"
paramsVariable
  1. Create assigment "Set API parameters"
SetAPIparameters
  1. Call invokable action
InvokableAction

Related to

Was this article helpful?

0 out of 0 found this helpful