Loyalty Program Tech Spec

Loyalty Program Tech Spec


  1. Account Registration

       1.1 Add loyalty related attributes to Profile Object in BM

             1.1.1 loyaltyNumber: String 

             1.1.2 loyaltyTier: String

             1.1.3 loyaltySignupDate: Date

             1.1.4 loyaltyPoints: String

             1.1.5 relateCustomerID: String



      1.2 New Account sign up form (new SFCC account + new Loyalty account)

          1.2.1 Break birthday field into birth month and birth year fields, create birthMonth and birthYear attributes to Profile Object in BM. If Year and Day are not provided, then use default year 1990, default day 01.

          1.2.2 Add new Loyalty fields on registration.isml: join loyalty checkbox, phoneNumber, address1, address2, city, state, postal, birthday

          1.2.3 Utilize billingaddress.xml to do validations on the new loyalty fields

          1.2.4 Verify existing Loyalty account by passing email, first name, last name, and phone number to Relate

                   Call /scripts/AccountService/CustomerLookup.ds

                   If loyalt account exist, update loyaltyNumber field in Profile.

                   If it doesn’t exist or multiple results found, create new account in Relate. Modify Account-CreateAccount, add scripts nodes AddOrUpdateCustomer.ds after CreateCustomer script node to send customer data to Relate.

           1.2.5 Modify Account-CreateAccount, add decision node and call GenerateCard.ds to create loyalty account only if loyalty checkbox is checked and loyaltyNumber is empty. Update loyaltyNumber.


     1.3 Registration form on Order Confirmation page for guest checkout (new SFCC account + new Loyalty)

              1.3.1 Add loyalty related fields to confirmationregister.isml.

              1.3.2 Modify showConfirmation() in COSummary to pre-populate customer information on the sign up form, and call Account-CreateAccountAndLogin.

              1.3.3 Account-CreateAccountLogin creates SFCC account and Loyalty Account (if loyalty checkbox is checked), and log the user in.


      1.4 Loyalty Registration form (Existing SFCC account + new Loyalty)

            1.4.1 In Account pipeline, add new start node CreateLoyaltyAccount

            1.4.2 CreateLoyaltyAccount calls GenerateCard.ds to generate Loyalty account in Relate




      2. My Account

           2.1 Login:

                2.1.1 Once logged in, Modify Login-Access

                    Call RelateAPI (customerLookup). if customer doesn’t exist in Relate, call Relate API (AddOrUpdateCustomer) to create customer in Relate.

                    If Profile.loyaltyAccount isn’t empty, call Relate API (Card Inquiry) to retrieve loyalty account details (tier, points, signup date) and update them in SFCC profile.


           2.2 My Account Landing:

                  2.2.1 Add Loyalty tile in accountoverview.isml 

                         If already a loyalty member, then display Tier, points, and Loyalty sign up date.

                         If not a loyalty member, view a message saying not a loyalty member, and provide a registration link

                                 Click on the link, redirect user to loyalty sign up form with pre-populated data from SFCC account (New form, loyaltyregistration.isml)

                  2.2.2 Add Loyalty program details link on left nav for Loyalty users only

                          Modify accountnavigation.isml, create a new link to Account-DisplayLoyaltyDetails

                  2.2.3 Display marketing materials on my account landing page

                          Create content slot "account-banner" for non-loyalty users and "account-banner-loyalty" for loyalty users in accountoverview.isml

           

             2.3 Loyalty Program details page (New Page, loyaltydetails.isml)

                2.3.1 Create a new Content Slot to display marketing material for the loyalty program

                       New content slot - slot id: loyalty-slot, context=”global”

                       Display Tier, total points, and singup join date.

                       Create a link for the terms and conditions page.


             2.4 Personal Info page

                    2.4.1 when updating personal information, call Relate API (AddorUpdateCustomer) to update the info in Relate

                           Modify Account-EditProfile, add a script node before ClearFormElement

                            Script node links to int_relate/scripts/AccountService/AddorUpdateCustomer.ds

                   2.4.2 Replace Birthday fields with Birth Month and Birth Year fields


             2.5 Address Book page

                     2.5.1 When updating default address (edit or assign default), call Relate API (AddorUpdateCustomer) to update address in Relate

                             Modify Address-Edit, add script node (AddorUpdateCustomer.ds) after script node SetDefaultAddress.ds.

                             Modify Address-Add, add script node(AddorUpdateCustomer.ds) after script node SetDefaultAddress.ds


             2.6 Email Preferences page

                    2.6.1 When updating email preferences, call Relate API (AddorUpdateCustomer) to update the info in Relate


              2.7 Order History page

                   2.7.1 Retrieve order history from Relate

                      Modify Order-History, add script node (ListOrderHistory.ds) after Account-RequireLogin. If relate API returns no response, then use the existing SFCC Order History flow.         

                      If relate API returns no response, then use the existing SFCC Order History flow.

                      If Relate API returns order history list, then use SearchSystemObject pipelet to return Unsubmitted orders from SFCC and add them to the order history list.




3. User Groups

3.1 Create three new user groups in BM:

  • Lucky Star:
    1. ID: LoyaltyStar
    2. Type: dynamic
    3. Condition:  !empty(Loyalty Number) && LoyaltyTier == Lucky Star
  • Lucky Clover
    1. ID: LoyaltyClover
    2. Type: dynamic
    3. Condition:  !empty(Loyalty Number) && LoyaltyTier == Lucky Clover
  • Lucky Insider
    1. LoyaltyInsider
    2. Type: dynamic
    3. Condition: !empty(Loyalty Number) && LoyaltyTier == Lucky Insider





4. Shipping Discounts

      4.1 Merchant Tools -> Promotions, create new shipping promotion “loyalty-free-standard-shipping”. Set 100% off on shipping level and assign it to shipping method “Standard_Ground”.

      4.2 Merchant Tools -> Promotions, create new shipping promotion “loyalty-free-second-day”. Set 100% off on shipping level and assign it to shipping method “Second_Day”.

      4.3 Merchant Tools -> Campaign, create new campaign “loyalty-free-standard-shipping”. Assign it to customer groups: loyaltyStar and LuckyClover and assign it to promotion “loyalty-free-standard-shipping”.

      4.4 Merchant Tools->Campaign, create new campaign “loyalty-free-second-day-shipping”. Assign it to customer group “loyaltyStart” and promotion “loyalty-free-second-day”.



5. Checkout 

       5.1 Create a new attribute in Order object to indicate if the customer belongs to loyalty program

             Use Loyalty number

       5.2 Redeem coupon (use controller)

             In COPlaceOrder-Start, add a script node(int_relate/scripts/api/RedeemCoupon.ds) before Mail-SecureSend



6. Birthday Coupon ($10, $15, $20)

      6.1 Create Loyalty Promotions in BM

             6.1.1 Merchant Tools -> Online Marketing -> Promotions, create promotions “Loyalty-10off”, “Loyalty-15off”, and “Loyalty-20off”.

             6.1.2 Setup Promotion rules: apply $10, $15 and $20 off on order level.

      6.2 Create a new Campaign for Loyalty in BM

                 6.2.1. Merchant Tools -> Online Marketing -> Campaigns, create “Loyalty” campaign with no start date and end date.

                 6.2.2. Assign customer groups: LoyaltyInsider, LoyaltyClover, LoyaltyStar.

                 6.2.3. Assign Promotions: “Loyalty-10off”, “Loyalty-15off”, and “Loyalty-20off”.


      6.3 Create coupons for Loyalty in BM

                6.3.1. Merchant Tools -> Online Marketing -> Coupons, create “Loyalty_10off”, “Loyalty_15off”, “Loyalty_20off” coupons with Coupon Type “Multiple Codes”.

                6.3.2. Assign to “Loyalty” campaign.


      6.4 Create a new job (Relate_Coupon_Import) in BM to import coupon codes from Relate

                6.4.1. Create new job "Relate_Coupon_Import" in Admin → Job Schedules. This job will process coupon codes upload file from Relate on a monthly basis.

                          a) SFTP Host URL: ftp1.luckybrand.com

                          b) Port: 22

                          c) User ID: demand01

                          d) Password: 1nPLMzH0

                          e) Source Folder: /feeds/relate

                          d) Target Folder: /src/coupons

                          

                6.4.2. This job will import coupon codes and assign them to a coupon (Loyalty_10, Loyalty_15, or Loyalty_20)

                          a) Execute pipeline: ImportCoupon-Start


               6.4.3. In int_relate cartridge, create ImportCoupon pipeline to import coupon codes.

               https://documentation.demandware.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FImportExport%2FCouponsandCouponCodeObjectImportExport.html&resultof=%22import%22%20%22coupon%22%20%22code%22%20

                Import File Format:

                

        

      6.5 Validate coupon

                6.5.1 In COCoupons pipelines, create a decision node to check for loyalty coupon pre-fix and another decision node to check for login status.

                      If the user is eligible to use loyalty coupon, add script node (ValidateCoupon.ds) before AddCoupon script node. Apply this change to start nodes: Apply, ApplyFromEmployee, ApplyFromBilling, ApplyFromLogin)



