Subversion Repositories SmartDukaan

Rev

Rev 13438 | Rev 14882 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3206 mandeep.dh 1
/**
2
 * 
3
 */
4
package in.shop2020.util;
5
 
3269 mandeep.dh 6
import in.shop2020.model.v1.order.OrderStatus;
7
 
8
import java.util.Arrays;
4020 mandeep.dh 9
import java.util.Collections;
13438 amit.gupta 10
import java.util.HashMap;
3269 mandeep.dh 11
import java.util.List;
13438 amit.gupta 12
import java.util.Map;
3269 mandeep.dh 13
 
3206 mandeep.dh 14
/**
15
 * @author mandeep
16
 *
17
 * Class containing constants used across CRM
18
 */
19
public class CRMConstants {
4241 anupam.sin 20
    public static final String ATTACHMENTS_ARCHIVE_DIR = "/var/crm/archive/";
3206 mandeep.dh 21
    public static final String CRM_EMAIL_SENDOR = "help@saholic.com";
22
    public static final String CRM_EMAIL_TYPE   = "CRMInfo";
23
    public static final String CRM_SUBJECT_PREFIX_FOR_TICKET_ID = "Saholic#";
3339 mandeep.dh 24
    public static final long   ADMIN_AGENT_ID   = 1;
4605 anupam.sin 25
    public static final int DESCRIPTION_MAX_WIDTH = 8000;
3339 mandeep.dh 26
 
3269 mandeep.dh 27
    public static final List<OrderStatus> failedStatusList = Arrays.asList(new OrderStatus[] {
4484 rajveer 28
            OrderStatus.RTO_RESHIPPED,
3269 mandeep.dh 29
            OrderStatus.PAYMENT_FAILED,
4484 rajveer 30
            OrderStatus.RTO_REFUNDED,
3269 mandeep.dh 31
            OrderStatus.DOA_INVALID_REFUNDED,
32
            OrderStatus.DOA_INVALID_RESHIPPED,
33
            OrderStatus.DOA_VALID_REFUNDED,
4452 rajveer 34
            OrderStatus.DOA_VALID_RESHIPPED,
4682 rajveer 35
            OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
3269 mandeep.dh 36
            OrderStatus.REJECTED,
37
            OrderStatus.FAILED});
13438 amit.gupta 38
 
39
    @SuppressWarnings("serial")
40
	public static final Map<Long, String> PAYMENT_GATEWAYS = Collections.unmodifiableMap(
41
    		new HashMap<Long, String>(){
42
	    		{
43
	    			put(1l,"hdfc");
44
	    			put(2l,"ebs");
45
	    			put(3l,"Cheque");
46
	    			put(4l,"COD");
47
	    			put(5l,"hdfc-emi-3");
48
	    			put(6l,"rtgs");
49
	    			put(8l,"Wallet");
50
	    			put(9l,"GiftVoucher");
51
	    			put(10l,"hdfc-emi-6");
52
	    			put(11l,"hdfc-emi-9");
53
	    			put(12l,"hdfc-emi-12");
54
	    			put(13l,"innoviti");
55
	    			put(14l,"hdfc-emi-18");
56
	    			put(15l,"Amazon");
57
	    			put(16l,"Ebay");
58
	    			put(17l,"Flipkart");
59
	    			put(18l,"Snapdeal");
60
	    			put(19l,"PAYU");
61
	    		}
62
    		});
4020 mandeep.dh 63
 
64
    public static enum EscalationMatrix {
14025 manish.sha 65
        SHIPPING_AND_DELIVERY("Product shipping and delivery related issues", Arrays.asList(34, 33, 18, 47, 51)),
8228 anupam.sin 66
        RETURN_AND_REFUND("Product return, order refund, Payment status related issues", Arrays.asList(34)),
67
        CONTENT("Any questions or errors on the content about the product on our site", Arrays.asList(34, 10)),
68
        PRODUCT_AND_PRICE("Product availability and its price related enquiries", Arrays.asList(34, 13)),
69
        TECHNICAL("Any technical errors on the site (or site not working properly)", Arrays.asList(34, 35)),
14025 manish.sha 70
        ORDER_CANCELLATION("Cancelling an order", Arrays.asList(33, 34, 51)),
9693 manish.sha 71
        BULK_DEAL("Any bulk deals related enquiries", Arrays.asList(34)),
8228 anupam.sin 72
        PROMOTION_MARKETING_PARTNERSHIP("Any promotion, marketing or partnership proposals' related queries", Arrays.asList(34, 41)),
14025 manish.sha 73
        COD_VERIFICATION("Any COD verification related tickets", Arrays.asList(34, 51)),
8228 anupam.sin 74
        ON_TIME_GUARANTEE("On Time Guarantee related enquiries",Arrays.asList(18, 47, 34)),
14025 manish.sha 75
        RECHARGE_RELATED("Recharge related", Arrays.asList(34, 33, 51)),
76
        DELIVERY_PROBLEM("", Arrays.asList(34, 33, 47, 18, 51)),
77
        OTHER("Any other issues", Arrays.asList(33, 34, 51));
4020 mandeep.dh 78
 
79
        private String description;
80
        private List<Integer> agentIds;
81
 
82
        EscalationMatrix(String description, List<Integer> agentIds) {
83
            this.description = description;
84
            this.agentIds    = agentIds;
85
        }
86
 
87
        public String getDescription() {
88
            return description;
89
        }
90
 
91
        public List<Integer> getAgentIds() {
92
            return agentIds;
93
        }
94
    };
4241 anupam.sin 95
 
96
    public static enum CODCancelMatrix {
4793 amar.kumar 97
    	INVALID_ADDRESS_PIN_CODE_PHONE("Address/PinCode/Phone number provided by customer"),
98
    	NOT_PICKING("Customer is not picking the call"),
99
    	NOT_REACHABLE_SWITCHED_OFF("Customer number is not reachable or switched off"),
4241 anupam.sin 100
        LOWER_PRICE_AVAILABLE_ELSEWHERE("Customer getting better price elsewhere"),
101
        CUSTOMER_TESTING_WEBSITE("Customer is testing the site"),
102
        DUPLICATE_BOOKING("Customer booked an order twice by mistake"),
103
        DEALER_ORDER("Order was place by a dealer"),
104
        OUT_OF_STOCK("Ordered item is out of stock"),
4681 amar.kumar 105
        CUSTOMER_WANTS_EARLY_DELIVERY("Customer wants order to be delivered before promised and expected date"),
106
        NOT_INTERESTED_THIS_TIME("Customer decided against buying the product"),
107
        WANT_SOME_OTHER_PRODUCT("Customer wants to buy different product"),
108
        PLACED_ANOTHER_ORDER("Customer has placed another order buying different product"),
109
        USER_WANTS_DELAYED_DELIVERY("Customer wants order to be delivered after promised and expected date"),
110
        COLOR_OUT_OF_STOCK("Order Item(s) not present in the requested color"),
4689 anupam.sin 111
        CUSTOMER_WANTS_OPEN_DELIVERY("Customer wants to pay money after seeing the product"),
6543 anupam.sin 112
        CUSTOMER_DENIED_PLACING_ORDER("Customer denied placing any order on our site"),
7956 anupam.sin 113
        PAYMENT_FLAGGED_BY_GATEWAY("This payment is flagged"),
4681 amar.kumar 114
        OTHER("Order cancelled because of some miscellaneous reason");
4241 anupam.sin 115
 
116
        private String description;
117
 
118
        CODCancelMatrix(String description) {
119
            this.description = description;
120
        }
121
 
122
        public String getDescription() {
123
            return description;
124
        }
125
    };
5203 amar.kumar 126
 
127
    public static enum ActivityCommonDescriptionMatrix{
128
    	BULK_INQUIRY("Customer wanted to know about bulk order"),
129
    	CALL_HUNGUP_DISCONNECTED("Call got disconnected or was hung up by customer"),
130
    	COD_VERIFICATION("Call to customer to verify COD"),
131
        COMPLAINT_OR_DELIVERY_ISSUE("Call for complaint or delivery issue from customer"),
132
        COURIER_PARTNER_DETAIL("Customer wanted to know about courier partner"),
133
        ORDER_CANCELLATION("Customer wanted to cancel order"),
134
        ORDER_STATUS("Customer wanted to know status of order"),
135
        PAYMENT_MODE_QUERY("Customer wantedinformation about payment mode"),
136
        PRODUCT_QUERY("Customer wanted to ask questions about product"),
137
        PROMOTION_CALL("Promotion call"),
138
        RETURN_OR_REFUND("Return or Refund"),
139
        TEST_CALL("test call"),
140
        VOICE_ISSUE_OR_TECHNICAL_ISSUE("voice issue or technical issue"),
141
        WRONG_CALL("wrong call");
142
 
143
        private String description;
144
 
145
        ActivityCommonDescriptionMatrix(String description) {
146
            this.description = description;
147
        }
148
 
149
        public String getDescription() {
150
            return description;
151
        }
152
 
153
    };
154
 
3206 mandeep.dh 155
}