Create utils.py
Browse files
utils.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Reserved for later (logging, validations, Salesforce connection etc.)
|
2 |
+
|
3 |
+
def validate_data(data):
|
4 |
+
return all([
|
5 |
+
isinstance(data.get("amount"), (int, float)),
|
6 |
+
isinstance(data.get("lead_score"), (int, float)),
|
7 |
+
data.get("stage") in ["Prospecting", "Qualified", "Proposal", "Negotiation", "Closed Won", "Closed Lost"]
|
8 |
+
])
|