7. Loyalty program Signup Coupon (10%)

      7.1 Create a new dynamic customer group, New_Loyalty_Signup, with Membership Rule = “session.custom.newSignup is true”.

      7.2 Merchant Tools -> Promotions, create “new_loyalty_signup” promotion. In promotion Rule, set 10% off on Order.

      7.3 Merchant Tools -> Campaign, create new campaign “loyalty_signup” with no start date, no end date, and assign it to “New_Loylty_Signup” customer group. Assign “New_Loyalty_Signup” promotion.

      7.4 In Account- CreateLoyaltyAccount, set CurrentSession.custom.newSignup = true when Loyalty account is created.

      7.5 When order is created, set session.custom["newSignup"] = false in submit() method in COSummary.js



8. Customer Data Export to Relate

       8.1 Export all customer information for Relate

              BM -> Merchant Tool -> Customers -> Export



9. Relate Integration

9.1 Cartridge

  • Create new Cartridge, int_relate, for all Relate integration
  • Include int_relate in site cartridge path


9.2 Setup Services in SFCC:

  1. Create web service profiles ‘relate.soap.prof’. Configure timeout, circuit breaker limit.
  2. Create web service credential ‘relate.cred’. Configure URL, user name, password.
  3. Create web services: relate.soap.customerLookup, relate.soap.generateCard, relate.soap.addOrUpdateCustomer, relate.soap.validateCoupon, relate.soap.reedemCoupon, relate.soap.orderListory
  4. Create Service registry script RelateHttpsServiceInit.ds
  5. In package.jsonfile, include RelateHttpsServiceInit.ds

 

9.3 List of required Relate API

  • Add or Update Customer data
  • Customer Lookup
  • Card Inquiry
  • Generate Card
  • Redeem Coupon
  • Validate Coupon
  • Order History
  • Customer Retrieve


9.4 Add or Update Customer data


  • Sample Request:

<?xml version="1.0" encoding="UTF-8"?>
<Customers>
<Customer Action="AddorUpdate">
<!--LastUpdateInfo>
<UpdateUserID>User</UpdateUserID>
<UpdateDate>2010-04-15</UpdateDate>
</LastUpdateInfo-->
<SignupDate>2006-07-13</SignupDate>
<CustOrgTypcode>Company</CustOrgTypcode>

<Affiliation>
<RetailStoreID>99999</RetailStoreID>
</Affiliation>

<BusinessName>Newman's Own</BusinessName>

<EntityInformation>
<Individual>
<Suffix>SR</Suffix>
<Salutation>MR</Salutation>
<SortingName />

<Name>
<Name Location="First">George2</Name>
<Name Location="Middle" />
<Name Location="Last">Jones2</Name>

</Name>
<ContactInformation>
<Address PrimaryFlag="true" ValidFlag="true" TypeCode="HOME" ContactPreferenceCode="Order Info Only" Label="Special Address label">
<AddressLine1>999 Willow Oak Place</AddressLine1>
<AddressLine2>Suite 301</AddressLine2>
<AddressLine3>Forward Left</AddressLine3><City>Oklahoma City</City>
<Territory>OK</Territory>
<PostalCode>49136</PostalCode>

