Data Collection: Validation Rules

Updated 

Business use case

The business use case is to apply certain restrictions on the File Headers so that only the impactful Customer Leads are ingested into the system.

Sprinklr solution

Sprinklr offers flexible, precise, and dynamic validation rules which can be applied at the Data Import stage to ensure only the relevant Customer Leads are ingested into the Sprinklr system.

Validation rule workflow

Types of validation rules

Sprinklr supports the following types of validation rules on Data Connector attributes currently.

  • Phone Number Validation: To validate the Data Connector attributes comprising of mobile numbers of Customer Leads.

  • Email Validation: To validate the Data Connector attributes comprising of emails of Customer Leads.

  • Character Limit Validation: To set a max cap on the number of characters a particular Data Connector attribute can contain.

  • Mandatory checkbox: This checkbox governs the creation or failure of a Customer Lead in Sprinklr basis the other validation rules viz.a.viz PhoneNumber/Email/Character applied on that particular Data Connector attribute.

Phone Number Validation

Phone Number Validation is applied on Data Connector attributes containing Customer Phone Numbers. This is really advantageous to ensure only accurate Customer Numbers are ingested in Sprinklr. To be considered an accurate Phone Number, a customer’s phone number should satisfy all the validation rules specified in the following table.

Rule

Outcome

Example

Phone Numbers should only contain numeric values

Only a string containing numeric values are eligible to be a considered an accurate Phone Number by Sprinklr backend

ABC999 is not an accurate Phone Number

Phone Numbers should contain 10 digit numeric value

Any Phone number containing more or less than 10 numeric digits won’t be considered an accurate Phone Number by Sprinklr backend

99999999999 is not a valid Phone Number since it contains 11 digits

Phone Numbers shouldn’t contain 9 or more than 9 consecutive digits

Any Phone Number containing 9 or more than 9 consecutive digits won’t be considered an accurate Phone Number by Sprinklr backend

88888888890 is not a valid Phone Number since it has 9 consecutive digits

Applying Phone Number Validation on a Data Connector Attribute

On the Edit Schema window, simply tag the Data Connector attribute where Phone Number validation is to be applied to Phone Number Validation option.

Character Limit Validation

Character Limit Validation is used to put an upper cap on the maximum number of characters a particular Lead List Attribute can contain. This is extremely useful to validate certain Lead List attributes such as Pincode where the values are to be precise and uniform across the entire demographic.

Rule

Outcome

Example

A string cannot exceed the character limit specified by the user

Any string which is exceeding the character limit specified by the user will not be considered correct

Let’s say a user specifies a character limit of 5 on a particular data connector attribute and user tries to ingest “201045”

The given string won’t be considered accurate by Sprinklr backend since it is exceeding the character limit provided by the user

Applying Character Limit Validation

Application of Character Limit Validation is achieved in the Edit Schema tab of Data Connector, analogous to application of Phone Number validation. User has to specify the upper cap they want to set on a particular Data Connector attribute.

In the above screenshot, character limit validation of 20 is applied on the Data Connector attribute Customer Name.

Email Validation Rule

Email validation rules are quite essential to validate a Customer Lead’s email addresses since emails are one of the most important channels. The following table illustrates the validation rules supported by Sprinklr currently.

Rule

Outcome

Example

A valid email address should have one ‘@’ symbol

Any string not containing @ symbol won’t be considered as a valid email address by backend

Abhishekpam.com will not be considered a valid email address since it doesn’t contain ‘@’ symbol

The string preceding the @ symbol can contain the following values

  1. Any alphabetic character 

  2. Any numeric character

  3. Special characters like Dot(.) Underscore(_), Hyphen(-), Plus(+), Minus(_)

Any string preceding @ should only contain the specified values in the corresponding left cell

kartikeya$%#%@gmail.com will not be a valid email address as per Sprinklr backend

Before @ character, there must be at least one acceptable character specified in row #2 of the table

Only the email addresses containing at-least one character among the allowed characters will be considered accurate

@sprinklr,com will not be considered a valid email address

In the email address, the string following @ character can contain the following values :

  1. Any alphabetic value

  2. Any numeric value

  3. Exclusive special characters like Dot(.) Minus(-) only

Only the email addresses for which the substring following the @ character satisfy the conditions specified in the left cell are eligible to be considered as accurate email addresses

kartikeya.pandey@#$#@@.com will not be considered a valid email address

Post @ character in the email address, there should be atleast one Dot(.) character and after the last Dot(.) character, there should be atleast 2 characters and at max 6 characters

Only the email addresses for which the substring following the @ character satisfy the conditions specified in the left cell are eligible to be considered as accurate email addresses

kartikeya.pandey@sprinklr.commmmmm is not a valid email address since after the last Dot(.) character, there are are more than 6 characters

Applying Email Validation Rules

