docs(so-api): [31188f42] Diagnosis of email sending blockade & cleanup

This commit is contained in:
2026-03-05 06:19:45 +00:00
parent 56ed64cd6d
commit b33d2a0103
9 changed files with 284 additions and 77 deletions

View File

@@ -24,8 +24,9 @@ def create_test_company():
return
# Check if company already exists
existing = client.search(f"Contact?$select=contactId,name&$filter=name eq '{company_name}'")
print(f"DEBUG: Raw search response: {existing}")
if existing:
contact_id = existing[0]['ContactId']
contact_id = existing[0]['contactId']
print(f"⚠️ Company '{company_name}' already exists with ContactId: {contact_id}.")
print("Skipping creation.")
return contact_id
@@ -42,8 +43,8 @@ def create_test_company():
}
}
new_company = client._post("Contact", payload)
if new_company and "ContactId" in new_company:
contact_id = new_company["ContactId"]
if new_company and "contactId" in new_company:
contact_id = new_company["contactId"]
print(f"✅ SUCCESS! Created company '{company_name}' with ContactId: {contact_id}")
return contact_id
else: