Subversion Repositories SmartDukaan

Rev

Rev 16244 | Rev 20152 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * 
 */
package in.shop2020.util;

import in.shop2020.model.v1.order.OrderStatus;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author mandeep
 *
 * Class containing constants used across CRM
 */
public class CRMConstants {
    public static final String ATTACHMENTS_ARCHIVE_DIR = "/var/crm/archive/";
    public static final String CRM_EMAIL_SENDOR = "Saholic <help@saholic.com>";
    public static final String PROFIT_MANDI_EMAIL_SENDER = "ProfitMandi <help@profitmandi.com>";
    public static final String CRM_EMAIL_TYPE   = "CRMInfo";
    public static final String PROFIT_MANDI_EMAIL_TYPE   = "ProfitMandiInfo";
    public static final String CRM_SUBJECT_PREFIX_FOR_TICKET_ID = "Saholic#";
    public static final String PROFIT_MANDI_SUBJECT_PREFIX_FOR_TICKET_ID = "ProfitMandi#";
    public static final long   ADMIN_AGENT_ID   = 1;
    public static final int DESCRIPTION_MAX_WIDTH = 8000;

    public static final List<OrderStatus> failedStatusList = Arrays.asList(new OrderStatus[] {
            OrderStatus.RTO_RESHIPPED,
            OrderStatus.PAYMENT_FAILED,
            OrderStatus.RTO_REFUNDED,
            OrderStatus.DOA_INVALID_REFUNDED,
            OrderStatus.DOA_INVALID_RESHIPPED,
            OrderStatus.DOA_VALID_REFUNDED,
            OrderStatus.DOA_VALID_RESHIPPED,
            OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
            OrderStatus.REJECTED,
            OrderStatus.FAILED});
    
    @SuppressWarnings("serial")
        public static final Map<Long, String> PAYMENT_GATEWAYS = Collections.unmodifiableMap(
                new HashMap<Long, String>(){
                        {
                                put(1l,"hdfc");
                                put(2l,"ebs");
                                put(3l,"Cheque");
                                put(4l,"COD");
                                put(5l,"hdfc-emi-3");
                                put(6l,"rtgs");
                                put(8l,"Wallet");
                                put(9l,"GiftVoucher");
                                put(10l,"hdfc-emi-6");
                                put(11l,"hdfc-emi-9");
                                put(12l,"hdfc-emi-12");
                                put(13l,"innoviti");
                                put(14l,"hdfc-emi-18");
                                put(15l,"Amazon");
                                put(16l,"Ebay");
                                put(17l,"Flipkart");
                                put(18l,"Snapdeal");
                                put(19l,"PAYU");
                        }
                });

    public static enum EscalationMatrix {
        SHIPPING_AND_DELIVERY("Product shipping and delivery related issues", Arrays.asList(34, 18, 47, 51)),
        RETURN_AND_REFUND("Product return, order refund, Payment status related issues", Arrays.asList(34)),
        CONTENT("Any questions or errors on the content about the product on our site", Arrays.asList(34, 10)),
        PRODUCT_AND_PRICE("Product availability and its price related enquiries", Arrays.asList(34, 13)),
        TECHNICAL("Any technical errors on the site (or site not working properly)", Arrays.asList(34, 35)),
        ORDER_CANCELLATION("Cancelling an order", Arrays.asList(18, 34, 51)),
        BULK_DEAL("Any bulk deals related enquiries", Arrays.asList(34)),
        PROMOTION_MARKETING_PARTNERSHIP("Any promotion, marketing or partnership proposals' related queries", Arrays.asList(34, 41)),
        COD_VERIFICATION("Any COD verification related tickets", Arrays.asList(34, 51)),
        ON_TIME_GUARANTEE("On Time Guarantee related enquiries",Arrays.asList(18, 47, 34)),
        RECHARGE_RELATED("Recharge related", Arrays.asList(34, 51)),
        DELIVERY_PROBLEM("", Arrays.asList(34, 47, 18, 51)),
        OTHER("Any other issues", Arrays.asList(18, 34, 51));

        private String description;
        private List<Integer> agentIds;

        EscalationMatrix(String description, List<Integer> agentIds) {
            this.description = description;
            this.agentIds    = agentIds;
        }

        public String getDescription() {
            return description;
        }

        public List<Integer> getAgentIds() {
            return agentIds;
        }
    };
    
    
    public static enum PMEscalationMatrix {
        PM_CASH_BACK_INQUIRY("Customer wanted to know about cash back", Arrays.asList(34, 51)),
        PM_RECHARGE_FAILED_OR_COMPLAINT("Customer complaint about recharge", Arrays.asList(34, 51)),
        PM_WALLET_AMOUNT_ISSUE("Some issue in wallet amount", Arrays.asList(34, 51)),
        PM_ORDER_NOT_SHOWING("Customer Order not showing at App", Arrays.asList(34, 51)),
        PM_BULK_INQUIRY("Customer wanted to know about bulk purchase inquiry", Arrays.asList(34, 51)),
        PM_TAX_INVOICE_ISSUE("Customer wanted to complaint about tax invoice", Arrays.asList(34, 51)),
        PM_ORDER_STATUS_SAHOLIC_ORDER("Customer wanted to know status of order", Arrays.asList(34, 51)),
        PM_PRODUCT_DEMAND("Customer wanted information about any product demand", Arrays.asList(34, 51)),
        PM_PRICING_ERROR("Customer wanted to ask questions about some error in pricing", Arrays.asList(34, 51)),
        PM_TECHNICAL_ISSUE("Some technical issue at app", Arrays.asList(34, 51));

        private String description;
        private List<Integer> agentIds;

        PMEscalationMatrix(String description, List<Integer> agentIds) {
            this.description = description;
            this.agentIds    = agentIds;
        }

        public String getDescription() {
            return description;
        }

        public List<Integer> getAgentIds() {
            return agentIds;
        }
    };
    
    public static enum CODCancelMatrix {
        INVALID_ADDRESS_PIN_CODE_PHONE("Address/PinCode/Phone number provided by customer"),
        NOT_PICKING("Customer is not picking the call"),
        NOT_REACHABLE_SWITCHED_OFF("Customer number is not reachable or switched off"),
        LOWER_PRICE_AVAILABLE_ELSEWHERE("Customer getting better price elsewhere"),
        CUSTOMER_TESTING_WEBSITE("Customer is testing the site"),
        DUPLICATE_BOOKING("Customer booked an order twice by mistake"),
        DEALER_ORDER("Order was place by a dealer"),
        OUT_OF_STOCK("Ordered item is out of stock"),
        CUSTOMER_WANTS_EARLY_DELIVERY("Customer wants order to be delivered before promised and expected date"),
        NOT_INTERESTED_THIS_TIME("Customer decided against buying the product"),
        WANT_SOME_OTHER_PRODUCT("Customer wants to buy different product"),
        PLACED_ANOTHER_ORDER("Customer has placed another order buying different product"),
        USER_WANTS_DELAYED_DELIVERY("Customer wants order to be delivered after promised and expected date"),
        COLOR_OUT_OF_STOCK("Order Item(s) not present in the requested color"),
        CUSTOMER_WANTS_OPEN_DELIVERY("Customer wants to pay money after seeing the product"),
        CUSTOMER_DENIED_PLACING_ORDER("Customer denied placing any order on our site"),
        PAYMENT_FLAGGED_BY_GATEWAY("This payment is flagged"),
        OTHER("Order cancelled because of some miscellaneous reason");

        private String description;

        CODCancelMatrix(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    };
    
    public static enum ActivityCommonDescriptionMatrix{
        BULK_INQUIRY("Customer wanted to know about bulk order"),
        CALL_HUNGUP_DISCONNECTED("Call got disconnected or was hung up by customer"),
        COD_VERIFICATION("Call to customer to verify COD"),
        COMPLAINT_OR_DELIVERY_ISSUE("Call for complaint or delivery issue from customer"),
        COURIER_PARTNER_DETAIL("Customer wanted to know about courier partner"),
        ORDER_CANCELLATION("Customer wanted to cancel order"),
        ORDER_STATUS("Customer wanted to know status of order"),
        PAYMENT_MODE_QUERY("Customer wantedinformation about payment mode"),
        PRODUCT_QUERY("Customer wanted to ask questions about product"),
        PROMOTION_CALL("Promotion call"),
        RETURN_OR_REFUND("Return or Refund"),
        TEST_CALL("test call"),
        VOICE_ISSUE_OR_TECHNICAL_ISSUE("voice issue or technical issue"),
        WRONG_CALL("wrong call");

        private String description;

        ActivityCommonDescriptionMatrix(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }

    };
    
    public static enum ActivityPMCommonDescriptionMatrix{
        CASH_BACK_INQUIRY("Customer wanted to know about cash back"),
        RECHARGE_FAILED_OR_COMPLAINT("Customer complaint about recharge"),
        WALLET_AMOUNT_ISSUE("Some issue in wallet amount"),
        ORDER_NOT_SHOWING("Customer Order not showing at App"),
        BULK_INQUIRY("Customer wanted to know about bulk purchase inquiry"),
        TAX_INVOICE_ISSUE("Customer wanted to complaint about tax invoice"),
        ORDER_STATUS_SAHOLIC_ORDER("Customer wanted to know status of order"),
        PRODUCT_DEMAND("Customer wanted information about any product demand"),
        PRICING_ERROR("Customer wanted to ask questions about some error in pricing"),
        TECHNICAL_ISSUE("Some technical issue at app");

        private String description;

        ActivityPMCommonDescriptionMatrix(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }

    };

}