Applying Email validation rule is analogous to applying Phone Number Validation. The relevant Data Connector attribute has to be tagged with Email Validation option in the Edit Schema tab under Data Connector.

Mandatory Checkbox

The Mandatory Checkbox is one of the most critical validation rules and it governs the ingestion of a Customer Lead basis the other validation rules. While using other validation rules such as Character Limit Validation/Phone Number Validation, a user can either :

  • Choose to mark a Lead List attribute as Mandatory

  • Choose to mark a Lead List attribute as Non-Mandatory

The ingestion of a particular Customer Lead is governed by the aforementioned choice(s) made by the user. The following table showcases the prowess of Mandatory Checkbox as a validation rule:

Rule

Outcome

Example

If a Data Connector attribute is marked as Mandatory using the checkbox and the associated validation rule (Email/Phone Number/Character Limit) fails, the ingestion of the particular Customer Lead will fail

In order to successfully ingest a Customer Lead for the cases where mandatory checkbox is applied on a Data Connector attribute, the relevant validation must be abided otherwise the ingestion of whole Customer Lead will fail

If Phone Number Validation is applied on a particular Data Connector attribute and it is marked as mandatory and let’s say for a particular Customer Lead, there’s a phone number which is equal to 999999999900, the ingestion of whole Customer Lead will fail

The reason being 999999999900 is not a correct validation rule as per the Phone Number validation rules above and since the attribute was marked as mandatory, the ingestion of whole Customer Lead failed

If a Data Connector attribute is not marked as Mandatory using the checkbox and the associated validation rule (Email/Phone Number/Character Limit) fails, the ingestion of the particular Customer Lead will be ingested

However, in this case, the incorrect value as per the validation rules will be set to NULL string

To summarize, the Customer Lead will be ingested with incorrect value being set to NULL

In this scenario, the Customer Lead will be ingested regardless of the fact that a particular validation rule on a Data Connector attribute fails or not

If Phone Number Validation is applied on a particular Data Connector attribute and it is not marked as a mandatory field and let’s say for a particular Customer Lead there’s a phone number which is equal to 999999999900, Customer Lead will be ingested in this case

However, when an admin will view the Customer Lead inside Sprinklr, the value corresponding to Phone Number attribute will be NULL as per the validation rule specified here

If a Data connector attribute is marked as mandatory and the value corresponding to it is NULL, the entire Customer Lead ingestion will fail

To successfully ingest a customer lead, the mandatory Data Connector attributes shouldn’t contain empty or NULL values

Let’s say a Data Connector attribute named Pincode is marked as mandatory but for a particular Customer Lead, the value is empty corresponding to it

In this scenario, entire Customer Lead ingestion will fail since there is a mandatory attribute having an empty value

Let’s discuss the various permutations of Mandatory Checkbox along with other validation rules.

Mandatory Checkbox Enabled/Disabled with Phone Number Validation

Please note that in these scenarios, it is assumed that user has tagged the respective attribute with Phone Number Validation option.

Scenarios where Mandatory Checkbox is enabled 

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to upload a phone number containing character values

ABC888

YES

For this scenario, the ingestion of the Customer Lead will fail because

  • ABC888 is a not a valid phone number as per Phone Number Validation

  • The data connector attribute is marked as mandatory

FAILURE

User tries to ingest a phone number containing more than 10 numeric digits

99999999999911

YES

For this scenario, the ingestion of the Customer Lead will fail because:

  • 99999999999911 is not a valid phone number as per the Phone Number Validation

  • Mandatory Checkbox is enabled

FAILURE

User tries to ingest a phone number containing 9 or more than 9 consecutive digits

8888888889

YES

For this scenario, the ingestion of particular Customer Lead will fail since:

  • 8888888889 is not a valid phone number as per the Phone Number Validation

  • The relevant attribute is marked as mandatory

FAILURE

User tries to import an empty value for phone number

Self Explanatory

YES

For this scenario, the ingestion of particular Customer Lead will fail since the mandatory checkbox is enabled and the corresponding value is empty

FAILURE

Scenarios where Mandatory Checkbox is not enabled

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to upload a phone number containing character values

ABC888

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of ABC888 will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest a phone number containing more than 10 numeric digits

99999999999911

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of

99999999999911 will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest a phone number containing 9 or more than 9 consecutive digits

8888888889

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 8888888889  will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

Mandatory Checkbox Enabled/Disabled with Email Validation

Scenarios where Mandatory Checkbox is Enabled

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to ingest an email address not containing ‘@’ character

abhishekpam.com

YES

For this scenario, the ingestion of Customer Lead will fail because:

  1. Abhishekpam.com is not a valid email address as per Email Validation

  2. The mandatory checkbox is enabled

FAILURE

User tries to ingest an email containing unexpected characters before the ‘@’ symbol

kartikeya$%#%@gmail.com

YES

For this scenario, the ingestion of Customer Lead will fail because:

  1. kartikeya$%#%@gmail.com is not a valid email address as per Email Validation

  2. The mandatory checkbox is enabled

FAILURE

User tries to ingest an email address not containing at least one acceptable character before the @ symbol

@sprinklr.com 

YES

For this scenario the ingestion of Customer Lead will fail because:

  1. @sprinklr.com is not a valid email address as per Email Validation

  2. The mandatory checkbox is enabled

FAILURE

User tries to ingest an email address containing unacceptable characters succeeding the @ symbol

kartikeya.pandey@#$#@@.com 

YES

For this scenario, the ingestion of Customer Lead will fail because:

  1. kartikeya.pandey@#$#@@.com is not a valid email address per Email Validation

  2. The mandatory checkbox is enabled

FAILURE

User tries to ingest an email address not containing at least one Dot(.) symbol post the @ character and the number of characters after the last Dot(.) character are not in the range of 2-6 characters

kartikeya.pandey@sprinklr.commmmmm 

YES

For this scenario, the ingestion of Customer Lead will fail because:

  1. @sprinklr.commmmmm is not a valid email address as per Email Validation

  2. The mandatory checkbox is enabled

FAILURE

User tries to ingest an empty value for Email

Self Explanatory

YES

For this scenario, the ingestion of particular Customer Lead will fail since the mandatory checkbox is enabled and corresponding value is empty

FAILURE

Scenarios where Mandatory Checkbox is not enabled

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to ingest an email address not containing ‘@’ character

abhishekpam.com

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 

abhishekpam.com will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest an email containing unexpected characters before the ‘@’ symbol

kartikeya$%#%@gmail.com

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 

kartikeya$%#%@gmail.com will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest an email address not containing at least one acceptable character before the @ symbol

@sprinklr.com

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 

kartikeya$%#%@gmail.com will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest an email address containing unacceptable characters succeeding the @ symbol

kartikeya.pandey@#$#@@.com 

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 

kartikeya.pandey@#$#@@.com will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest an email address not containing at least one Dot(.) symbol post the @ character and the number of characters after the last Dot(.) character are not in the range of 2-6 characters

kartikeya.pandey@sprinklr.commmmmm 

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 

kartikeya.pandey@sprinklr.commmmmm will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

User tries to ingest an empty value for email

Self Explanatory

NO

In this scenario, the Customer Lead will be ingested since the Data Connector attribute is not mandatory

However, admin won’t be able to see this value since it is empty

SUCCESS with incorrect value of attribute set to NULL

Mandatory Checkbox with Character Limit Validation

Scenarios where Mandatory Checkbox is Enabled

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to ingest a Customer Lead not abiding by the character limit validation being set on a particular Data Connector attribute

Let’s say a user specifies a character limit of 5 on a particular data connector attribute and user tries to ingest “201045”

YES

The ingestion of particular Customer Lead will fail since the character limit validation is not being honored here

FAILURE

Scenarios where Mandatory Checkbox is not enabled

Action

Example

Mandatory Checkbox Enabled?

Expected Outcome

Record Creation

User tries to ingest a Customer Lead not abiding by the character limit validation being set on a particular Data Connector attribute

Let’s say a user specifies a character limit of 5 on a particular Data Connector attribute and user tries to ingest “201045”

NO

In this scenario, the Customer Lead will be ingested since the Data Connector is not mandatory

However, the incorrect value of 201045 will be set to NULL and the admin won’t be able to see this particular attribute for Customer Lead in the Lead third pane since it is empty

SUCCESS with incorrect value of attribute set to NULL

Audit Logs of a Connector

An admin can validate the ingestion corresponding to a particular Data Connector attribute by looking at the Connector Audit Trails. To view the connector audit trails, hover over the Options icon besides a connector name and click View Details. Using the Connector Audit Logs, an admin can solve the following use cases.

  1. To check the number of Created, Updated, Unchanged and Failed Leads from a particular file.

  2. To check the corresponding failure reasons as to why a particular Customer Leads failed so that the admin can reupload those customer leads again and ensure the business prospects are not impacted.

  3. To check success and failure files created out of a given ingested file. Simply click on the URL provided in the Connector Audit Logs. (See the above screenshot for reference)

Viewing a Customer Lead

Once Customer Leads are ingested, viewing them is extremely critical for an admin to ensure that data is being ingested in an expected manner. To view a Customer Lead, simply follow the below steps

  1. Navigate to the Universal Search and select the filter for Lead Event.

  2. Once Lead Event is selected, search for a given Customer Lead using its identifier.

  3. Click on the particular tile to open the Customer Lead view in the third pane where all the details corresponding to a particular lead can be seen. This view will show the Customer ID as well the relevant attributes.