<Country>US</Country>
</Address>
<EMail PrimaryFlag="true" TypeCode="HOME" ContactPreferenceCode="Promotion Info Only" Label="Special Email Address label">
<EMailAddress>george.jones@somewhere.com</EMailAddress>
</EMail>
<Telephone PrimaryFlag="true" TypeCode="HOME" ContactPreferenceCode="No Phone Contact" Label="Special Phone Address label">
<PhoneNumber>4405553124</PhoneNumber>

</Telephone>
</ContactInformation>
<PersonalSummary>
<GenderType>M</GenderType>
<BirthDate>1957-04-16</BirthDate>

</PersonalSummary>

</Individual>
</EntityInformation>

<AlternateKey TypeCode="SFCC_ID">
<AlternateID>0000000046</AlternateID>
</AlternateKey>
</Customer>
</Customers>


  • Sample Response:

<Customers xmlns="http://www.nrf-arts.org/IXRetail/namespace">
     <DateTime>2018-06-14T13:21:16</DateTime>
     <Customer ResponseCode="OK">
          <CustomerID>12802065</CustomerID>
          <MaskData>false</MaskData>
     </Customer>
</Customers>


                             

9.5 Customer Lookup


  • Sample Request:
    • <Customers>
      <Customer Action="Lookup">
      <EntityInformation>
      <Individual>
      <Name>
      <Name Location="First" SearchType="Exact">test1</Name>
      <Name Location="Last" SearchType="Exact">test1</Name>
      </Name>
      <ContactInformation>
      <EMail>
      <EMailAddress>test@test4.com</EMailAddress>
      </EMail>
      </ContactInformation>
      <Telephone>
      <PhoneNumber>6788623899</PhoneNumber>
      </Telephone>
      </Individual>
      </EntityInformation>
      </Customer>
      </Customers>


  • Sample Response:

<Customers xmlns="http://www.nrf-arts.org/IXRetail/namespace">
<DateTime>2018-06-14T13:06:22</DateTime>
<Customer ResponseCode="OK">
<CustomerID>12801919</CustomerID>
<Validation ValidFlag="true"/>
<HouseholdKey/>
<LastUpdateInfo>
<UpdateUserID>Relate</UpdateUserID>
<UpdateDate>2018-05-08T14:30:52</UpdateDate>
</LastUpdateInfo>
<Affiliation>
<RetailStoreID>99999</RetailStoreID>
</Affiliation>
<EntityInformation>
<Individual>
<Name>
<Name Location="First">Test</Name>
<Name Location="Middle"/>
<Name Location="Last">Test</Name>
</Name>
<ContactInformation>
<EMail PrimaryFlag="true" TypeCode="HOME" Label="Special Email Address label" ContactPreferenceCode="PROMOTION INFO ONLY" FormatPreferenceCode="TEXT" SequenceNumber="1" ValidFlag="true">
<EMailAddress>test@test4.com</EMailAddress>
</EMail>
</ContactInformation>
<PersonalSummary>
<BirthDate>2010-01-01</BirthDate>
<MaritalStatusCode>UNKNOWN</MaritalStatusCode>
<Rent>false</Rent>
</PersonalSummary>
<SocioEconomicProfile>
<HighestEducationalLevelName/>
</SocioEconomicProfile>
<LifetimeActivitySummary>
<TotalReturnsAmount>0.000000</TotalReturnsAmount>
<TotalSalesAmount>0.000000</TotalSalesAmount>
<TotalTransactionCount>0</TotalTransactionCount>
<TotalItemsSoldCount>0</TotalItemsSoldCount>
<TotalItemsReturnedCount>0</TotalItemsReturnedCount>
</LifetimeActivitySummary>
<YearToDateActivitySummary>
<YearToDateReturnsAmount>0.000000</YearToDateReturnsAmount>
<YearToDateSalesAmount>0.000000</YearToDateSalesAmount>
<YearToDateTransactionCount>0</YearToDateTransactionCount>
<YearToDateItemsSoldCount>0</YearToDateItemsSoldCount>
<YearToDateItemsReturnedCount>0</YearToDateItemsReturnedCount>
</YearToDateActivitySummary>
</Individual>
</EntityInformation>
<PersonalPreferences>
<ContactPreference ContactType="Mail" Permission="true"/>
<ContactPreference ContactType="Phone" Permission="true"/>
<ContactPreference ContactType="Fax" Permission="true"/>
<ContactPreference ContactType="Email" Permission="true"/>
</PersonalPreferences>
<AlternateKey TypeCode="SFCC_ID">
<AlternateID>00033504</AlternateID>
</AlternateKey>
<MaskData>false</MaskData>
</Customer>
</Customers>


