[30388f42] Infrastructure Hardening: Repaired CE/Connector DB schema, fixed frontend styling build, implemented robust echo shield in worker v2.1.1, and integrated Lead Engine into gateway.
This commit is contained in:
36
connector-superoffice/check_crmscript.py
Normal file
36
connector-superoffice/check_crmscript.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv(override=True)
|
||||
from superoffice_client import SuperOfficeClient
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
sys.stdout.reconfigure(line_buffering=True)
|
||||
|
||||
def check_crmscript():
|
||||
client = SuperOfficeClient()
|
||||
|
||||
print(f"🚀 Checking CRMScript capability...")
|
||||
|
||||
# 1. Check if we can list scripts
|
||||
try:
|
||||
# Agents/CRMScript/GetCRMScripts
|
||||
res = client._post("Agents/CRMScript/GetCRMScripts", payload={"CRMScriptIds": []}) # Empty array usually gets all or error
|
||||
if res:
|
||||
print(f"✅ Can access CRMScripts. Response type: {type(res)}")
|
||||
else:
|
||||
# Try GET Archive
|
||||
print("⚠️ Agent access failed/empty. Trying Archive...")
|
||||
res = client._get("Archive/dynamic?$select=all&$top=1&entity=crmscript")
|
||||
if res:
|
||||
print(f"✅ CRMScript Entity found in Archive.")
|
||||
else:
|
||||
print(f"❌ CRMScript Entity NOT found in Archive.")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ Exception checking CRMScript: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_crmscript()
|
||||
Reference in New Issue
Block a user