Rev 20167 | Rev 20305 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/****/package in.shop2020.util;import in.shop2020.crm.TicketCategory;import in.shop2020.model.v1.order.OrderStatus;import java.util.ArrayList;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 String ADWORDS_EMAIL = "adwords@shop2020.in";public static final String ADWORDS_PASSWORD = "adwords_shop2020";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, 65, 47, 33)), 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(65, 34, 33)), 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, 33)), ON_TIME_GUARANTEE("On Time Guarantee related enquiries", Arrays.asList(65, 47, 34)), RECHARGE_RELATED("Recharge related", Arrays.asList(34, 33)), DELIVERY_PROBLEM("", Arrays.asList(34, 47, 65, 33)), OTHER("Any other issues",Arrays.asList(65, 34, 33));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, 33)), PM_RECHARGE_FAILED_OR_COMPLAINT("Customer complaint about recharge", Arrays.asList(34, 33)), PM_WALLET_AMOUNT_ISSUE("Some issue in wallet amount", Arrays.asList(34, 33)), PM_ORDER_NOT_SHOWING("Customer Order not showing at App", Arrays.asList(34, 33)), PM_BULK_INQUIRY("Customer wanted to know about bulk purchase inquiry", Arrays.asList(34, 33)), PM_TAX_INVOICE_ISSUE("Customer wanted to complaint about tax invoice", Arrays.asList(34, 33)), PM_ORDER_STATUS_SAHOLIC_ORDER("Customer wanted to know status of order", Arrays.asList(34, 33)), PM_PRODUCT_DEMAND("Customer wanted information about any product demand", Arrays.asList(34, 33)), PM_PRICING_ERROR("Customer wanted to ask questions about some error in pricing",Arrays.asList(34, 33)), PM_TECHNICAL_ISSUE("Some technical issue at app", Arrays.asList(34, 33));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;}};public enum Actionable {NO_ACTION(0), EMAIL_PROVIDER_REATTEMPT_DELIVERY(1);private int value;Actionable(int value) {this.value = value;}public int getValue() {return value;}};@SuppressWarnings("serial")public static final Map<TicketCategory, List<String>> CATEGORY_ACTION_MAP = Collections.unmodifiableMap(new HashMap<TicketCategory, List<String>>() {{for (TicketCategory category : TicketCategory.values()) {put(category, new ArrayList<String>());}put(TicketCategory.UNDELIVERED, Arrays.asList(new String[] {Actionable.NO_ACTION.toString(),Actionable.EMAIL_PROVIDER_REATTEMPT_DELIVERY.toString() }));put(TicketCategory.DELIVERY_ATTEMPT_FAILED,Arrays.asList(new String[] {Actionable.NO_ACTION.toString(),Actionable.EMAIL_PROVIDER_REATTEMPT_DELIVERY.toString() }));}});public static enum LogisticProvider {BLUEDART(1), ARAMEX(2), DELHIVERY(3), REDEXPRESS(6), FEDEX(7), FEDEX_SURFACE(46);private long value;private LogisticProvider(long value) {this.value = value;}public long getValue() {return value;}public static LogisticProvider findByValue(long value) {int v = (int) value;switch (v) {case 1:return BLUEDART;case 2:return ARAMEX;case 3:return DELHIVERY;case 6:return REDEXPRESS;case 7:return FEDEX;case 46:return FEDEX_SURFACE;default:return null;}}}@SuppressWarnings("serial")public static final Map<LogisticProvider, List<String>> LOGISTIC_PROVIDER_MAP = Collections.unmodifiableMap(new HashMap<LogisticProvider, List<String>>() {{put(LogisticProvider.BLUEDART,Arrays.asList(new String[] {"SunilB@bluedart.com,AnilKumar@bluedart.com,HarshaK@bluedart.com,AveekP@bluedart.com","khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com" }));put(LogisticProvider.DELHIVERY,Arrays.asList(new String[] {"client.support@delhivery.com,aakershit.gupta@delhivery.com,mamta.bhandari@delhivery.com,shinu.mathew@delhivery.com,ohm.chaudhury@delhivery.com","khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com" }));put(LogisticProvider.FEDEX,Arrays.asList(new String[] {"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com","khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com" }));put(LogisticProvider.FEDEX_SURFACE,Arrays.asList(new String[] {"india@fedex.com,adesh.kumar@fedex.com,priyap@fedex.com","khushal.bhatia@shop2020.in,amit.sirohi@shop2020.in,himanshu.pandey@shop2020.in,shiv.kumar@shop2020.in,shailesh.kumar@saholic.com" }));}});}