Configuring PreScreen
This section is relevant, if you’re doing pre-screening through Enhanced Digital Suite on your website. The EDS SDK supports both Batch and Real-Time prescreen processes.
Real-Time Prescreen
With Real-time Prescreen, you will submit the user’s information to Enhanced Digital Suite. If approved, an overlay with their pre-approval offer will automatically display to the user. If the user is not approved or if they already have an account, the request will complete in the background and the customer will not see an overlay.
The Setup method call has some additional information about the buyer's name and address you should pass in this scenario. Then, the SubmitRtps method is provided a configuration object. When called, the method will seamlessly determine a customer’s approval decision for a CARD product.
For example, the setup() and submitRtps() methods could be called as follows:
// Helper function to log all events and data callback during development
BreadPayments.on('CARD:*', function(data) {
console.log(this.event, data);
});
// Called once before calling submitRTPS
BreadPayments.setup({
loyaltyID: 'xxxxxx',
env: 'STAGE',
storeNumber: '1234567', // replace with actual value from ADS
buyer: {
givenName: 'Jack',
familyName: 'Seamus', additionalName: 'C.', birthDate: '1974-08-21',
email: '[email protected]',
phone: '+13235323423',
billingAddress: {
address1: '323 something lane', address2: 'apt. B',
country: 'USA',
locality: 'NYC',
region: 'NY',
postalCode: '11222',
},
},
});
BreadPayments.submitRtps({
financingType: 'card',
locationType: 'checkout', // homepage, landing, search, product, category, banner, checkout cart
// If you want to mock out the rtps flow use the following
mockResponse: 'success', // 'success', 'noHit', 'makeOffer', 'ackknowledge', 'existingAccount', 'existingOffer', 'newOffer', 'error';
});
A reference to the supported fields for the SubmitRtps method can be found here: UnifiedRtpsConfig
Batch Prescreen
With Batch Prescreen, the user will have been sent a communication (email or direct mail) about a prescreened offer and will be navigating to your site from that communication.
Typically there will be a landing vanity url indicating the user is trying to lookup/accept a prescreen offer (i.e. 'brand.com/card/accept').
For Batch prescreens, we re-use the same SDK method call as Real-Time prescreens (The SubmitRtps method). For batch, there is also no need to provide the name/address information during the setup() method call. The Setup method would only be needed to set the env (and potentially storeNumber).
For email-based Batch process, the link the customer clicked within the email should add a prescreenId to the url queryString. All you need to do is trigger submitRtps and the sdk will detect the id from the queryString automatically and send the user into the batch experience instead of RTPS.
For direct-mail-based Batch process, you should call the submitRtps method with customerAcceptedOffer set to true to indicate the customer is coming from a mailed offer.
// Helper function to log all events and data callback during development
BreadPayments.on('CARD:*', function(data) {
console.log(this.event, data);
});
// Called once before calling submitRTPS
BreadPayments.setup({
loyaltyID: 'xxxxxx',
env: 'STAGE',
storeNumber: '1234567', // replace with actual value from ADS
});
//Email-based example
//prescreenId could be passed here manually, but typically we detect it
//automatically from the urlQuery, i.e. brand.com/card/accept?prescreenId=abc
BreadPayments.submitRtps({
financingType: 'card',
locationType: 'checkout', // homepage, landing, search, product, category, banner, checkout cart
// If you want to mock out the prescreen flow use the following
mockResponse: 'success', // 'success', 'noHit', 'makeOffer', 'ackknowledge', 'existingAccount', 'existingOffer', 'newOffer', 'error';
});
//Direct-Mail-based example
BreadPayments.submitRtps({
financingType: 'card',
customerAcceptedOffer: true, //this in the key indicator for direct-mail batch
locationType: 'checkout', // homepage, landing, search, product, category, banner, checkout cart
// If you want to mock out the rtps flow use the following
mockResponse: 'success', // 'success', 'noHit', 'makeOffer', 'ackknowledge', 'existingAccount', 'existingOffer', 'newOffer', 'error';
});
Updated over 1 year ago