From 54cddb23f12b6144cf25f0033ff750e3407a1133 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Tue, 5 Dec 2023 17:33:38 -0500 Subject: [PATCH] Renaissance notes. Updated webhook script and small items for DataSnipper. Need to finish that workflow for them... --- .../DataSnipper/hubspot-payload.json | 18 +++ CustomerNotes/Renaissance/Renaissance.md | 19 ++++ CustomerNotes/TripleSeat/TripleSeat.md | 7 ++ Scripts/API_Tests/create_groups.py | 107 ++++++++++-------- Scripts/API_Tests/getuuid_from_email.py | 44 +++---- Scripts/webhook_test.py | 24 ++-- 6 files changed, 137 insertions(+), 82 deletions(-) create mode 100644 CustomerNotes/Renaissance/Renaissance.md diff --git a/CustomerNotes/DataSnipper/hubspot-payload.json b/CustomerNotes/DataSnipper/hubspot-payload.json index 9a127b15..99a5336b 100644 --- a/CustomerNotes/DataSnipper/hubspot-payload.json +++ b/CustomerNotes/DataSnipper/hubspot-payload.json @@ -13,3 +13,21 @@ }, "params": {}, } + +# Updated Payload: +{ + "payload": { + "email": "awester@mjcpa.com", --> This should be removed + "company": "MJ CPA AUDIT & TAX (RSMA)", + "package": "Advanced", + "segment": "", + "industry": "ACCOUNTING", + "full_name": null, + "company_domain": "mjcpa.com", + "health_category": 1, + "contract_expires": 1716768000000, + "onboarding_stage": "Start", + "onboarding_end_date": "" + }, +params: {}, +} diff --git a/CustomerNotes/Renaissance/Renaissance.md b/CustomerNotes/Renaissance/Renaissance.md new file mode 100644 index 00000000..a3481a94 --- /dev/null +++ b/CustomerNotes/Renaissance/Renaissance.md @@ -0,0 +1,19 @@ +# Renaissance + +## 12/05/2023 + +### Looker Report for LP and Quizzes + +Feedback from October: +* email can be removed +* course name extended +* check to see if end user allowed to hide columns +* remove enroll to the course date +* move "last activity completed date" after "attempt start date" +* remove quiz progress +* New metric add - average percent correct for all quizzes in a given course +* Color Visualizations +* quiz score: less than 85% red, 85-91% light green, 92-100% dark green +* Course progress %: gradient of green starting at 50% (light) to 100% (dark) +* Default to order by name +* Question: Group name... A learner can be in multiple groups.. do we know which one(s) will surface? diff --git a/CustomerNotes/TripleSeat/TripleSeat.md b/CustomerNotes/TripleSeat/TripleSeat.md index cf99c0c1..d460b228 100644 --- a/CustomerNotes/TripleSeat/TripleSeat.md +++ b/CustomerNotes/TripleSeat/TripleSeat.md @@ -106,3 +106,10 @@ Notes: * Hubspot - CRM, but likely moving to Salesforce * Onboarding - TBD but sort of using Totango * They really need a separate instance but want to try and jam it into a single instance. Designs will be an issue. + +## 12/05/2023 + +### Core Group - Katie, Amelia, Holly + +Work on Pendo integration + diff --git a/Scripts/API_Tests/create_groups.py b/Scripts/API_Tests/create_groups.py index 8ec644ee..3c14e5aa 100644 --- a/Scripts/API_Tests/create_groups.py +++ b/Scripts/API_Tests/create_groups.py @@ -1,60 +1,67 @@ import requests import Apikeys -apikey = Apikeys.anthology +apikey = Apikeys.NORMSANDBOX groups_to_create = [ - "Academic Economics", - "Academy Use/Navigation", - "Accreditation", - "Ally", - "Anthology 101", - "Baseline", - "Beacon", - "Course Evaluations", - "Evaluate", - "CVue", - "Data Strategy", - "Digital Assistant", - "Encompass", - "Engage", - "Faculty Development", - "Finance & HCM", - "Insight", - "Learn", - "Milestone", - "Occupation Insight", - "Outcomes", - "Payroll", - "Planning", - "Portfolio", - "Power BI", - "Professional Development", - "Program Review", - "Radius", - "Raise", - "Reach", - "Student", - "Talisma", - ] + "Academic Economics", + "Academy Use/Navigation", + "Accreditation", + "Ally", + "Anthology 101", + "Baseline", + "Beacon", + "Course Evaluations", + "Evaluate", + "CVue", + "Data Strategy", + "Digital Assistant", + "Encompass", + "Engage", + "Faculty Development", + "Finance & HCM", + "Insight", + "Learn", + "Milestone", + "Occupation Insight", + "Outcomes", + "Payroll", + "Planning", + "Portfolio", + "Power BI", + "Professional Development", + "Program Review", + "Radius", + "Raise", + "Reach", + "Student", + "Talisma", +] -url = "https://api.northpass.com/v2/bulk/groups" -headers = { +# URL = "https://api.northpass.com/v2/bulk/groups" +URL = "https://api.northpass.com/v2/groups" +HEADERS = { "accept": "application/json", "content-type": "application/json", "X-Api-Key": apikey, } -payload2 = [] -for group in groups_to_create: - t1 = f"{group} - (T1)" - t2 = f"{group} - (T2)" - t3 = f"{group} - (T3)" - - payload = {"data": {"attributes": {"groups": - [{"name": t1}, - {"name": t2}, - {"name": t3}]}}} - # print(payload) - response = requests.post(url, json=payload, headers=headers) - print(response.status_code) - print(response) +PAYLOAD = { + "data": { + "attributes": { + "name": "This Is a Test" + } + } +} +# for group in groups_to_create: +# t1 = f"{group} - (T1)" +# t2 = f"{group} - (T2)" +# t3 = f"{group} - (T3)" +# +# payload = {"data": {"attributes": {"groups": +# [{"name": t1}, +# {"name": t2}, +# {"name": t3}]}}} +# print(payload) +response = requests.post(URL, json=PAYLOAD, headers=HEADERS) +print(response.status_code) +print(response.text) diff --git a/Scripts/API_Tests/getuuid_from_email.py b/Scripts/API_Tests/getuuid_from_email.py index 560118df..f7f60405 100644 --- a/Scripts/API_Tests/getuuid_from_email.py +++ b/Scripts/API_Tests/getuuid_from_email.py @@ -1,18 +1,20 @@ +import pprint import requests +import Apikeys -baseUrl = "https://api.northpass.com/v2/people/" -baseUrlname = "https://api.northpass.com/v2/people?filter[name][eq]=" -baseUrlemail = "https://api.northpass.com/v2/people?filter[email][eq]=" -apiKey = "JRDpCGQ7vSRiva6t5OkWDr5eJ" # G2 -# apiKey = "6hUfJdAartHTHhHc0WIRZYPWe" #Walmart +pp = pprint.PrettyPrinter(indent=4) +BASEURL = "https://api.northpass.com/v2/people/" +BASEURLNAME = "https://api.northpass.com/v2/people?filter[name][eq]=" +BASEURLEMAIL = "https://api.northpass.com/v2/people?filter[email][cont]=" +APIKEY = Apikeys.DATASNIPPER -def getfromName(baseUrlname, apiKey): +def getfromName(BASEURLNAME, APIKEY): name = "Someone else" - url = baseUrlname + f"{name}" + url = BASEURLNAME + f"{name}" headers = { "accept": "*/*", - "x-api-key": apiKey, + "x-api-key": APIKEY, "content-type": "application/json", } response = requests.get(url, headers=headers) @@ -28,35 +30,33 @@ def getfromName(baseUrlname, apiKey): # print(uuid) -def getfromEmail(baseUrlemail, apiKey): +def getfromEmail(BASEURLEMAIL, APIKEY): # email = "norm2test@northpass.com" # The %2B encodes the + sign in the URL. Using the + sign won't work. - email = " " - url = baseUrlemail + f"{email}" - print(url) + email = "datasnipper.com" + url = BASEURLEMAIL + f"{email}" headers = { "accept": "*/*", - "x-api-key": apiKey, + "x-api-key": APIKEY, "content-type": "application/json", } response = requests.get(url, headers=headers) - print(response) if response.status_code == 200: print("200 Error!") else: print("Another Error!") response = response.json() # print(response) - uuid = response["data"] + email = response["data"] # print("Learner ID:" ) - # print(uuid) + pp.pprint(email) -def getfromUuid(baseUrl, apiKey): +def getfromUuid(BASEURL, APIKEY): uuid = "57b2b5eb-aa56-4cee-bb32-8c678a2de1b7" - url = baseUrl + uuid + url = BASEURL + uuid headers = { "accept": "*/*", - "x-api-key": apiKey, + "x-api-key": APIKEY, "content-type": "application/json", } response = requests.get(url, headers=headers) @@ -65,6 +65,6 @@ def getfromUuid(baseUrl, apiKey): if __name__ == "__main__": - getfromUuid(baseUrl, apiKey) - # getfromEmail(baseUrlemail, apiKey) - # getfromName(baseUrlname, apiKey) + # getfromUuid(BASEURL, APIKEY) + getfromEmail(BASEURLEMAIL, APIKEY) + # getfromName(BASEURLNAME, APIKEY) diff --git a/Scripts/webhook_test.py b/Scripts/webhook_test.py index 72827d82..e401eb83 100644 --- a/Scripts/webhook_test.py +++ b/Scripts/webhook_test.py @@ -2,18 +2,22 @@ import json import requests URL = "https://webhooks.workato.com/webhooks/rest/3aa0af60-6363-4cc6-9f2a-34b9e132cc2c/hubspot-webhook" + DATA = { - "health_category": "Test value", - "package": "Test value", - "contract_expires": "Test value", - "segment": "Test value", - "onboarding_end_date": "Test value", - "onboarding_stage": "Test value", - "full_name": "Test value", - "email": "Test value", - "company": "Test value", - "industry": "Test value", + "payload": { + "company": "MJ CPA AUDIT & TAX (RSMA)", + "package": "Advanced", + "segment": "", + "industry": "ACCOUNTING", + "company_domain": "mjcpa.com", + "health_category": 1, + "contract_expires": 1716768000000, + "onboarding_stage": "Start", + "onboarding_end_date": "" + }, +"params": {}, } + HEADERS = {"content-type": "application/json"}