From 342557a4fe0ae6049ba3df8afeb9811f55498288 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Wed, 18 Sep 2024 18:48:17 -0400 Subject: [PATCH] Cleaned some files. Created DoorDash directory to test Braze Api calls. --- ...learning_path_completed_banner.html.liquid | 21 +++++++++++++++++-- Delivery Log | 5 ----- Scripts/DoorDash/braze_test.py | 19 +++++++++++++++++ 3 files changed, 38 insertions(+), 7 deletions(-) delete mode 100644 Delivery Log create mode 100644 Scripts/DoorDash/braze_test.py diff --git a/Custom_Templates/customer_templates/Walmart Luminate Prod/_learning_path_completed_banner.html.liquid b/Custom_Templates/customer_templates/Walmart Luminate Prod/_learning_path_completed_banner.html.liquid index 5bbecb22..8a5372fa 100644 --- a/Custom_Templates/customer_templates/Walmart Luminate Prod/_learning_path_completed_banner.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Luminate Prod/_learning_path_completed_banner.html.liquid @@ -3,7 +3,7 @@ + src="http://i5.walmartimages.com/dfw/63925b23-1956/k2-_7dff5685-ed72-4265-a87b-662a1db8a13a.v1.png">

You earned it!

@@ -21,7 +21,7 @@ + src="http://i5.walmartimages.com/dfw/63925b23-50a2/k2-_97d19d92-39dc-4c48-8329-20b4555e38d3.v1.png">

You earned it!

@@ -33,6 +33,23 @@
+{% elsif learning_path.id == "33ef47b2-915d-4b57-b58e-dacfa34f5e3d" %} +
+ + + +
+

You earned it!

+

+ Congratulations, you're Walmart Luminate Customer and Shopper Insights Certified. Click the button below to add your accomplishment to LinkedIn!

+ +
+
{% else %}
diff --git a/Delivery Log b/Delivery Log deleted file mode 100644 index 0ed4fe21..00000000 --- a/Delivery Log +++ /dev/null @@ -1,5 +0,0 @@ -SELECT ca.communication_id, p.email, ca.created_at, ca.delivered_at, ca.opened_at, ca.errored_at, ca.status FROM communication_activities ca -JOIN schools s ON ca.school_id = s.id -JOIN customers c ON s.customer_id = c.id -JOIN people p ON ca.person_id = p.id -WHERE s.id = 8285; diff --git a/Scripts/DoorDash/braze_test.py b/Scripts/DoorDash/braze_test.py new file mode 100644 index 00000000..0deb8bbc --- /dev/null +++ b/Scripts/DoorDash/braze_test.py @@ -0,0 +1,19 @@ +import requests + +BRAPI = "da467de9-162a-47eb-9556-4609b543f005" +HEADERS = {"Content-Type": "application/json", "Authorization": f"Bearer {BRAPI}"} +URL = "https://rest.iad-06.braze.com" +PAYLOAD = { + "attributes": [ + { + "email": "chris.wise@doordash.com", + "gainsightce_attempt_number": 1, + "gainsightce_course_progress": 75, + "gainsightce_course_name": "Fake Test Course", + "gainsightce_last_activity_completed": "DoorDash Is the Best!", + } + ] +} +response = requests.post(f"{URL}/users/track", headers=HEADERS, json=PAYLOAD) +print(response.text) +print(response.status_code)