Guest User

Untitled

a guest
Jul 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. #! python3
  2. # email_template.py -> stores email templates and copies them to the clipboard
  3. import sys, pyperclip
  4.  
  5. # Yes i am aware this code is ugly and breaks PEP8. Im a n00b, cut me some slack
  6. # Future changes ->Build a GUI, add more templates
  7.  
  8. def SLA_GENERIC():
  9. CustName = input("Enter the Customers Full name:\n")
  10. DateTime = input("\n\nEnter the Date and time you are going to contact the customer -> 'today at 3pm', or 'tomorr"
  11. "w at noon'")
  12. template = 'Hello ' + CustName + ',\n\nMy name is Adam Petersen and I am the Microsoft Support Engineer who will b' \
  13. 'e working with you on your case. I have a few questions I would like to ask so that I can better und' \
  14. 'erstand the issue and help to resolve it. Are you available at ' + DateTime + ' for a phone call? If' \
  15. ' not, or if you would rather communicate over email, please let me know. I look forward to working wi' \
  16. 'th you to resolve this issue!'
  17. pyperclip.copy(template)
  18. print("\n\nTEMPLATE COPIED TO CLIPBOARD\n")
  19.  
  20. def SLA_EMAIL_ONLY():
  21. CustName = input("Enter the Customers full name:\n")
  22. template = 'Hello ' + CustName + ',\n\nThank you for contacting Microsoft Support. My name is Adam Petersen and I a' \
  23. 'm the Support engineer who will be working with you today. feel free to reach out to me at any time u' \
  24. 'sing my contact information at the bottom of this email. As you have requested email only contact, I' \
  25. ' will only reach out to you through email. However, I would be more than happy to speak over the phone' \
  26. '. Just provide me with a phone number and time/date that works best for you.\n\nIn order for me to bett' \
  27. 'er understand your problem, I have included a few questions for you. Please provide as much detail as' \
  28. ' possible. I look forward to working together and will do my best to ensure this issue is resolved as ' \
  29. 'quickly as possible.\n\n1. How does this issue affect your business activities?\n2. Are you currently' \
  30. ' working under some sort of deadline or timeline that this issue affects?\n3. How many users does ' \
  31. 'this issue affect?\n4. Can you provide a rough estimate of financial impact?\n5. Is there anything' \
  32. ' else this issue affects?\n'
  33. pyperclip.copy(template)
  34. print("\n\nTEMPLATE COPIED TO CLIPBOARD\n")
  35.  
  36. def BUSINESS_IMPACT():
  37. template = '1. How does this issue affect your business activities?\n2. Are you currently working under some sor' \
  38. 't of deadline or timeline that this issue affects?\n3. How many users does this issue affect? \n4.' \
  39. ' Is there a rough estimate on financial impact?\n'
  40. pyperclip.copy(template)
  41. print("\n\nTEMPLATE COPIED TO CLIPBOARD\n")
  42.  
  43. def SCOPE_AGREEMENT():
  44. Problem = input("Enter the problem -> will be in this format:\n'we have found a solution to your probelm of ___")
  45. template = 'You agree that this case will be considered resolved if one of the following conditions are met:\n1.' \
  46. ' We have found a solution to your problem of ' + Problem + '.\n2. There is a workaround that will help sol' \
  47. 've your business need.\n3. Show you that what you are attempting to do is not a Microsoft supported ' \
  48. 'configuration.\n4. The issue you are experiencing turns out to be a "By Design" behavior.'
  49. pyperclip.copy(template)
  50. print("\n\nTEMPLATE COPIED TO CLIPBOARD\n")
  51.  
  52.  
  53. main_loop = True
  54. while main_loop == True:
  55. print("\n\nEMAIL TEMPLATES SCRIPT.\n\n")
  56. choose_template = input("Choose your template.\n'sla gen' for SLA GENERIC\n'sla email' for SLA EMAIL ONLY\n'bi' for"
  57. " BUSINESS IMPACT\n'scope' for SCOPE AGREEMENT\nQ to quit.")
  58. if choose_template == 'sla gen':
  59. SLA_GENERIC()
  60. elif choose_template == 'sla email':
  61. SLA_EMAIL_ONLY()
  62. elif choose_template == 'bi':
  63. BUSINESS_IMPACT()
  64. elif choose_template == 'scope':
  65. SCOPE_AGREEMENT()
  66. elif choose_template == ('q' or 'Q'):
  67. print('Exiting')
  68. sys.exit()
Add Comment
Please, Sign In to add comment