Components Integrations

Support DQE
Support DQE
  • Updated

Integration Components

The int_dqe cartridge is the core implementation for integrating DQE functionality into SFCC. This article provides an overview of its components.

DQE Services

These services interact with DQE APIs and provide functionality for email, phone, and address validation and suggestions.

Implemented Services

  • dqe.http.email.validate
  • dqe.http.phone.validate
  • dqe.http.address.suggestions.search
  • dqe.http.address.suggestions.complete
  • dqe.http.address.validate

Used DQE APIs

DQE Scripts and Helpers

All DQE scripts, helper files, and related logic are located under cartridges/int_dqe/cartridge/scripts/dqe. This folder contains the base SFCC DQE functionality for address suggestions and validation, email and phone validation, DQE configuration handling, and DQE service calls.

  • cartridges/int_dqe/cartridge/scripts/dqe/dqeAddress.js: contains DQE address methods used to get address suggestions and validate addresses.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqeAPI.js: provides methods for working with the DQE API. It acts as middleware between DQE scripts and DQE services.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqeCache.js: provides methods for working with the DQE custom cache. The cache stores validation results for DQE response codes and helps avoid excessive queries to custom objects in the database.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqeConstants.js: contains DQE constants used in other integration and extension files.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqeEmailValidator.js: provides methods for validating email values.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqeHelpers.js: contains generic DQE helper methods and methods for retrieving DQE preferences.
  • cartridges/int_dqe/cartridge/scripts/dqe/dqePhoneValidator.js: provides methods for validating phone values.

DQE Models

These models map DQE API responses to JavaScript objects for use in SFCC.

  1. addressSuggestions.js: maps DQE address suggestion responses.
  2. completeAddressDetails.js: maps DQE address completion responses.

DQE Templates

Templates are used for rendering address suggestions and validation results:

  • Address Suggestions: addressSuggestions.isml
  • Address Validation Results: addressValidationSuggestions.isml

Email Validation

The entry point for email validation is the validate method in the scripts/dqe/dqeEmailValidator.js file. It receives an email string value and validates it with the DQE API, using the current DQE preferences and DQE response code mappings.

The email validation result is represented as an object with the following properties:

  • status (string): validation status. Possible values are valid, invalid, and warn.
  • message (string): validation message.
  • suggestions (array of strings): suggested values, if any.
  • error (boolean): indicates whether an error occurred during validation.

Phone Validation

The entry point for phone validation is the validate method in the scripts/dqe/dqePhoneValidator.js file. It receives phone and country code string values and validates them with the DQE API, using the current DQE preferences and DQE response code mappings.

The phone validation result is represented as an object with the following properties:

  • status (string): validation status. Possible values are valid, invalid, and warn.
  • message (string): validation message.
  • error (boolean): indicates whether an error occurred during validation.

Address Validation

All address-related methods are located in the scripts/dqe/dqeAddress.js file. This file provides methods for retrieving and completing address suggestions and validating address details.

To validate an address using the validateAddress method, the following fields are mandatory: address1, postalCode, city, and countryCode. The address2 and placeName fields are optional.

These fields are mapped to the Adresse string of the Address API — Check and verify an address as follows:

SFCC field DQE RNVP API request string
address1 address
postalCode zip code
city city
address2 additional address
placeName dependent

It is also possible to validate an address by providing the full Adresse string using the validateAddressString method in scripts/dqe/dqeAddress.js.

Address validation uses the DQE API and takes into account the current DQE preferences and DQE response code mappings.

The address validation result is represented as an object with the following properties:

  • status (string): validation status. Possible values are valid, invalid, and warn.
  • message (string): validation message.
  • suggestions (array of strings): suggested values, if any.
  • error (boolean): indicates whether an error occurred during validation.

DQE Codes Mapping

All DQE validation logic relies on the current DQE preferences and DQE response code mappings.

Technically, DQE code mappings are stored in SFCC as custom objects. The following custom object type definitions are part of the cartridge:

  • dqeEmailValidationConfigs
  • dqePhoneValidationConfigs
  • dqeAddressValidationConfigs

Each custom object entity has the following attributes:

  • dqeCode: key attribute mapped to the DQE response code.
  • status: validation status. Possible values are valid, warning, and blocking.
  • displayMessage: localizable message displayed to the user as the validation result.

To improve performance and avoid constant queries to custom object databases, a DQE custom cache mechanism is implemented. It caches DQE codes, validation statuses, and message values.

A corresponding DQE Business Manager module is implemented to allow specific merchants to configure DQE code mappings.

Business Manager Extensions

All DQE Business Manager customizations are part of the bm_dqe cartridge. It includes the modules below.

DQE Links

The DQE links BM section contains useful DQE-related links that can be accessed from Business Manager.

DQE Codes Mappings

A corresponding DQE Business Manager module is implemented to allow specific merchants to configure DQE code mappings. Under the hood, all mappings are stored in the system as custom objects.

DQE Site Preferences

The DQE Site Preferences module can be used as an alternative way to configure DQE-related site preferences. It can be used when a BM user role does not have access to all site preference modules but still needs to manage DQE-related settings.

Related to

Was this article helpful?

0 out of 0 found this helpful