| Line 9... |
Line 9... |
| 9 |
import in.shop2020.crm.SearchFilter;
|
9 |
import in.shop2020.crm.SearchFilter;
|
| 10 |
import in.shop2020.crm.Ticket;
|
10 |
import in.shop2020.crm.Ticket;
|
| 11 |
import in.shop2020.crm.TicketCategory;
|
11 |
import in.shop2020.crm.TicketCategory;
|
| 12 |
import in.shop2020.crm.TicketPriority;
|
12 |
import in.shop2020.crm.TicketPriority;
|
| 13 |
import in.shop2020.crm.TicketStatus;
|
13 |
import in.shop2020.crm.TicketStatus;
|
| - |
|
14 |
import in.shop2020.util.SendGrid;
|
| 14 |
import in.shop2020.model.v1.order.Attribute;
|
15 |
import in.shop2020.model.v1.order.Attribute;
|
| 15 |
import in.shop2020.model.v1.order.LineItem;
|
16 |
import in.shop2020.model.v1.order.LineItem;
|
| 16 |
import in.shop2020.model.v1.order.Order;
|
17 |
import in.shop2020.model.v1.order.Order;
|
| 17 |
import in.shop2020.model.v1.order.OrderStatus;
|
18 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 18 |
import in.shop2020.model.v1.order.Transaction;
|
19 |
import in.shop2020.model.v1.order.Transaction;
|
| Line 604... |
Line 605... |
| 604 |
if(!profitMandiTicketCategoryList.contains(ticket.getCategory())){
|
605 |
if(!profitMandiTicketCategoryList.contains(ticket.getCategory())){
|
| 605 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
606 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
| 606 |
Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
|
607 |
Arrays.asList(customerEmailId), CRMConstants.CRM_EMAIL_SENDOR,
|
| 607 |
subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
|
608 |
subject, body, null, CRMConstants.CRM_EMAIL_TYPE, null, null, 1));
|
| 608 |
}else{
|
609 |
}else{
|
| - |
|
610 |
try{
|
| - |
|
611 |
SendGrid sendgrid = new SendGrid("profitmandi", "pma20aug");
|
| - |
|
612 |
SendGrid.Email email = new SendGrid.Email();
|
| - |
|
613 |
email.setFrom(CRMConstants.PROFIT_MANDI_EMAIL_SENDER);
|
| - |
|
614 |
email.addTo(customerEmailId);
|
| - |
|
615 |
email.addBcc("backup@saholic.com");
|
| - |
|
616 |
email.setSubject(subject);
|
| - |
|
617 |
email.setHtml(body);
|
| - |
|
618 |
sendgrid.send(email);
|
| - |
|
619 |
|
| - |
|
620 |
} catch(Exception e){
|
| - |
|
621 |
log.error("Error while sending mail to user:- "+customerEmailId+" ticket Id:- "+ticket.getId(), e);
|
| - |
|
622 |
}
|
| - |
|
623 |
|
| 609 |
activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
624 |
/*activity.setUserEmailId(helperClient.saveUserEmailForSending(
|
| 610 |
Arrays.asList(customerEmailId), CRMConstants.PROFIT_MANDI_EMAIL_SENDER,
|
625 |
Arrays.asList(customerEmailId), CRMConstants.PROFIT_MANDI_EMAIL_SENDER,
|
| 611 |
subject, body, null, CRMConstants.PROFIT_MANDI_EMAIL_TYPE, null, null, 1));
|
626 |
subject, body, null, CRMConstants.PROFIT_MANDI_EMAIL_TYPE, null, null, 1));*/
|
| 612 |
}
|
627 |
}
|
| 613 |
|
628 |
|
| 614 |
String plainTextbody = new Source(body).getTextExtractor().toString();
|
629 |
String plainTextbody = new Source(body).getTextExtractor().toString();
|
| 615 |
|
630 |
|
| 616 |
// We change activityType to OTHER when pop up box for email
|
631 |
// We change activityType to OTHER when pop up box for email
|