Ctrl + K
DocumentationLog inGet started

tessl/pypi-google-shopping-merchant-conversions

tessl install tessl/pypi-google-shopping-merchant-conversions@1.0.0

Google Shopping Merchant Conversions API client library for managing conversion sources and tracking.

Agent Success

Agent success rate when using this tile

82%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.17x

Baseline

Agent success rate without this tile

70%

task.mdevals/scenario-2/

Conversion Source Report Generator

Build a tool that retrieves and reports on conversion sources for a Google Merchant Center account.

Requirements

Your tool should provide two main capabilities:

  1. Retrieve Individual Source: Fetch and display details of a specific conversion source by its resource name
  2. List All Sources: List all conversion sources for a merchant account with support for pagination

For the listing functionality, your implementation should:

  • Support pagination when multiple pages of results are available
  • Handle both active and archived conversion sources
  • Display relevant information for each source including its name, state, and type (Google Analytics Link or Merchant Center Destination)

For the individual retrieval functionality, your implementation should:

  • Accept a resource name in the format accounts/{account}/conversionSources/{conversion_source}
  • Return the full details of the requested conversion source

Implementation

@generates

API

def get_conversion_source_details(name: str) -> dict:
    """
    Retrieve details of a specific conversion source.

    Args:
        name: The resource name of the conversion source
              Format: accounts/{account}/conversionSources/{conversion_source}

    Returns:
        A dictionary containing the conversion source details including:
        - name: The resource name
        - state: The current state (ACTIVE, ARCHIVED, PENDING, etc.)
        - source_type: Either "google_analytics_link" or "merchant_center_destination"
        - details: Additional information specific to the source type
    """
    pass

def list_all_conversion_sources(account_id: str, include_deleted: bool = False) -> list:
    """
    List all conversion sources for a merchant account.

    Args:
        account_id: The merchant account ID
        include_deleted: Whether to include archived/deleted sources

    Returns:
        A list of dictionaries, each containing conversion source information:
        - name: The resource name
        - state: The current state
        - source_type: Either "google_analytics_link" or "merchant_center_destination"
    """
    pass

Capabilities

Retrieve Individual Conversion Source

  • Given a resource name "accounts/123/conversionSources/456", the function returns a dictionary with the source's name, state, and type @test
  • Given an invalid resource name, the function raises an appropriate exception @test

List Conversion Sources

  • Given an account ID "123", the function returns a list of all active conversion sources for that account @test
  • Given an account ID "123" with include_deleted=True, the function returns both active and archived sources @test
  • When an account has more than one page of results, the function automatically handles pagination and returns all sources @test

Dependencies { .dependencies }

google-shopping-merchant-conversions { .dependency }

Provides the API client for managing conversion sources in Google Merchant Center.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/google-shopping-merchant-conversions@1.0.x
tile.json