9.6 Card Inquiry


  • Sample Request

<CardOperation>
      <CardRequest Type="Inquiry">
           <CurrencyID>USD</CurrencyID>
           <Instrument>
                 <CardNumber>7200924671452323</CardNumber>
           </Instrument>
     </CardRequest>
</CardOperation>


  • Sample Response

<CardResponse>
<ResponseStatus status="OK">
<DateTime>2018-06-14T12:31:40</DateTime>
</ResponseStatus>
<Instrument>
<CardNumber>7200924671452323</CardNumber>
<CardSerialNumber>0000101001000004</CardSerialNumber>
<LoyaltyAccount>
<LoyaltyAccountID>97</LoyaltyAccountID>
<LoyaltyProgram Id="1">Lucky Brand Loyalty Program</LoyaltyProgram>
<LoyaltyProgramLevel Id="4">Lucky Star</LoyaltyProgramLevel>
<PointsBalance>
<Points Type="Earned">1499</Points>
<Points Type="Escrow">0</Points>
<Points Type="Bonus">0</Points>
<Points Type="YTD">1500</Points>
<Points Type="LTD">1500</Points>
</PointsBalance>
</LoyaltyAccount>
</Instrument>
<Customer>
<CustomerID>12801879</CustomerID>
</Customer>
</CardResponse>



9.7 Generate Card


  • Sample Request:

<CardSeriesMaintenance>
     <CardSeries Action="GenerateCard">
          <CardPrefix>00001</CardPrefix>
          <CardSeriesSequence>02</CardSeriesSequence>

          <Customer>
               <AlternateKey TypeCode="SFCC_ID">
                    <AlternateID>0000000045</AlternateID>
               </AlternateKey>
          </Customer>
     </CardSeries>
</CardSeriesMaintenance>


      Sample Response

<CardSeriesMaintenance xsi:schemaLocation="http://xml.datavantagecorp.com/namespace/crm/DTVCardSeriesMaintenance.xsd" xmlns="http://www.nrf-arts.org/IXRetail/namespace/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DateTime>2018-06-14T11:32:38</DateTime>
<CardSeries ResponseCode="OK">
<CardPrefix>00001</CardPrefix>
<CardSeriesSequence>02</CardSeriesSequence>
<Instrument>
<CardName>Lucky Brand Loyalty</CardName>
<InstrumentID>0000102001000154</InstrumentID>
<CardNumber>6971180754334404</CardNumber>
<BatchNumber>001</BatchNumber>
<Program Id=""/>
</Instrument>
<Customer>
<CustomerID>12801963</CustomerID>
</Customer>
</CardSeries>
</CardSeriesMaintenance>


9.8 Redeem Coupon

<PromotionMaintenance>
<CouponRedeem VoidFlag="false">
<CouponCode>43:530::FS91</CouponCode></CouponRedeem>
</PromotionMaintenance>


Sample Response:

<data contentType="application/xml; charset=UTF-8" contentLength="2"><![CDATA[]]></data>



9.9 Validate Coupon


  • Sample Request<validateCoupons>
           <couponList>LUCKYINSIDER01900SJ0000BT</couponList>
    </validateCoupons>


  • Sample Response:

<ns2:validateCouponsResponse xmlns:ns2="http://v1_0.promotion.webservices.csx.dtv.com/">
     <return>
          <couponCode>LUCKYINSIDER01900SJ0000BT</couponCode>
          <couponStatus>COUPON_VALID</couponStatus>
     </return>
</ns2:validateCouponsResponse>

 

9.10 Order History


  • Sample Request
    • <transactionsearch>
           <customerid>9822</customerid>  
           <cardnumber></cardnumber>
           <startdate></startdate>
           <enddate></enddate>
           <securityuserid>100</securityuserid>
           <lineitemtypecode></lineitemtypecode>
      </transactionsearch>


  • Sample Response

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<ns2:getTransactionHistoryResponse xmlns:ns2="http://v3_0.customer.webservices.csx.dtv.com/">
<return>
<CustomerID>9822</CustomerID>
<Transactions>
<Transaction CancelFlag="false">
<RetailStoreID>663</RetailStoreID>
<WorkstationID>2</WorkstationID>
<SequenceNumber>27722</SequenceNumber>
<BusinessDayDate>2017-12-02-08:00</BusinessDayDate>
<VoidFlag>false</VoidFlag>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:28:08.000-08:00</EndDateTime>
<OperatorID>604562</OperatorID>
<CurrencyCode>USD</CurrencyCode>
<OrgCurrencyCode>USD</OrgCurrencyCode>
<ExchangeRate>1.000000</ExchangeRate>
<RetailTransaction TransactionStatus="Delivered" TypeCode="Transaction">
<LineItem VoidFlag="false">
<SequenceNumber>1</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Sale ItemType="Stock">
<ItemID>191671204276</ItemID>
<UnitCostPrice>21.190000</UnitCostPrice>
<RegularSalesUnitPrice>119.000000</RegularSalesUnitPrice>
<ActualSalesUnitPrice>0.000000</ActualSalesUnitPrice>
<ExtendedAmount>0.000000</ExtendedAmount>
<Quantity>1.00</Quantity>
<PercentageOfItem>
<AssociateID>604562</AssociateID>
<Percentage>1.0000</Percentage>
</PercentageOfItem>
<RetailPriceModifier VoidFlag="false">
<SequenceNumber>1</SequenceNumber>
<Amount Action="Subtract">119.000000</Amount>
<PromotionID>TRN_CPN_PCT</PromotionID>
<ReasonCode>TRANSACTION_DISCOUNT</ReasonCode>
<Coupon>
<ScanCode>FREEJEANSD13</ScanCode>
</Coupon>
</RetailPriceModifier>
<RetailPriceModifier VoidFlag="true">
<SequenceNumber>0</SequenceNumber>
<Amount Action="Subtract">119.000000</Amount>
<PromotionID>ITM_PCT</PromotionID>
<ReasonCode>LINE_ITEM_DISCOUNT</ReasonCode>
</RetailPriceModifier>
</Sale>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>3</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>4</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>5</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>6</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>7</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>8</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="true">
<SequenceNumber>9</SequenceNumber>
<BeginDateTime>2017-12-02T10:27:21.000-08:00</BeginDateTime>
<EndDateTime>2017-12-02T10:27:21.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>0.000000</TaxableAmount>
<Amount>0.000000</Amount>
</Tax>
</LineItem>
<Total TotalType="TransactionNetAmount">0.000000</Total>
<Total TotalType="TransactionGrandAmount">0.000000</Total>
<Total TotalType="TransactionTaxAmount">0.000000</Total>
</RetailTransaction>
<PosTransactionProperties>
<PosTransactionPropertyCode>RECEIPT_DELIVERY_METHOD</PosTransactionPropertyCode>
<PosTransactionPropertyValue>PAPER</PosTransactionPropertyValue>
</PosTransactionProperties>
</Transaction>
<Transaction CancelFlag="false">
<RetailStoreID>663</RetailStoreID>
<WorkstationID>1</WorkstationID>
<SequenceNumber>3272</SequenceNumber>
<BusinessDayDate>2015-12-06-08:00</BusinessDayDate>
<VoidFlag>false</VoidFlag>
<BeginDateTime>2015-12-06T11:09:27.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:11:40.000-08:00</EndDateTime>
<OperatorID>123382</OperatorID>
<CurrencyCode>USD</CurrencyCode>
<OrgCurrencyCode>USD</OrgCurrencyCode>
<ExchangeRate>1.000000</ExchangeRate>
<RetailTransaction TransactionStatus="Delivered" TypeCode="Transaction">
<LineItem VoidFlag="false">
<SequenceNumber>1</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Sale ItemType="Stock">
<ItemID>803049550181</ItemID>
<UnitCostPrice>21.670000</UnitCostPrice>
<RegularSalesUnitPrice>139.000000</RegularSalesUnitPrice>
<ActualSalesUnitPrice>55.600000</ActualSalesUnitPrice>
<ExtendedAmount>55.600000</ExtendedAmount>
<Quantity>1.00</Quantity>
<PercentageOfItem>
<AssociateID>123382</AssociateID>
<Percentage>1.0000</Percentage>
</PercentageOfItem>
<RetailPriceModifier VoidFlag="false">
<SequenceNumber>0</SequenceNumber>
<Amount Action="Subtract">83.400000</Amount>
<PromotionID>TRN_EMP</PromotionID>
<ReasonCode>TRANSACTION_DISCOUNT</ReasonCode>
</RetailPriceModifier>
</Sale>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>2</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:47.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:47.000-08:00</EndDateTime>
<Sale ItemType="Stock">
<ItemID>803049628286</ItemID>
<UnitCostPrice>33.850000</UnitCostPrice>
<RegularSalesUnitPrice>139.000000</RegularSalesUnitPrice>
<ActualSalesUnitPrice>55.600000</ActualSalesUnitPrice>
<ExtendedAmount>55.600000</ExtendedAmount>
<Quantity>1.00</Quantity>
<PercentageOfItem>
<AssociateID>123382</AssociateID>
<Percentage>1.0000</Percentage>
</PercentageOfItem>
<RetailPriceModifier VoidFlag="false">
<SequenceNumber>0</SequenceNumber>
<Amount Action="Subtract">83.400000</Amount>
<PromotionID>TRN_EMP</PromotionID>
<ReasonCode>TRANSACTION_DISCOUNT</ReasonCode>
</RetailPriceModifier>
</Sale>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>4</SequenceNumber>
<BeginDateTime>2015-12-06T11:10:13.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:10:40.000-08:00</EndDateTime>
<Tender>
<TenderID>VISA</TenderID>
<Amount>121.220000</Amount>
<Authorization>
<AuthorizationCode>01263C</AuthorizationCode>
<AdjudicationCode>ELECTRONICAUTH</AdjudicationCode>
</Authorization>
</Tender>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>5</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>111.200000</TaxableAmount>
<Amount>7.220000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>6</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>111.200000</TaxableAmount>
<Amount>0.560000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>7</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>111.200000</TaxableAmount>
<Amount>0.560000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>8</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>111.200000</TaxableAmount>
<Amount>0.560000</Amount>
</Tax>
</LineItem>
<LineItem VoidFlag="false">
<SequenceNumber>9</SequenceNumber>
<BeginDateTime>2015-12-06T11:09:34.000-08:00</BeginDateTime>
<EndDateTime>2015-12-06T11:09:34.000-08:00</EndDateTime>
<Tax>
<TaxableAmount>111.200000</TaxableAmount>
<Amount>1.120000</Amount>
</Tax>
</LineItem>
<Total TotalType="TransactionNetAmount">111.200000</Total>
<Total TotalType="TransactionGrandAmount">121.220000</Total>
<Total TotalType="TransactionTaxAmount">10.020000</Total>
</RetailTransaction>
<PosTransactionProperties>
<PosTransactionPropertyCode>RECEIPT_DELIVERY_METHOD</PosTransactionPropertyCode>
<PosTransactionPropertyValue>PAPER</PosTransactionPropertyValue>
</PosTransactionProperties>
</Transaction>
</Transactions>
<SecurityPrivilege>READ_WRITE</SecurityPrivilege>
<MaskData>false</MaskData>
</return>
</ns2:getTransactionHistoryResponse>
</S:Body>
</S:Envelope>


