Loyalty points

Hi ,
I need a small inofrimation about loyalty points features in atg.do we have any loyalty points fetarures available in CRS? if not could you please tell some idea about how to implement this features?
Thanks,
Pveedu
l

Hi pveedu1      
i think we don need any customization in OrderPriceEngine. Instead, While calling the CommitOrderFormHandler.commitOrder method write your logic there. Means assign some loyalty point for profile based on the order total. By this we can add loyalty point to the user.
Another Task is create a PaymentGroup called loyaltyPoint like Credit Card by that the user can use this points for the next purchase.
For Creating new http://docs.oracle.com/cd/E26180_01/Platform.94/ATGCommProgGuide/html/s1008extendingthepaymentprocesstosupp01.html refer this.
Regards
Kumaresh Babu A

Similar Messages

  • Loyalty points are stored in which entity?

    Hi,
    I need to integrate Siebel's loyalty management with ATG and for That I need to know What is the data that flows from Siebel to ATG for loyalty functionality.
    So I need to know below things-
    In which entity loyalty/reward points are stored in Siebel or Where exactly is the loyalty points in Siebel?
    Regards,
    Prateek

    There are several tables that hold variant info .. you can find these in SE11 / SE16 looking for VARI*  e.g. VARID Variant directory, VARIT Variant texts -> but most of the time you should go through SAP function modules to read the contents of these e.g. RS_VARIANT_CONTENTS, as some of the data is held in INDX-type tables that you won't want to decode yourself...
    Jonathan

  • Help with Java covert 5 loyalty points into 1 credit code.

    Can u please provide the code so that:
    Loyalty points can be converted into credits (5 loyalty points = 1 credit)
    so far i have done....
    public void ConvertPoints (int cr, int loy)
    erm, these are my fields in the class
    public class Loyalty
         private static int currentId = 2000;
    private int cardId;
    private String name;
    private int rating;
    private int credits;
    private String centre;
    public int loyalty;
    my constructor:
    public Loyalty (String nam, int rat, int cred,String cen, int loyalty)
    name = nam;
    rating = rat;
    credits = 30;
    cardId = currentId++;
    centre = cen;
    loyalty = 20;
    Can u pleaseeeeee provide me the code to:
    Loyalty points can be converted into credits (5 loyalty points = 1 credit)
    thxsss help appreciated x

    public class foo {
      private int loyalty, credit;
      public foo() {}
      public int convertLoyaltyToCredits() {
        int credits = loyalty / 5;
        credit += credits;
        loyalty -= 5 * credit;
        return credit;

  • Loyalty points program

    Hi ,
    How loyalty points program done in crm distributed through third party.
    Answers will be rewarded.
    Thanks & Regards,
    Nandakumar

    Loyalty points resolved.....

  • Sample Javacard 2.2.1 Electronic wallet, Loyalty Points & StudentID applet

    Hi All,
    After nine months of researching and developing a java card applet and terminal side interface for my final year university project I was frustrated with the lack of sample code and tutorials available online.
    My applet is aimed at students as an id card containing a student id, all the features of an electronic wallet, loyalty point system protected by a pin number. Pin is changeable.
    The terminal interaction or host side application that communicates with this applet can be found in this forum under the heading "Sample Smartcardio (Host side) applet interaction application".
    As I have no finished my project I would like to share it with anyone that would like to see it.
    While I would love to write a tutorial I simply do not have the time however below is the applet I used in my project, I how for anyone that has read through java sun's tutorials this will be a help:
    package account;
    import javacard.framework.APDU;
    import javacard.framework.APDUException;
    import javacard.framework.ISO7816;
    import javacard.framework.Applet;
    import javacard.framework.ISOException;
    import javacard.framework.OwnerPIN;
    import javacard.framework.TransactionException;
    import javacard.framework.Util;
    * @Raymond_Garrett
    * DT 354-4
    *Applet ID 41 63 63 6F 75 6E 74 41 70 70 6C 65 74
    public class AccountApplet extends Applet {
         // codes of CLA byte in the command APDUs
         final static byte ACCOUNT_CLA = (byte)0xA0;
         // codes of INS byte in the command APDUs
         final static byte VERIFY_INS = (byte) 0x20;
         final static byte CREDIT_INS = (byte) 0x30;
         final static byte DEBIT_INS = (byte) 0x40;
         final static byte GET_LOYALTYPOINTS_BALANCE_INS = (byte) 0x45;
         final static byte CREDIT_LOYALTYPOINTS_INS = (byte) 0x47;
         final static byte GET_BALANCE_INS = (byte) 0x50;
         final static byte UPDATE_PIN_INS = (byte) 0x60;
         final static byte ADMIN_RESET_INS = (byte) 0x70;
         final static byte PIN_TRIES_REMAINING_INS = (byte) 0x80;
         final static byte STUDENT_NUMBER_INS = (byte) 0x90;
         // maximum Account balance
         final static short MAX_BALANCE = 10000;
         // maximum transaction amount
         final static short MAX_TRANSACTION_AMOUNT = 5000;
         // maximum number of incorrect tries before the
         // PIN is blocked
         //Changed to 4, as a safe guard all. All tests, messages and checks will use 3
         final static byte PIN_TRY_LIMIT =(byte)0x04;
         // maximum size PIN
         final static byte MAX_PIN_SIZE =(byte)0x08;
         // Applet-specific status words:
         final static short SW_NO_ERROR = (short) 0x9000;
         final static short SW_VERIFICATION_FAILED = 0x6300;
         final static short SW_PIN_VERIFICATION_REQUIRED = 0x6301;
         final static short SW_INVALID_TRANSACTION_AMOUNT = 0x6E83;
         final static short SW_EXCEED_MAXIMUM_BALANCE = 0x6E84;
         final static short SW_NEGATIVE_BALANCE = 0x6E85;
         final static short SW_PIN_TO_LONG = 0x6E86;
         final static short SW_PIN_TO_SHORT = 0x6E87;
    //     Student number (Ascii)d05106012 - (Hex)44 30 35 31 30 36 30 31 32
         private static byte[] STUDENT_NUMBER_ARRAY = {(byte)0x44, (byte)0x30, (byte)0x35, (byte)0x31, (byte)0x30, (byte)0x36, (byte)0x30, (byte)0x31, (byte)0x32};
         // instance variables declaration
         OwnerPIN pin;
         short balance = 1000; // Starting balance of decimal 1000 is 3E8 in hex
         short loyaltyPoints = 0; //Loyalty points
         // 1 Loyalty point awarded for every 100 cent spent.
          * install method
         public static void install(byte[] bArray, short bOffset, byte bLength) {
              // GP-compliant JavaCard applet registration
              new AccountApplet(bArray, (short) (bOffset + 1), bArray[bOffset]);
          * Constructor
          * @param bArray
          * @param bOffset
          * @param bLength
         private AccountApplet(byte[] bArray, short bOffset, byte bLength){
              pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
              // bArray contains the default PIN initialization value (12345)
              bArray[0] = 01;
              bArray[1] = 02;
              bArray[2] = 03;
              bArray[3] = 04;
              bArray[4] = 05;
              bOffset = 0;
              bLength = 5;
              pin.update(bArray, bOffset, bLength);
              // register the applet instance with the JCRE
              register();
         } // end of the constructor
          * Boolean is selected
         public boolean select() {
              // the applet declines to be selected
              // if the pin is blocked
              if (pin.getTriesRemaining() == 0)
                   return false;
              return true;
         } // end of select method
          * deselect
         public void deselect() {
              // reset the pin
              pin.reset();
          * Key method the gets the APDU reads the INS and calls the appropiate method
          * Process APDUs
          * @param apdu
         public void process(APDU apdu) {
              // APDU object carries a byte array (buffer) to
              // transfer incoming and outgoing APDU header
              // and data bytes between the card and the host
              // at this point, only the first five bytes
              // [CLA, INS, P1, P2, P3] are available in
              // the APDU buffer
              byte[] buffer = apdu.getBuffer();
              // return if the APDU is the applet SELECT command
              if (selectingApplet())
                   return;
              // verify the CLA byte
              if (buffer[ISO7816.OFFSET_CLA] != ACCOUNT_CLA)
                   ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
              // check the INS byte to decide which service method to call
              switch (buffer[ISO7816.OFFSET_INS]) {
              case GET_BALANCE_INS:                    getBalance(apdu);                return;
              case DEBIT_INS:                              debit(apdu);                       return;
              case CREDIT_INS:                         credit(apdu);                     return;
              case VERIFY_INS:                         verify(apdu);                    return;
              case UPDATE_PIN_INS:                    updatePin(apdu);               return;
              case ADMIN_RESET_INS:                    adminRest();                    return;
              case PIN_TRIES_REMAINING_INS:           getPinTriesRemaining(apdu); return;
              case STUDENT_NUMBER_INS:                getStudentNumber(apdu);       return;
              case GET_LOYALTYPOINTS_BALANCE_INS:     getLoyaltyPoints(apdu);      return;
              case CREDIT_LOYALTYPOINTS_INS:       creditLoyaltyPoints(apdu);      return;
              default:                    ISOException.throwIt
              (ISO7816.SW_INS_NOT_SUPPORTED);
         } // end of process method
          * verify then
          * withdraw money from the Account balance
          * @param apdu
         private void debit(APDU apdu) {
              // verify authentication
              if (!pin.isValidated()){
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
              // get the number of bytes in the
              // data field of the command APDU
              byte numBytes = buffer[ISO7816.OFFSET_LC];
              //receive data
              //data is read into apdu buffer
              //at offset ISO7816.OFFSET_CDATA
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              short shortAmount = 0;
              if (numBytes == 2){
                   shortAmount = (short) Util.getShort(buffer, ISO7816.OFFSET_CDATA);
              else if (numBytes == 1) {
                   shortAmount = (short) buffer[ISO7816.OFFSET_CDATA];
              // check the debit amount
              if (( shortAmount > MAX_TRANSACTION_AMOUNT)     || ( shortAmount < 0 )) {
                   ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
              // check the new balance
              if ((short)( balance - shortAmount)  < 0) {
                   ISOException.throwIt(SW_NEGATIVE_BALANCE);
              // debit the amount
              balance = (short)(balance - shortAmount);
              //Add loyalty points
              loyaltyPoints = (short) (loyaltyPoints + (short)(shortAmount/100));
              return;
         }          // end of debit method
         

    Code continued>>>>>>>>
          * Verify then
          * add money (credit) to the Account balance
          * @param apdu
         private void credit(APDU apdu) {
              // verify authentication
              if (!pin.isValidated()){
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
              // get the number of bytes in the     
              // data field of the command APDU
              byte numBytes = buffer[ISO7816.OFFSET_LC];
              //receive data
              //data is read into apdu buffer
              //at offset ISO7816.OFFSET_CDATA
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              short shortAmount = 0;
              if (numBytes == 2){
                   shortAmount = (short) Util.getShort(buffer, ISO7816.OFFSET_CDATA);
              else if (numBytes == 1) {
                   shortAmount = (short) buffer[ISO7816.OFFSET_CDATA];
              // check the credit amount
              if (( shortAmount > MAX_TRANSACTION_AMOUNT)     || ( shortAmount < 0 )) {
                   ISOException.throwIt(SW_INVALID_TRANSACTION_AMOUNT);
              // check the new balance
              if ((short)( balance + shortAmount)  > MAX_BALANCE) {
                   ISOException.throwIt(SW_EXCEED_MAXIMUM_BALANCE);
              // credit the amount
              balance = (short)(balance + shortAmount);
              return;
         }                                                       // end of deposit method
          * Verify then
          * Update/change pin
          * byte[] bArray is the pin
          * short bOffset is the position in the array the pin starts in the bArray
          * byte bLength is the lenght of the pin
          * @param apdu
         private void updatePin(APDU apdu) {
              //     byte[] bArray, short bOffset, byte bLength){
              //           First check the original pin
              //          verify authentication
              if (! pin.isValidated())
                   ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);
              byte[] buffer = apdu.getBuffer();
              // get the number of bytes in the
              // data field of the command APDU -- OFFSET_LC = positon 4
              byte numBytes = buffer[ISO7816.OFFSET_LC];
              // recieve data
              // data are read into the apdu buffer
              // at the offset ISO7816.OFFSET_CDATA
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              // error if the number of data bytes
              // read does not match the number in the Lc byte
              if (byteRead != numBytes) {
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
              if ( numBytes > 8 )
                   ISOException.throwIt(SW_PIN_TO_LONG);
              if ( numBytes < 4 )
                   ISOException.throwIt(SW_PIN_TO_SHORT);
              short offset_cdata = 05;          
              pin.update(buffer, offset_cdata, numBytes);
              pin.resetAndUnblock();
          *  Admin method
          *  Rest the pin attempts and unblock
          *  @param apdu
         private void adminRest() {
              try {
                   pin.resetAndUnblock();
              } catch (RuntimeException e) {
                   // TODO Auto-generated catch block
              return;
          * Credit loyatly card pints in multiples of 100
          * @param apdu
         private void creditLoyaltyPoints(APDU apdu) {
              short creditAmount = (short) ((loyaltyPoints/ 100) * 100);
              balance = (short) (balance + creditAmount);
              loyaltyPoints = (short) (loyaltyPoints - creditAmount);
              return;
          * Get number of remaining pin tries
          * @param apdu
         private void getPinTriesRemaining(APDU apdu) {
              try {
                   byte[] buffer = apdu.getBuffer();
                   // inform the JCRE that the applet has data to return
                   short le = apdu.setOutgoing();
                   // set the actual number of the outgoing data bytes
                   apdu.setOutgoingLength((byte)2);
                   // write the PinTriesRemaining into the APDU buffer at the offset 0
                   Util.setShort(buffer, (short)0, pin.getTriesRemaining());
                   // send the 2-byte balance at the offset
                   // 0 in the apdu buffer
                   apdu.sendBytes((short)0, (short)2);
              } catch (APDUException e) {
                   // TODO Auto-generated catch block
              } catch (TransactionException e) {
                   // TODO Auto-generated catch block
              } catch (ArrayIndexOutOfBoundsException e) {
                   // TODO Auto-generated catch block
              } catch (NullPointerException e) {
                   // TODO Auto-generated catch block
         } // end of getPinTriesRemaining method
          * No verification needed
          * the method returns the Account’s balance
          * @param apdu
         private void getBalance(APDU apdu) {
              byte[] buffer = apdu.getBuffer();
              // inform the JCRE that the applet has data to return
              short le = apdu.setOutgoing();
              // set the actual number of the outgoing data bytes
              apdu.setOutgoingLength((byte)2);
              // write the balance into the APDU buffer at the offset 0
              Util.setShort(buffer, (short)0, (balance));
              // send the 2-byte balance at the offset
              // 0 in the apdu buffer
              apdu.sendBytes((short)0, (short)2);
          * No verification needed
          * the method returns the Account’s loyaltyPoints balance
          * @param apdu
         private void getLoyaltyPoints(APDU apdu){
              byte[] buffer = apdu.getBuffer();
              // inform the JCRE that the applet has data to return
              short le = apdu.setOutgoing();
              // set the actual number of the outgoing data bytes
              apdu.setOutgoingLength((byte)2);
              // write the loyaltyPoints balance into the APDU buffer at the offset 0
              Util.setShort(buffer, (short)0, (loyaltyPoints));
              // send the 2-byte loyaltyPoints balance at the offset
              // 0 in the apdu buffer
              apdu.sendBytes((short)0, (short)2);
          * No verification needed
          * the method returns the student number
          * @param apdu
         private void getStudentNumber(APDU apdu) {
              byte[] buffer = apdu.getBuffer();
              // inform the JCRE that the applet has data to return
              short le = apdu.setOutgoing();
              // set the actual number of the outgoing data bytes
              apdu.setOutgoingLength((byte)STUDENT_NUMBER_ARRAY.length);
              // write the balance into the APDU buffer at the offset 0
              apdu.sendBytesLong(STUDENT_NUMBER_ARRAY, (short)0, (short) STUDENT_NUMBER_ARRAY.length);
              //     Util.setShort(buffer, (short)0, STUDENT_NUMBER_ARRAY);
              // send the 2-byte balance at the offset
              // 0 in the apdu buffer
              try {
                   apdu.sendBytes((short)0, (short)STUDENT_NUMBER_ARRAY.length);
              } catch (APDUException e) {
                   // TODO Auto-generated catch block
         } // end of getBalance method
          * Verification method to verify the PIN
          * @param apdu
         private void verify(APDU apdu) {
              byte[] buffer = apdu.getBuffer();
              // receive the PIN data for validation.
              byte byteRead = (byte)(apdu.setIncomingAndReceive());
              // check pin
              // the PIN data is read into the APDU buffer
              // starting at the offset ISO7816.OFFSET_CDATA
              // the PIN data length = byteRead
              if (pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead)
                        == false)
                   ISOException.throwIt(SW_VERIFICATION_FAILED);
         } // end of verify method
    } // end of class AccountEdited by: Raymond.garrett-Dublin on Jun 17, 2009 11:30 PM

  • POS Integration Wiki GM - Loyalty Points

    Hi ALL
    Can anybody helps me, I am going through the GM - Loyal point Wiki for POS Integration which talks about Loyal points capturing in PIPE with POSDM/CREATE_TRANSACTIONS_EXT BAPI under Retaillineitem segment. 
    I am checking the segment but shows no Loyalty fields, so can anyone helps me on this.
    Regards
    Ashok

    hi ashok,
    pls refer the following links
    https://wiki.sdn.sap.com/wiki/pages/listpages-dirview.action?key=CK&openId=66942 - 46k
    https://wiki.sdn.sap.com/wiki/pages/recentlyupdated.action?maxRecentlyUpdatedPageCount=40&key=CK - 56k
    regards
    karthik
    reward me points if usefull.

  • Loyalty Point condition 2901 inactive

    Hi Guys
        when I configuration the loyalty manangement Point to Pay
        my conditon type 2901 display inactive,the detail informatin as follow
       someone knows how to solve it ? thank you

    Hi Guys
        when I configuration the loyalty manangement Point to Pay
        my conditon type 2901 display inactive,the detail informatin as follow
       someone knows how to solve it ? thank you

  • Loyalty Program - Redemption - points to credit note for billing

    Hello everybody,
    when using loyalty program the customer can collect loyalty points.
    When it comes to redemption these points can be used to "buy" certain products.
    Now I need to know, if these points can also be transformed to a credit note which is included in the next bill (and where to find further information).
    Kind regards
    Manuel

    Hello Manuel,
    There is a report RLOY_MKTPL_RRL_SCHEDULING which can be automatically scheduled in back-ground when you create a scheduled rew ard rule(RR-S). During creation of a RR-S [ex: Type: Standard (Timed) (Expert Mode)]; you could specify the
    frequency as monthly to ensure points are credited once in a month.
    The report automatically creates mem  ber activities and processes them. If the activities have to be processed in batch mode(when the batch report runs as scheduled); set the processing engine parameter OPTION_SCHED_ACT_EXECUTE = X. If activities have to be processed as soon as they are created OPTION_SCHED_ACT_EXECUTE = (blank).
    Hope this helps.
    Best Regards
    Raja Pamireddy
    CRM marketing Moderator.

  • Good add-ons for retail, point of sale, wholesale and distrbution industry

    Hi,
    Which are the good add-ons available in India for retail, point of sale billing, wholesale and distribution industry?
    Typical requirements are:
    1. Point of sale billing
    2. Barcoding - if same item is scanned twice, the qty of the item should increase, rather than creating a new item row.
    3. Combo Offers - Buy 1 Get 1 Free, etc.
    4. Repacking of items - buy in bulk and sell in loose
    5. Support for multiple MRP for same item, example an item with old MRP is in stock, and the same item with new MRP is also in stock
    6. Loyalty Point, Membership schemes
    7. Multiple Payment Modes in same Invoice: Coupons, Card, Cash, etc.
    The add-on should work on B1 Starter Pack licenses.
    The customer operates small sized departmental stores from 3 locations, with 1 or 2 billing counters in each location, and has limited budget due to which we are suggesting B1 starter pack to him.
    Thanks.

    Hi,
    Please refer license guide for starter package: (page 10)
    http://www.rels.co.il/wp-content/uploads/2013/07/B1_90_LicenseGuide.pdf
    Also check limitation of starter package:
    SAP Business One Starter Package - SAP Business One Central
    Thanks & Regards,
    Nagarajan

  • Loyalty Management- Finance integration

    Dear All,
    At the end of the day, all loyalty points are liabilities for the companies who runs loyalty program. These liabilities in terms value (for example 10 loyalty points equal to 1 USD) has to be posted to Accounts as "Amount Payable".
    Do we have any standard integration for loyalty points posting to Accounts ECC ? 
    Regards
    Pramod 

    Hi Pramod,
    As per my knowledge, you have to develop this. Every customer will handle this scenario in a certain way and SAP has not provided a Standard solution for this topic so far.
    Regards,
    Caíque

  • Loyalty Management and R3

    Hi all
    one question: is it possible to make CRM loyalty management and ECC sales orders work together?
    I.e.: If I make a sale order in ECC will the system be able to send the data to CRM in order to make the loyalty engine (rules and so on) running?
    Up to now I am not interested on how it is possible to achieve this, but only if it is possible to do it.
    If you also know how...well...share your knowledge
    Many many thanks
    Pierluigi

    Hi Pierluigi,
    I know this is quite an old post, but I am just getting into the same subject myself. I was going through SAP Note 1331970 - Loyalty Sales order setup document which clearly states that Loyalty Management is only integrated with CRM Billing. As far as I can understand the loyalty point calculation is happening off the back of the CRM billing. So if you have ECC sales orders it is not going to work.
    I assume you have realized this by know. If you have some time, can you please update this thread what the solution was in your implementation?
    Regards,
    Csongor

  • Loyalty Management - Clarification

    Hi
    Iam configuring Loyalty Management in the system and the Backend system is R/3 . And in Standard CRM there are 3 Order types for this loyalty Managment Say one for Buy Points , Redeem Points and Transfer Points . I did the configuration according to the Help document given by SAP . Now coming to the End user Process How exactly it work
    Step 1 - I create Loyalty programme
    Step II - Customer Enroll in to the program
    Step III - What ever customer buys system will update the Loyalty Points in to the customer account
    Step IV - Now once Loyalty points reach to some extent , customer want to buy a product or service with his points / Otherwise he transfer the points / or he Buy points . -
    How exactly we have to do this in the system ??????
    Can any one send the Customer process and Employee process for the Loyalty management  (Like what customer will do and what employee do in the loyalty management)

    Hi Pradeep,
    Please refer to the help file for more information.
    http://help.sap.com/saphelp_crm70/helpdata/en/2e/26c437e5dc412db8adc99135fe3484/content.htm
    http://help.sap.com/saphelp_crm70/helpdata/en/d9/407fbbba274c8c9df0248f56cc73e9/content.htm
    http://help.sap.com/saphelp_crm70/helpdata/en/67/42ed4bf8f5460591bd302469f3b12d/content.htm
    Hope this helps.
    Regards,
    Rashmi

  • SAP POS & CRM Loyalty Management Integration

    Hi Gurus,
    Can any one please tell me how to integrate the Loyalty management in SAP Retail POS with SAP CRM 7.0, and wat are the varios perameters to be considered and how to implement it.
    Thanks In advance..
    Regards,
    Sivasankar.U

    Hi,
    For Configuring SAP POS to award double loyalty points, you can go through SAP Note 1311424.
    For implementing Loyalty Management in SAP, go through SAP Note 1250732
    For more details, check out following URL;
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/97c0a990-0201-0010-ff8a-e75fb9f85076
    Bye,
    Muralidhara

  • I gave up on getting a single SQL to do this; I don't think it's possible?

    Guys
    I asked a little while ago about a loyalty points system where the loyalties could not be revoked once awarded, so any refunds would make the points system "go into debt" internally and only start issuing loyalty points when the debt was cleared. Got an excellent SQL to do just that, and then they switched requirements on me.
    Now, loyalty points can be revoked at any time. It might be that on the 10th Sept a refund transaction dated in MARCH will be inserted that effectively wipes some loyalty points off the balance.. So I'm thinking that I have to mark transactions with a date of when they were used to create (or revoke) points
    I'm wondering if someone will sense check my logic and confirm that there isnt a way to do this with read-only SQLs:
    An UPDATE query runs, looking for transactions that have not already participated in the points scheme (points_date is null), and meet certain criteria, and setting their points_date to the current trunc(sysdate) -- this ensures that a transaction inserted in retrospect (i.e. inserted long after the date the transaction occurred) will have an effect on points
    An hour later a select query runs on all transactions that have a points_date that is not null, grouping up by the card number (cards earn points) and the value of all transactions is summed. Transactions are classed according to their points_date; those that have a points_date before today contribute to the previous_total_spend and all transactions contribute to the current_total_spend. Because there is 1 point for every $10 spent, the amounts are divided by 10, and then FLOORed/CEILed to provide a quantized representation of the number of points a card had yesterday and what is has today. The delta of the number of points from previous to current represents the number of points that should be awarded or revoked.
    I have to sum all transactions for all time rather than just do a simplistic "divide every tran by 10 then floor and thats the number of points" because customers who always spent 9.99 wouldnt accumulate any points ever when the should be entitled to one point upon their second purchase (taking their spend to 19.98)
    Here's an example code for you to play with; can someone check I've got this right/the maths is robust and if there was a way to do this in a one-step SELECT without the update (I don't see how retrospective transactions could be included properly) let me know?
    with t as(
    select '20090301' as points_date, 15 as tran_amt, '1234' as card_num from dual
    union all
    select '20090302' as points_date, 11 as tran_amt, '1234' as card_num from dual
    union all
    select '20090303' as points_date, 15 as tran_amt, '1234' as card_num from dual
    union all
    select '20090304' as points_date, 42 as tran_amt, '1234' as card_num from dual
    union all
    select '20090305' as points_date, 84 as tran_amt, '1234' as card_num from dual
    union all
    select '20090306' as points_date, -14 as tran_amt, '1234' as card_num from dual
    union all
    select '20090307' as points_date, 10 as tran_amt, '1234' as card_num from dual
    SELECT
      card_num,
      spend_today,
      spend_before,
      spend_today/10 as points_today,
      spend_before/10 as points_before,
      CASE
        WHEN spend_today < 0 THEN
          CEIL(spend_today/10)
        ELSE
          FLOOR(spend_today/10)
      END as quantized_points_today,
      CASE
        WHEN spend_before < 0 THEN
          CEIL(spend_before/10)
        ELSE
          FLOOR(spend_before/10)
      END as quantized_points_before,
      CASE
        WHEN spend_today < 0 THEN
          CEIL(spend_today/10)
        ELSE
          FLOOR(spend_today/10)
      END -
      CASE
        WHEN spend_before < 0 THEN
          CEIL(spend_before/10)
        ELSE
          FLOOR(spend_before/10)
      END as quantized_points_delta
    FROM
        SELECT
          card_num,
          SUM(TO_NUMBER(tran_amt)) as spend_today,
          SUM(CASE WHEN points_date < '20090307'--TO_CHAR(sysdate, 'YYYYMMDD')
                THEN TO_NUMBER(tran_amt) ELSE 0 END) as spend_before
        FROM
          t
        WHERE
          points_date IS NOT NULL and
          points_date <= '20090307'--TO_CHAR(sysdate, 'YYYYMMDD')
        GROUP BY
          card_num
      ) totsBy changing the hard coded dates (will be based on report run date when live) you can simulate days passing..
    Thanks in advance for any wisdoms

    Well I'm leaning the other way. I think my present MBP will be the last Apple product I buy.
    With the way Apple is going, all New Mac computers are sealed unit that don't allow the user to upgrade them in any way. They are getting more expensive initially. They are impossible to fix, even by Apple. All the parts are either soldered to the Logic Board or glued inside the case parts. The add on warranty only covers manufacturing defects and is expensive. And to fix one out of waranty is close to if not more then a new system.
    The only thing different in a Mac, and most other products Apple sells, is the operating system and the cases they come in. As for the OS both have their glitches and at this time there are no viruses that infect OS X. There is more software available for Windows. More choices as to what hardware you can use or upgrade to at a later date.
    Mac computers are becoming large iPads or iPhones with built in keyboards.
    jeremy_from_rome wrote:
    And as for the question: PC or Mac, the consensus that I hear from colleagues and friends is just as you state it: stay with Mac, be patient, work at it, and you’ll never look back! Thanks again

  • CReative Zen Vision M: AV cable alternative

    Hi guys,?I'm new to this forum so may I start with a big hello and an understandingly proud pat on the back to any of you lucky people like myself who are the recent acquirers of the faulicious Zen Vision M! As tech toys go, it's the b****cks!!?But... That ****ed ugly, hateful, and dare i say, expensi've white AV cable has left me greatly upset. Not only did Creative extort ?360 of my very precious euros for a shot at audio- visual heaven in the palm of my hand, but now they want to stick me for an extra score so I can enjoy the experience on a full- size television! Standard store bought AV cables are not compatible with the Zen Vision M, and to me this is insulting! For shame, Creative! I believed you stood for the more deviant side of the digital music industry, but alas you're another Apple in sheeps clothing!! (I'm gonna start a poll - how many minutes until this thread is removed?..)?Soooo... coming back to my original reason for posting this - is there some way of splicing and rearranging the pins on a standard AV cable to make it compatible with my new toy or will I be forced to shell out for the ungloriously white original?These little beauties are selling like hot cakes at a hot cake festival. I refuse to believe that?no-one hasn't at least contemplated this issue and any information leading to a successful result is not only welcome but greatly appreciated. Kudos to Creative for coming out with the coolest little 'look what I've got! Na na na na naa!' doohickey since God knows when but I'm beyond disgusted with this arm foced behing my back style approach to accessories!?A 95% satisfied customer,Adrian.

    Thanks you guys. It would seem I have very littl eoption but to get out my credit card and buy the ugly white s.o.b. Creative should give you loyalty points, man!! I mean, we're being forced to buy the bloody gear against our will, so why not show some sympathy? Fat chance, methinks!
    With regard to the length of thew cables reaching the tv, you can buy AV extension kits in any good TV/electrical store if you're feeling too mean to splurge on the RC kit. Also only?available in nappy white!! What gives?
    Thanks again?for the feedback you guys.
    One last question - the new updated drivers?- what do they do?
    A.

Maybe you are looking for

  • BW Download to excel - extra login window - no direct BW user possible

    Hi All, When we download a report with a hierarchy from BW to Excel we are asked to logon again. We would like to remove this logon and download the objects directly when exporting to excel. In note 516884 we found an option for removing the extra lo

  • Help -- Email no longer appears in Gmail inbox

    As of yesterday, messages no longer appear in my Gmail inbox on my HTC Incredible 2.  I can access new messages at gmail.com and using outlook on my home PC.  When I send myself a message, the phone buzzes and says I have new mail, but nothing appear

  • No Quick Poll under Content Management?

    Hi there, just a question. I have Forum Admin rights.. but under Content Management i dont see the Menuentry: Quick Poll?! Did i have to activate first anything? Regards Bjoern

  • Windows 7 32 bit drivers for HP Notebook 14-G102AU

    Hi, can anyone help me please. I need windows 7 32-bit drivers for my HP Notebook 14 G102AU. Thx in advance.

  • Menu Exit and Screen Exit

    Hi PPL, Can anybody help me out in explaining me how to find a menu exit or the Screen exit in a program...I have an requirement where i need to use both of them.. I have already posted this query , but people responded with links which had the infor