Use this document to install the Bolt custom cartridge with a loyalty integration.
Please follow the steps below to create a loyalty account using Bolt.
Path: int_bolt_embedded_sfra\cartridge\scripts\util\oauthUtils.js
- To create a loyalty account, create an account code in the createPlatformAccount function. Please see the screenshots below:

//-----------Create Account into Annexcloud----------------------//
var createUserJSONObj = {};
createUserJSONObj.id =externalProfile.email;
createUserJSONObj.email =externalProfile.email;
createUserJSONObj.firstName =externalProfile.first_name;
createUserJSONObj.lastName=externalProfile.last_name;
createUserJSONObj.phoneNumber='';
createUserJSONObj.optInStatus='YES';
createUserJSONObj.status='ACTIVE';
var giveUserScriptObj = require('int_annexcloud_sfra_v3/cartridge/scripts/loyaltyprogram/createCustomerAPI');
var giveUserResponse = giveUserScriptObj.createCustomerUsingBolt(createUserJSONObj);
//var giveUserJsonObj = JSON.parse(giveUserResponse);
//---------------------End Create Account into Annexcloud-----------//- Add a new loyalty payment option tab into the Bolt custom cartridge.
Path: int_bolt_embedded_sfra_custom\cartridge\templates\default\checkout\billing\paymentOptions\paymentOptionsContent.isml

<isif condition="${paymentOption.ID === 'ANNEXCLOUD'}">
<isinclude template="checkout/billing/paymentOptions/ANNEXCLOUDContent" />
</isif>- Add a payment summary option tab into the Bolt custom cartridge.
Path: int_bolt_embedded_sfra_custom\cartridge\templates\default\checkout\billing\paymentOptions\paymentOptionsTabs.isml

<iscomment> === Annex Cloud Addition START === </iscomment>
<isif condition="${paymentOption.ID === 'ANNEXCLOUD'}">
<isinclude template="checkout/billing/paymentOptions/ANNEXCLOUDTab" />
</isif>- Add the loyalty as payment tab into the Bolt custom embedded cartridge.
Path: int_bolt_embedded_sfra_custom\cartridge\templates\default\checkout\billing\paymentOptions\paymentOptionsTabs.isml
<iscomment> === Annex Cloud Addition START === </iscomment>
<isif condition="${paymentOption.ID === 'ANNEXCLOUD'}">
<isinclude template="checkout/billing/paymentOptions/ANNEXCLOUDTab" />
</isif>- Add the Order API code on the Bolt order confirmation page.
Path: int_bolt_embedded_sfra_custom\cartridge\templates\default\checkout\confirmation\confirmation.isml

<isif condition="${dw.system.Site.getCurrent().getCustomPreferenceValue('acEnableSaleTrack')}">
<isinclude template="util/modules_annexcloud"/>
<issaletracker sadebug="0"/>
</isif>
<isOrderApi sadebug="0"/>