9.11 Customer Retrieve

<Customers>
    <Customer Action="Retrieve">
        <CustomerID>12801978</CustomerID>
    </Customer>
</Customers>

  • Sample Response:

<Customers xmlns="http://www.nrf-arts.org/IXRetail/namespace">
<DateTime>2018-06-14T13:25:35</DateTime>
<Customer ResponseCode="OK">
<CustomerID>12801978</CustomerID>
<SignupDate>2018-05-31</SignupDate>
<Validation ValidFlag="true"/>
<Prospect>false</Prospect>
<HouseholdKey/>
<LastUpdateInfo>
<UpdateUserID>Relate</UpdateUserID>
<UpdateDate>2018-06-14T08:10:02</UpdateDate>
</LastUpdateInfo>
<Affiliation/>
<EntityInformation>
<Individual>
<Name>
<Name Location="First">Marina</Name>
<Name Location="Middle"/>
<Name Location="Last">Bari</Name>
</Name>
<ContactInformation>
<Address Label="Special Address label" ContactPreferenceCode="ORDER INFO ONLY" PrimaryFlag="true" TypeCode="HOME" ValidFlag="true" SequenceNumber="4">
<Country>US</Country>
<AddressLine1>2427 E 29 ST APT 1J</AddressLine1>
<City>BROOKLYN</City>
<Territory>NY</Territory>
<PostalCode>11235</PostalCode>
</Address>
<EMail PrimaryFlag="true" TypeCode="HOME" Label="Special Email Address label" ContactPreferenceCode="PROMOTION INFO ONLY" FormatPreferenceCode="TEXT" SequenceNumber="3" ValidFlag="true">
<EMailAddress>marina.bari@accenture.com</EMailAddress>
</EMail>
</ContactInformation>
<PersonalSummary>
<GenderType>M</GenderType>
<BirthDate>1992-02-02</BirthDate>
<MaritalStatusCode>UNKNOWN</MaritalStatusCode>
<Rent>false</Rent>
</PersonalSummary>
<SocioEconomicProfile>
<HighestEducationalLevelName/>
</SocioEconomicProfile>
<LifetimeActivitySummary>
<TotalReturnsAmount>0.000000</TotalReturnsAmount>
<TotalSalesAmount>0.000000</TotalSalesAmount>
<TotalTransactionCount>0</TotalTransactionCount>
<TotalItemsSoldCount>0</TotalItemsSoldCount>
<TotalItemsReturnedCount>0</TotalItemsReturnedCount>
</LifetimeActivitySummary>
<YearToDateActivitySummary>
<YearToDateReturnsAmount>0.000000</YearToDateReturnsAmount>
<YearToDateSalesAmount>0.000000</YearToDateSalesAmount>
<YearToDateTransactionCount>0</YearToDateTransactionCount>
<YearToDateItemsSoldCount>0</YearToDateItemsSoldCount>
<YearToDateItemsReturnedCount>0</YearToDateItemsReturnedCount>
</YearToDateActivitySummary>
</Individual>
</EntityInformation>
<PersonalPreferences>
<ContactPreference ContactType="Mail" Permission="true"/>
<ContactPreference ContactType="Phone" Permission="true"/>
<ContactPreference ContactType="Fax" Permission="true"/>
<ContactPreference ContactType="Email" Permission="true"/>
</PersonalPreferences>
<AlternateKey TypeCode="SFCC_ID">
<AlternateID>00337003</AlternateID>
</AlternateKey>
<EligiblePromotionDeals/>
<CustomerCards>
<Instrument Description="Lucky Brand Loyalty">
<CardNumber>0450888766157710</CardNumber>
<CardSerialNumber>0000102001000098</CardSerialNumber>
<PrimaryAccountHolderFlag>true</PrimaryAccountHolderFlag>
<AccountId Type="Loyalty">202</AccountId>
</Instrument>
</CustomerCards>
<MaskData>false</MaskData>
<SystemCurrencyCode>USD</SystemCurrencyCode>
</Customer>
</Customers>




10. Site Preferences

Administration->System Object Types, create a boolean attribute “enableLoyalty” in Site Preference and add it to group “loyalty”. Default value for “enableLoyalty” is false.

For US site, go to Merchant Tools ->SitePreferences -> loyalty and set Enable Loyalty to true.