| 3206 |
mandeep.dh |
1 |
/**
|
|
|
2 |
*
|
|
|
3 |
*/
|
|
|
4 |
package in.shop2020.util;
|
|
|
5 |
|
| 20152 |
aman.kumar |
6 |
import in.shop2020.crm.TicketCategory;
|
| 3269 |
mandeep.dh |
7 |
import in.shop2020.model.v1.order.OrderStatus;
|
|
|
8 |
|
| 20152 |
aman.kumar |
9 |
import java.util.ArrayList;
|
| 3269 |
mandeep.dh |
10 |
import java.util.Arrays;
|
| 4020 |
mandeep.dh |
11 |
import java.util.Collections;
|
| 13438 |
amit.gupta |
12 |
import java.util.HashMap;
|
| 3269 |
mandeep.dh |
13 |
import java.util.List;
|
| 13438 |
amit.gupta |
14 |
import java.util.Map;
|
| 3269 |
mandeep.dh |
15 |
|
| 3206 |
mandeep.dh |
16 |
/**
|
|
|
17 |
* @author mandeep
|
| 20305 |
amit.gupta |
18 |
*
|
|
|
19 |
* Class containing constants used across CRM
|
| 3206 |
mandeep.dh |
20 |
*/
|
|
|
21 |
public class CRMConstants {
|
| 20305 |
amit.gupta |
22 |
public static final String ATTACHMENTS_ARCHIVE_DIR = "/var/crm/archive/";
|
|
|
23 |
public static final String CRM_EMAIL_SENDOR = "Saholic <help@saholic.com>";
|
| 23839 |
amit.gupta |
24 |
public static final String PROFIT_MANDI_EMAIL_SENDER = "Smart Dukaan <help@smartdukaan.com>";
|
| 20305 |
amit.gupta |
25 |
public static final String CRM_EMAIL_TYPE = "CRMInfo";
|
|
|
26 |
public static final String PROFIT_MANDI_EMAIL_TYPE = "ProfitMandiInfo";
|
|
|
27 |
public static final String CRM_SUBJECT_PREFIX_FOR_TICKET_ID = "Saholic#";
|
|
|
28 |
public static final String PROFIT_MANDI_SUBJECT_PREFIX_FOR_TICKET_ID = "ProfitMandi#";
|
|
|
29 |
public static final long ADMIN_AGENT_ID = 1;
|
|
|
30 |
public static final int DESCRIPTION_MAX_WIDTH = 8000;
|
|
|
31 |
public static final String ADWORDS_EMAIL = "adwords@shop2020.in";
|
|
|
32 |
public static final String ADWORDS_PASSWORD = "adwords_shop2020";
|
|
|
33 |
|
| 3339 |
mandeep.dh |
34 |
|
| 20305 |
amit.gupta |
35 |
public static final List<OrderStatus> failedStatusList = Arrays.asList(new OrderStatus[] {
|
|
|
36 |
OrderStatus.RTO_RESHIPPED,
|
|
|
37 |
OrderStatus.PAYMENT_FAILED,
|
|
|
38 |
OrderStatus.RTO_REFUNDED,
|
|
|
39 |
OrderStatus.DOA_INVALID_REFUNDED,
|
|
|
40 |
OrderStatus.DOA_INVALID_RESHIPPED,
|
|
|
41 |
OrderStatus.DOA_VALID_REFUNDED,
|
|
|
42 |
OrderStatus.DOA_VALID_RESHIPPED,
|
|
|
43 |
OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
|
|
|
44 |
OrderStatus.REJECTED,
|
|
|
45 |
OrderStatus.FAILED});
|
|
|
46 |
|
|
|
47 |
@SuppressWarnings("serial")
|
|
|
48 |
public static final Map<Long, String> PAYMENT_GATEWAYS = Collections.unmodifiableMap(
|
|
|
49 |
new HashMap<Long, String>(){
|
|
|
50 |
{
|
|
|
51 |
put(1l,"hdfc");
|
|
|
52 |
put(2l,"ebs");
|
|
|
53 |
put(3l,"Cheque");
|
|
|
54 |
put(4l,"COD");
|
|
|
55 |
put(5l,"hdfc-emi-3");
|
|
|
56 |
put(6l,"rtgs");
|
|
|
57 |
put(8l,"Wallet");
|
|
|
58 |
put(9l,"GiftVoucher");
|
|
|
59 |
put(10l,"hdfc-emi-6");
|
|
|
60 |
put(11l,"hdfc-emi-9");
|
|
|
61 |
put(12l,"hdfc-emi-12");
|
|
|
62 |
put(13l,"innoviti");
|
|
|
63 |
put(14l,"hdfc-emi-18");
|
|
|
64 |
put(15l,"Amazon");
|
|
|
65 |
put(16l,"Ebay");
|
|
|
66 |
put(17l,"Flipkart");
|
|
|
67 |
put(18l,"Snapdeal");
|
|
|
68 |
put(19l,"PAYU");
|
|
|
69 |
}
|
|
|
70 |
});
|
| 4020 |
mandeep.dh |
71 |
|
| 20305 |
amit.gupta |
72 |
public static enum EscalationMatrix {
|
|
|
73 |
SHIPPING_AND_DELIVERY("Product shipping and delivery related issues", Arrays.asList(34, 65, 33)),
|
|
|
74 |
RETURN_AND_REFUND("Product return, order refund, Payment status related issues", Arrays.asList(34, 33)),
|
|
|
75 |
CONTENT("Any questions or errors on the content about the product on our site", Arrays.asList(34, 10, 33)),
|
|
|
76 |
PRODUCT_AND_PRICE("Product availability and its price related enquiries", Arrays.asList(34, 13, 33)),
|
|
|
77 |
TECHNICAL("Any technical errors on the site (or site not working properly)", Arrays.asList(34, 35, 33)),
|
|
|
78 |
ORDER_CANCELLATION("Cancelling an order", Arrays.asList(65, 34, 33)),
|
|
|
79 |
BULK_DEAL("Any bulk deals related enquiries", Arrays.asList(34, 33)),
|
|
|
80 |
PROMOTION_MARKETING_PARTNERSHIP("Any promotion, marketing or partnership proposals' related queries", Arrays.asList(34, 41, 33)),
|
|
|
81 |
COD_VERIFICATION("Any COD verification related tickets", Arrays.asList(34, 33)),
|
|
|
82 |
ON_TIME_GUARANTEE("On Time Guarantee related enquiries",Arrays.asList(65, 34, 33)),
|
|
|
83 |
RECHARGE_RELATED("Recharge related", Arrays.asList(34, 33)),
|
|
|
84 |
DELIVERY_PROBLEM("", Arrays.asList(34, 65, 33)),
|
|
|
85 |
OTHER("Any other issues", Arrays.asList(65, 34, 33));
|
| 4020 |
mandeep.dh |
86 |
|
| 20305 |
amit.gupta |
87 |
private String description;
|
|
|
88 |
private List<Integer> agentIds;
|
| 4020 |
mandeep.dh |
89 |
|
| 20305 |
amit.gupta |
90 |
EscalationMatrix(String description, List<Integer> agentIds) {
|
|
|
91 |
this.description = description;
|
|
|
92 |
this.agentIds = agentIds;
|
|
|
93 |
}
|
| 4020 |
mandeep.dh |
94 |
|
| 20305 |
amit.gupta |
95 |
public String getDescription() {
|
|
|
96 |
return description;
|
|
|
97 |
}
|
| 4020 |
mandeep.dh |
98 |
|
| 20305 |
amit.gupta |
99 |
public List<Integer> getAgentIds() {
|
|
|
100 |
return agentIds;
|
|
|
101 |
}
|
|
|
102 |
};
|
|
|
103 |
|
|
|
104 |
|
|
|
105 |
public static enum PMEscalationMatrix {
|
| 20356 |
amit.gupta |
106 |
PM_CASH_BACK_INQUIRY("Customer wanted to know about cash back", Arrays.asList(34, 35, 33)),
|
|
|
107 |
PM_RECHARGE_FAILED_OR_COMPLAINT("Customer complaint about recharge", Arrays.asList(34, 35, 33)),
|
|
|
108 |
PM_WALLET_AMOUNT_ISSUE("Some issue in wallet amount", Arrays.asList(34, 35, 33)),
|
|
|
109 |
PM_ORDER_NOT_SHOWING("Customer Order not showing at App", Arrays.asList(34,35, 33)),
|
|
|
110 |
PM_BULK_INQUIRY("Customer wanted to know about bulk purchase inquiry", Arrays.asList(34, 35, 33)),
|
|
|
111 |
PM_TAX_INVOICE_ISSUE("Customer wanted to complaint about tax invoice", Arrays.asList(34, 35, 33)),
|
|
|
112 |
PM_ORDER_STATUS_SAHOLIC_ORDER("Customer wanted to know status of order", Arrays.asList(34, 35, 33)),
|
|
|
113 |
PM_PRODUCT_DEMAND("Customer wanted information about any product demand", Arrays.asList(34, 35, 33)),
|
|
|
114 |
PM_PRICING_ERROR("Customer wanted to ask questions about some error in pricing", Arrays.asList(34, 35, 33)),
|
| 20305 |
amit.gupta |
115 |
PM_TECHNICAL_ISSUE("Some technical issue at app", Arrays.asList(34, 33));
|
| 16244 |
manish.sha |
116 |
|
| 20305 |
amit.gupta |
117 |
private String description;
|
|
|
118 |
private List<Integer> agentIds;
|
| 16244 |
manish.sha |
119 |
|
| 20305 |
amit.gupta |
120 |
PMEscalationMatrix(String description, List<Integer> agentIds) {
|
|
|
121 |
this.description = description;
|
|
|
122 |
this.agentIds = agentIds;
|
|
|
123 |
}
|
| 16244 |
manish.sha |
124 |
|
| 20305 |
amit.gupta |
125 |
public String getDescription() {
|
|
|
126 |
return description;
|
|
|
127 |
}
|
| 16244 |
manish.sha |
128 |
|
| 20305 |
amit.gupta |
129 |
public List<Integer> getAgentIds() {
|
|
|
130 |
return agentIds;
|
|
|
131 |
}
|
|
|
132 |
};
|
|
|
133 |
|
|
|
134 |
public static enum CODCancelMatrix {
|
|
|
135 |
INVALID_ADDRESS_PIN_CODE_PHONE("Address/PinCode/Phone number provided by customer"),
|
|
|
136 |
NOT_PICKING("Customer is not picking the call"),
|
|
|
137 |
NOT_REACHABLE_SWITCHED_OFF("Customer number is not reachable or switched off"),
|
|
|
138 |
LOWER_PRICE_AVAILABLE_ELSEWHERE("Customer getting better price elsewhere"),
|
|
|
139 |
CUSTOMER_TESTING_WEBSITE("Customer is testing the site"),
|
|
|
140 |
DUPLICATE_BOOKING("Customer booked an order twice by mistake"),
|
|
|
141 |
DEALER_ORDER("Order was place by a dealer"),
|
|
|
142 |
OUT_OF_STOCK("Ordered item is out of stock"),
|
|
|
143 |
CUSTOMER_WANTS_EARLY_DELIVERY("Customer wants order to be delivered before promised and expected date"),
|
|
|
144 |
NOT_INTERESTED_THIS_TIME("Customer decided against buying the product"),
|
|
|
145 |
WANT_SOME_OTHER_PRODUCT("Customer wants to buy different product"),
|
|
|
146 |
PLACED_ANOTHER_ORDER("Customer has placed another order buying different product"),
|
|
|
147 |
USER_WANTS_DELAYED_DELIVERY("Customer wants order to be delivered after promised and expected date"),
|
|
|
148 |
COLOR_OUT_OF_STOCK("Order Item(s) not present in the requested color"),
|
|
|
149 |
CUSTOMER_WANTS_OPEN_DELIVERY("Customer wants to pay money after seeing the product"),
|
|
|
150 |
CUSTOMER_DENIED_PLACING_ORDER("Customer denied placing any order on our site"),
|
|
|
151 |
PAYMENT_FLAGGED_BY_GATEWAY("This payment is flagged"),
|
|
|
152 |
OTHER("Order cancelled because of some miscellaneous reason");
|
| 4241 |
anupam.sin |
153 |
|
| 20305 |
amit.gupta |
154 |
private String description;
|
| 4241 |
anupam.sin |
155 |
|
| 20305 |
amit.gupta |
156 |
CODCancelMatrix(String description) {
|
|
|
157 |
this.description = description;
|
|
|
158 |
}
|
| 4241 |
anupam.sin |
159 |
|
| 20305 |
amit.gupta |
160 |
public String getDescription() {
|
|
|
161 |
return description;
|
|
|
162 |
}
|
|
|
163 |
};
|
|
|
164 |
|
|
|
165 |
public static enum ActivityCommonDescriptionMatrix{
|
|
|
166 |
BULK_INQUIRY("Customer wanted to know about bulk order"),
|
|
|
167 |
CALL_HUNGUP_DISCONNECTED("Call got disconnected or was hung up by customer"),
|
|
|
168 |
COD_VERIFICATION("Call to customer to verify COD"),
|
|
|
169 |
COMPLAINT_OR_DELIVERY_ISSUE("Call for complaint or delivery issue from customer"),
|
|
|
170 |
COURIER_PARTNER_DETAIL("Customer wanted to know about courier partner"),
|
|
|
171 |
ORDER_CANCELLATION("Customer wanted to cancel order"),
|
|
|
172 |
ORDER_STATUS("Customer wanted to know status of order"),
|
|
|
173 |
PAYMENT_MODE_QUERY("Customer wantedinformation about payment mode"),
|
|
|
174 |
PRODUCT_QUERY("Customer wanted to ask questions about product"),
|
|
|
175 |
PROMOTION_CALL("Promotion call"),
|
|
|
176 |
RETURN_OR_REFUND("Return or Refund"),
|
|
|
177 |
TEST_CALL("test call"),
|
|
|
178 |
VOICE_ISSUE_OR_TECHNICAL_ISSUE("voice issue or technical issue"),
|
|
|
179 |
WRONG_CALL("wrong call");
|
| 5203 |
amar.kumar |
180 |
|
| 20305 |
amit.gupta |
181 |
private String description;
|
| 5203 |
amar.kumar |
182 |
|
| 20305 |
amit.gupta |
183 |
ActivityCommonDescriptionMatrix(String description) {
|
|
|
184 |
this.description = description;
|
|
|
185 |
}
|
| 5203 |
amar.kumar |
186 |
|
| 20305 |
amit.gupta |
187 |
public String getDescription() {
|
|
|
188 |
return description;
|
|
|
189 |
}
|
| 5203 |
amar.kumar |
190 |
|
| 20305 |
amit.gupta |
191 |
};
|
|
|
192 |
|
|
|
193 |
public static enum ActivityPMCommonDescriptionMatrix{
|
|
|
194 |
CASH_BACK_INQUIRY("Customer wanted to know about cash back"),
|
|
|
195 |
RECHARGE_FAILED_OR_COMPLAINT("Customer complaint about recharge"),
|
|
|
196 |
WALLET_AMOUNT_ISSUE("Some issue in wallet amount"),
|
|
|
197 |
ORDER_NOT_SHOWING("Customer Order not showing at App"),
|
|
|
198 |
BULK_INQUIRY("Customer wanted to know about bulk purchase inquiry"),
|
|
|
199 |
TAX_INVOICE_ISSUE("Customer wanted to complaint about tax invoice"),
|
|
|
200 |
ORDER_STATUS_SAHOLIC_ORDER("Customer wanted to know status of order"),
|
|
|
201 |
PRODUCT_DEMAND("Customer wanted information about any product demand"),
|
|
|
202 |
PRICING_ERROR("Customer wanted to ask questions about some error in pricing"),
|
|
|
203 |
TECHNICAL_ISSUE("Some technical issue at app");
|
| 16208 |
manish.sha |
204 |
|
| 20305 |
amit.gupta |
205 |
private String description;
|
| 16208 |
manish.sha |
206 |
|
| 20305 |
amit.gupta |
207 |
ActivityPMCommonDescriptionMatrix(String description) {
|
|
|
208 |
this.description = description;
|
|
|
209 |
}
|
| 16208 |
manish.sha |
210 |
|
| 20305 |
amit.gupta |
211 |
public String getDescription() {
|
|
|
212 |
return description;
|
|
|
213 |
}
|
| 16208 |
manish.sha |
214 |
|
| 20305 |
amit.gupta |
215 |
};
|
|
|
216 |
|
|
|
217 |
public enum Actionable{
|
|
|
218 |
NO_ACTION(0),
|
|
|
219 |
EMAIL_PROVIDER_REATTEMPT_DELIVERY(1);
|
|
|
220 |
|
|
|
221 |
private int value;
|
|
|
222 |
Actionable(int value){
|
|
|
223 |
this.value = value;
|
|
|
224 |
}
|
|
|
225 |
|
|
|
226 |
public int getValue(){
|
|
|
227 |
return value;
|
|
|
228 |
}
|
|
|
229 |
};
|
|
|
230 |
|
|
|
231 |
@SuppressWarnings("serial")
|
|
|
232 |
public static final Map<TicketCategory, List<String>> CATEGORY_ACTION_MAP = Collections.unmodifiableMap(
|
|
|
233 |
new HashMap<TicketCategory, List<String>>(){
|
|
|
234 |
{
|
|
|
235 |
|
|
|
236 |
for(TicketCategory category : TicketCategory.values()){
|
|
|
237 |
put(category, new ArrayList<String>());
|
|
|
238 |
}
|
|
|
239 |
put(TicketCategory.UNDELIVERED,
|
|
|
240 |
Arrays.asList(
|
|
|
241 |
new String[]{
|
|
|
242 |
Actionable.NO_ACTION.toString(),
|
|
|
243 |
Actionable.EMAIL_PROVIDER_REATTEMPT_DELIVERY.toString()
|
|
|
244 |
}
|
|
|
245 |
));
|
|
|
246 |
put(TicketCategory.DELIVERY_ATTEMPT_FAILED,
|
|
|
247 |
Arrays.asList(
|
|
|
248 |
new String[]{
|
|
|
249 |
Actionable.NO_ACTION.toString(),
|
|
|
250 |
Actionable.EMAIL_PROVIDER_REATTEMPT_DELIVERY.toString()
|
|
|
251 |
}
|
|
|
252 |
));
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
}
|
|
|
256 |
|
|
|
257 |
});
|
|
|
258 |
|
|
|
259 |
public static enum LogisticProvider{
|
|
|
260 |
BLUEDART(1),
|
|
|
261 |
ARAMEX(2),
|
|
|
262 |
DELHIVERY(3),
|
|
|
263 |
REDEXPRESS(6),
|
|
|
264 |
FEDEX(7),
|
|
|
265 |
FEDEX_SURFACE(46);
|
|
|
266 |
|
|
|
267 |
private long value;
|
|
|
268 |
|
|
|
269 |
private LogisticProvider(long value){
|
|
|
270 |
this.value = value;
|
|
|
271 |
}
|
|
|
272 |
public long getValue(){
|
|
|
273 |
return value;
|
|
|
274 |
}
|
|
|
275 |
|
|
|
276 |
public static LogisticProvider findByValue(long value) {
|
|
|
277 |
int v = (int) value;
|
|
|
278 |
switch (v) {
|
|
|
279 |
case 1:
|
|
|
280 |
return BLUEDART;
|
|
|
281 |
case 2:
|
|
|
282 |
return ARAMEX;
|
|
|
283 |
case 3:
|
|
|
284 |
return DELHIVERY;
|
|
|
285 |
case 6:
|
|
|
286 |
return REDEXPRESS;
|
|
|
287 |
case 7:
|
|
|
288 |
return FEDEX;
|
|
|
289 |
case 46:
|
|
|
290 |
return FEDEX_SURFACE;
|
|
|
291 |
default:
|
|
|
292 |
return null;
|
|
|
293 |
}
|
|
|
294 |
}
|
|
|
295 |
}
|
|
|
296 |
|
|
|
297 |
@SuppressWarnings("serial")
|
|
|
298 |
public static final Map<LogisticProvider, List<String> > LOGISTIC_PROVIDER_MAP = Collections.unmodifiableMap(
|
|
|
299 |
new HashMap<LogisticProvider, List<String>>(){
|
|
|
300 |
{
|
|
|
301 |
put(LogisticProvider.BLUEDART,
|
|
|
302 |
Arrays.asList(
|
|
|
303 |
new String[]{"SunilB@bluedart.com,AnilKumar@bluedart.com,HarshaK@bluedart.com,AveekP@bluedart.com",
|
|
|
304 |
"khushal.bhatia@shop2020.in,amit.gupta@shop2020.in,himanshu.pandey@shop2020.in,ritesh.chauhan@shop2020.in"}));
|
|
|
305 |
put(LogisticProvider.DELHIVERY,
|
|
|
306 |
Arrays.asList(
|
|
|
307 |
new String[]{"client.support@delhivery.com,aakershit.gupta@delhivery.com,mamta.bhandari@delhivery.com,shinu.mathew@delhivery.com,ohm.chaudhury@delhivery.com",
|
|
|
308 |
"khushal.bhatia@shop2020.in,amit.gupta@shop2020.in,himanshu.pandey@shop2020.in,ritesh.chauhan@shop2020.in"}));
|
|
|
309 |
put(LogisticProvider.FEDEX,
|
|
|
310 |
Arrays.asList(
|
|
|
311 |
new String[]{"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com",
|
|
|
312 |
"khushal.bhatia@shop2020.in,amit.gupta@shop2020.in,himanshu.pandey@shop2020.in,ritesh.chauhan@shop2020.in"}));
|
|
|
313 |
put(LogisticProvider.FEDEX_SURFACE,
|
|
|
314 |
Arrays.asList(
|
|
|
315 |
new String[]{"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com",
|
|
|
316 |
"khushal.bhatia@shop2020.in,amit.gupta@shop2020.in,himanshu.pandey@shop2020.in,ritesh.chauhan@shop2020.in"}));
|
|
|
317 |
|
| 16244 |
manish.sha |
318 |
|
| 20305 |
amit.gupta |
319 |
|
|
|
320 |
|
|
|
321 |
|
|
|
322 |
}
|
|
|
323 |
});
|
|
|
324 |
|
| 20152 |
aman.kumar |
325 |
|
| 3206 |
mandeep.dh |
326 |
}
|