import adplay
# Initialize the Intelligence client
client = adplay.Intelligence("sk_live_...")
# Fetch user intelligence profile
profile = client.users.get("user_a1f2b3")
print(f"Intent
score: {profile.intent_score}")
print(f"Segment:
{profile.segment}")
> Intent score: 0.94
> Segment: power_user
# Get predictive recommendations
for rec in
profile.recommendations:
print(f"{rec.action}:
confidence={rec.confidence}")
> send_upgrade_modal: confidence=0.91
> trigger_success_email: confidence=0.87
# Activate next best action
client.activate("upgrade_flow", user=profile)
> Action queued: OK (32ms)
import adplay
# Initialize the Intelligence client
client = adplay.Intelligence("sk_live_...")
# Fetch user intelligence profile
profile = client.users.get("user_a1f2b3")
print(f"Intent
score: {profile.intent_score}")
print(f"Segment:
{profile.segment}")
> Intent score: 0.94
> Segment: power_user
# Get predictive recommendations
for rec in
profile.recommendations:
print(f"{rec.action}:
confidence={rec.confidence}")
> send_upgrade_modal: confidence=0.91
> trigger_success_email: confidence=0.87
# Activate next best action
client.activate("upgrade_flow", user=profile)
> Action queued: OK (32ms)