Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Nov 2, 2025

Fixes the targeting selector dropdown not showing the 255 custom targeting keys from GAM.

Problem

The targeting selector widget wasn't loading custom targeting keys. The dropdown stayed empty showing only "-- Select a key --" placeholder, even though 255 keys were synced from GAM.

Root Cause

Field name mismatch between API response and widget JavaScript:

  • API returns: customKeys (line 136 of inventory.py)
  • Widget expected: custom_targeting_keys (line 129 of widget)

The API endpoint /api/tenant/{id}/targeting/all returns the keys in a field called customKeys, but the widget was looking for custom_targeting_keys.

Fix

Changed widget JavaScript to use data.customKeys instead of data.custom_targeting_keys to match the actual API response format.

Result

✅ Widget will now correctly populate dropdown with all 255 custom targeting keys
✅ Users can select keys and load values
✅ Custom targeting configuration now works as intended

Testing

Once deployed, refresh the edit product page and the dropdown should show all available targeting keys from GAM.

🤖 Generated with Claude Code

**Problem:**
The targeting selector widget wasn't loading the 255 custom targeting keys
from GAM. Dropdown stayed empty with "-- Select a key --" placeholder.

**Root Cause:**
Field name mismatch between API response and widget JavaScript:
- API returns: `customKeys` (line 136 of inventory.py)
- Widget expected: `custom_targeting_keys` (line 129 of widget)

**Fix:**
Changed widget to use `data.customKeys` to match API response format.

**Result:**
Widget will now correctly populate dropdown with all 255 custom targeting keys.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley merged commit 9573749 into main Nov 2, 2025
10 checks passed
danf-newton pushed a commit to Newton-Research-Inc/salesagent that referenced this pull request Nov 24, 2025
…contextprotocol#681)

**Problem:**
The targeting selector widget wasn't loading the 255 custom targeting keys
from GAM. Dropdown stayed empty with "-- Select a key --" placeholder.

**Root Cause:**
Field name mismatch between API response and widget JavaScript:
- API returns: `customKeys` (line 136 of inventory.py)
- Widget expected: `custom_targeting_keys` (line 129 of widget)

**Fix:**
Changed widget to use `data.customKeys` to match API response format.

**Result:**
Widget will now correctly populate dropdown with all 255 custom targeting keys.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants