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