Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion orchestrator/api/shopify.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ class SyncRequest(BaseModel):
"triggers": [
{"type": "time_on_page", "seconds": 20},
],
"frequency_cap": {"scope": "session", "max_pops": 1},
# product_session keys the frequency-cap slot by product handle, so the
# opener fires once PER product per session rather than once for the whole
# session across every product page (the old "session" behaviour).
"frequency_cap": {"scope": "product_session", "max_pops": 1},
"greeting_source": "agent_with_canned_fallback",
"canned_fallback": "Need a hand finding the right product?",
"agent_timeout_ms": 1500,
Expand Down
2 changes: 1 addition & 1 deletion orchestrator/tests/test_widget_proactive_prd007.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_default_widget_proactive_shape():
assert cfg["enabled"] is False, "must default to OFF — opt-in"
assert cfg["page_types"] == ["product"]
assert cfg["triggers"] == [{"type": "time_on_page", "seconds": 20}]
assert cfg["frequency_cap"] == {"scope": "session", "max_pops": 1}
assert cfg["frequency_cap"] == {"scope": "product_session", "max_pops": 1}
assert cfg["greeting_source"] == "agent_with_canned_fallback"
assert cfg["canned_fallback"] == "Need a hand finding the right product?"
assert cfg["agent_timeout_ms"] == 1500
Expand Down
Loading