Wednesday, November 5, 2014

StoreCreditCard in ATG

This page will provide you overview of the store credit card, idea about store credit and how it work in atg application.  We trying to answer simple question like what is store credit card, how it is used in retail domain, how it works/implemented in ATG?

What is store credit card?
Store Credit Card is a kind of credit card where the role of bank is played by the store, and only the payment can be made in the store or at the online site of the issuing retailer. It can also be consider as mode of payment, where the credit is provided by store itself and can be used to pay for the orders.

By now I guess you might have got idea about store credit card, now let’s move to next question 

How it is used in Retail domain?
In the retail domain many giant company provide some point or credit amount which can be used to make purchase in their store or online sites. It will be for many reasons as sometimes it is goodwill gesture for the new customer, or sometimes it is a kind of discount when customer is not total happy with the product but will to pay less.  It return of point will be in form of the point in the loyalty card, or return of money in the credit card which is maintained by the store, so that it can be used for paying for other orders.
  • The loyalty points more over when purchasing of certain product or make a purchase of more than a fixed amount. Loyalty points are than converted into some discount coupons which can be redeem against the order for the offer.
  • Store Credit card are the amount when are provide by the store or customer agent in some special case, than you will be having a fixed amount when can be used to make payment at store POC or at the online site of the same retailer

How it works/implemented in ATG?
This is more of a technical detail of the how store credit used in ATG; it will be implemented in different way in different retail platform, even in the ATG platform we will find it working in different style as per the customization made in accordance to the retailer. But any where it is another mode of making the payment.

     Introducing the store credit card make the site as multiple payment/ split payment capable site as every site will be having the basic credit card payment mode enable. So it good to just have an idea about the “how split/ multi payment mode working in the ATG”. In simple term the user will be able to use multiple ways to pay the order, and mean while user can choose to pay in multiple way with amount spilt across the different mode.

     Store credit card is part of the claimable repository in ATG and added in the system by CSC Agent or any third party integration (If the credits are distributed/maintained outside ATG system).
Store credits are related to profiles using the property owner Id which is a profile ID of the user which it belong to. When user is taken to payment page, we can display the available store credit and the amount each store credit card have with them. Store credit card can be used partially or completely as on the implementation of the retailer. Once the user decide to use the store credit card, than he/she will have to add the store credit card number and the amount need to take from SCC. User can use multiple SCC (as per OOTB) functionality, which can be customized as per the retailers requirements.

     Each SCC as consider as a different payment group and are added to the order with its order payment relationship will have the amount which needs to take from the SCC.

     It is will be consider same of the credit card, in the ATG system, by say this we mean that the store credit payment group will also have 3 major functionality associated to it , that is authorize, debit and credit.

Below are the task performed as part of the 3 functionality.
Authorize:  It will add the amount to the authorized amount property of the store credit card, as it will be locked for the order and cannot be used for the other order. It is similar to the authorization calls which are made the bank in the case of credit card, but as our site itself is act as bank for the store credit card, we don’t have any external call to be made.

Debit: It will debit the amount from the credit card, and the amount will reduced the amount in the amount Remaining property of the credit card, and now this means that the amount is consumed by the store, the amount is also reduced by the authorized amount property. It is similar to that of a settlement which is made to bank when order is fulfilled. This call is also made in the fulfillment pipeline of the commerce pipeline.

Credit: It will credit the amount back to store credit card & the amount will be added to the remaining amount and it is done in case the order is return or the refund performed whereas the order was paid using store credit card. It is similar to that of refunding calls made to back to return back the amount in case of order return or refunding is performed by user/store.

Let us see some of the important classes which are involved in the store Credit implementation
  •  AvailableStoreCredits: It is droplet used to display the store credit information to user. It will take the profile as input and provides list of store credits as store Credits, and also the total (sum of the entire amount in store credits) amount of the credit which can be used to pay for the order.
  • PaymentGroupFormHandler: We don’t have in build  functionality, we can add the custom code to add the payment group and the CommerceIdentifierPaymentInfoContainer, than the call the applyPaymentGroups, to apply the store credit card.
  • StoreCredit: This is the bean class for the store credit item descriptor in order to handle the payment group related to the store credits. It hold the key information need to related between the order and the store credit, such as when it was applied, amount which is taken from the SCC,  profileID,  StoreCreditNumber,  authorized status object, debit status object and credit status object.
  • StoreCreditStatus : This is bean class for the Store credit Status Item descriptor in order repository. It is property in the storeCredit, which hold the information related to status, like transaction ID, Transaction time, expiration time and type of status like authorization, debit or credit.
  • OrderTools:  Order tools is one of the important and main component as it hold the information about the bean to item descriptor mapping and bean to type mapping for creating the store credit.
  • GenericStoreCreditInfo : It is bean class used by the store StoreCreditCardProcessor , it contain the basic information related to store credit to perform the authorization, debit or credit, It is input parameter for the method and filled in the ProcCreateStoreCreditInfo to passed it the StoreCreditCardProcessor to perform the operations.
  • StoreCreditCardProcessorImpl  : It is class which is called by the paymentManager to perform the authorization, debit or credit related to store Credit. It classes the respective method of claimable Manager to perform modification to store Credit Card and update the order with appropriate Status Information.
  • PaymentManager: It is component which runs the processes through payment chain to perform the 3 operation on the store Credit. It adding the required data in the args & runs the process chain which intern call the processing methods to perform operations and also update the states in payment Group (store Credit). It also has the mapping of the PaymentGroup bean (StoreCredit) to the respective processing components. Chain name mapped to the bean class.

 The Store credit processing can be called from the Payment Pipeline and commerce Pipeline.

1 comment: