| Line 38... |
Line 38... |
| 38 |
crmServiceClient = CRMClient().get_client()
|
38 |
crmServiceClient = CRMClient().get_client()
|
| 39 |
userServiceClient = UserClient().get_client()
|
39 |
userServiceClient = UserClient().get_client()
|
| 40 |
for customerFeedBack in customerFeedbacks:
|
40 |
for customerFeedBack in customerFeedbacks:
|
| 41 |
ticket = Ticket()
|
41 |
ticket = Ticket()
|
| 42 |
activity = Activity()
|
42 |
activity = Activity()
|
| 43 |
ticket.assigneeId = 34
|
43 |
ticket.assigneeId = long(34)
|
| 44 |
ticket.creatorId = 1
|
44 |
ticket.creatorId = long(1)
|
| 45 |
user = userServiceClient.getUserByEmail(customerFeedBack.email)
|
45 |
user = userServiceClient.getUserByEmail(customerFeedBack.email)
|
| 46 |
if 'Cant see my order' in customerFeedBack.subject:
|
46 |
if 'Cant see my order' in customerFeedBack.subject:
|
| 47 |
ticket.category = TicketCategory.PROFITMANDI_ORDER_NOT_SEEN
|
47 |
ticket.category = TicketCategory.PROFITMANDI_ORDER_NOT_SEEN
|
| 48 |
ticket.priority = TicketPriority.HIGH
|
48 |
ticket.priority = TicketPriority.HIGH
|
| 49 |
elif 'Cashback' in customerFeedBack.subject:
|
49 |
elif 'Cashback' in customerFeedBack.subject:
|
| Line 59... |
Line 59... |
| 59 |
ticket.category = TicketCategory.PROFITMANDI_OTHER
|
59 |
ticket.category = TicketCategory.PROFITMANDI_OTHER
|
| 60 |
ticket.priority = TicketPriority.MEDIUM
|
60 |
ticket.priority = TicketPriority.MEDIUM
|
| 61 |
ticket.description = 'User Specified Subject :- '+ customerFeedBack.subject + ' | ' + customerFeedBack.message
|
61 |
ticket.description = 'User Specified Subject :- '+ customerFeedBack.subject + ' | ' + customerFeedBack.message
|
| 62 |
ticket.customerEmailId = customerFeedBack.email
|
62 |
ticket.customerEmailId = customerFeedBack.email
|
| 63 |
if user is not None and user.userId !=-1:
|
63 |
if user is not None and user.userId !=-1:
|
| 64 |
ticket.customerId = user.userId
|
64 |
ticket.customerId = long(user.userId)
|
| 65 |
ticket.status = TicketStatus.OPEN
|
65 |
ticket.status = TicketStatus.OPEN
|
| 66 |
#ticket.openDate = customerFeedBack.created
|
66 |
#ticket.openDate = customerFeedBack.created
|
| 67 |
ticket.customerMobileNumber = customerFeedBack.mobile
|
67 |
ticket.customerMobileNumber = customerFeedBack.mobile
|
| 68 |
ticket.customerName = customerFeedBack.customerName
|
68 |
ticket.customerName = customerFeedBack.customerName
|
| 69 |
|
69 |
|
| 70 |
activity.creatorId = 1
|
70 |
activity.creatorId = long(1)
|
| 71 |
activity.ticketAssigneeId = ticket.assigneeId
|
71 |
activity.ticketAssigneeId = ticket.assigneeId
|
| 72 |
activity.type = ActivityType.RECEIVED_EMAIL_FROM_CUSTOMER
|
72 |
activity.type = ActivityType.RECEIVED_EMAIL_FROM_CUSTOMER
|
| 73 |
activity.description = 'User Specified Subject :- '+ customerFeedBack.subject + ' | ' + customerFeedBack.message
|
73 |
activity.description = 'User Specified Subject :- '+ customerFeedBack.subject + ' | ' + customerFeedBack.message
|
| 74 |
activity.ticketCategory = ticket.category
|
74 |
activity.ticketCategory = ticket.category
|
| 75 |
activity.ticketDescription = ticket.description
|
75 |
activity.ticketDescription = ticket.description
|
| 76 |
activity.ticketPriority = ticket.priority
|
76 |
activity.ticketPriority = ticket.priority
|
| 77 |
activity.ticketStatus = ticket.status
|
77 |
activity.ticketStatus = ticket.status
|
| 78 |
activity.customerEmailId = customerFeedBack.email
|
78 |
activity.customerEmailId = customerFeedBack.email
|
| 79 |
if user is not None and user.userId !=-1:
|
79 |
if user is not None and user.userId !=-1:
|
| 80 |
activity.customerId = user.userId
|
80 |
activity.customerId = long(user.userId)
|
| 81 |
activity.customerName = customerFeedBack.customerName
|
81 |
activity.customerName = customerFeedBack.customerName
|
| 82 |
activity.customerMobileNumber = customerFeedBack.mobile
|
82 |
activity.customerMobileNumber = customerFeedBack.mobile
|
| 83 |
#activity.creationTimestamp = customerFeedBack.created
|
83 |
#activity.creationTimestamp = customerFeedBack.created
|
| 84 |
activity.userEmailId = customerFeedBack.email
|
84 |
activity.userEmailId = customerFeedBack.email
|
| 85 |
|
85 |
|