> ## Documentation Index
> Fetch the complete documentation index at: https://docs.topsort.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Better integration with current systems

> We've introduced three key improvements to streamline integration and data management. Campaign Change Webhook reduces API polling by notifying users of campaign updates in real-time; Campaign ID in Auction Responses allows clients to map auctions to internal campaigns for better tracking and analysis; and Product Metadata in Catalog enables custom fields for enhanced product organization and advertiser experience.

export const ChangelogActions = () => {
  return <>
      <style>{`
        .changelog-actions {
          display: flex;
          justify-content: center;
          gap: 12px;
          margin-top: 2rem;
          padding-top: 1.5rem;
          border-top: 1px solid #e5e7eb;
        }
        
        [data-theme="dark"] .changelog-actions {
          border-top-color: #374151;
        }
        
        .changelog-btn {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 8px 16px;
          border-radius: 9999px;
          border: 1px solid #d1d5db;
          background: transparent;
          color: #6b7280;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
        }
        
        .changelog-btn:hover {
          border-color: #9ca3af;
          background: #f9fafb;
        }
        
        [data-theme="dark"] .changelog-btn {
          border-color: #4b5563;
          color: #9ca3af;
        }
        
        [data-theme="dark"] .changelog-btn:hover {
          border-color: #6b7280;
          background: #1f2937;
        }
      `}</style>
      <div className="changelog-actions">
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    btn.innerHTML = "❤️ Like";
    btn.style.borderColor = "#ec4899";
  }}>
          🤍 Like
        </button>
        <button className="changelog-btn" onClick={() => {
    const btn = event.target.closest("button");
    navigator.clipboard.writeText(window.location.href);
    const originalContent = btn.innerHTML;
    btn.innerHTML = "✓ Copied";
    btn.style.borderColor = "#22c55e";
    btn.style.color = "#22c55e";
    setTimeout(() => {
      btn.innerHTML = originalContent;
      btn.style.borderColor = "";
      btn.style.color = "";
    }, 2000);
  }}>
          ↗ Share
        </button>
      </div>
    </>;
};

<div style={{ display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "16px" }}>
  <Badge color="gray" size="sm" icon="calendar">October 2, 2024</Badge>
  <Badge color="purple" size="sm" icon="server">Ad Server</Badge>
  <Badge color="orange" size="sm" icon="arrow-up">Improvement</Badge>
</div>

# Campaign Change Webhook

The campaign change webhook allows us to notify users about updates in Topsort's system, eliminating the need for constant polling. This reduces the API load by informing users with a single request when changes occur.

## Key benefits

* Synchronization: Ensures the marketplace has up-to-date information aligned with Topsort's platform, preventing unsynchronized data issues.

## How it works

This webhook triggers whenever key changes happen to campaigns in Topsort, such as:

* `campaign:create`
* `campaign:update`
* `campaign:delete`
* `bid:create`
* `bid:update`
* `bid:delete`

Each event triggers a POST JSON request to subscribed webhooks with the following a specific payload.

# Campaign ID in Auction Response

Incorporating campaign IDs in auction responses allows clients to map Topsort auctions to their internal campaigns.

## Key Benefits:

* Tracking: Clients can store auction data to perform analysis and optimizations.
* Integration: Link Topsort campaign performance to external platforms like GA4.

## How It Works:

Each winning product or banner in an auction response now includes a campaign\_id.

Example:

```json theme={null}
{
	"results": [{
		"resultType": "listings",
		"winners": [
			{
				"rank": 1,
				"type": "product",
				"id": "771860",
				"resolvedBidId": "ChAGa8u1DSh2ZYkEcUqZAQPhEhABkS1FACZ4ko2uUXufbQ6WGhAGQ57M6WZx7pskxnrwxTQeIgoKBjc3MTg2MBABMOTrAQ",
				"campaign_id": "01903525-2b99-72a8-a610-380b6910885c"
			}
		],
		"error": false
	}]
}
```

# Product Metadata in the Catalog

Product metadata allows clients to attach custom information to products in their catalog, facilitating better organization and searchability.

## Key Benefits:

* Facilitated Integration: Custom fields help retailers track products and their upload time.
* Enhanced Advertiser Experience: Advertisers can easily identify which products are being promoted with additional metadata.

## How It Works:

Clients can add metadata through a JSON object during product upserts. The JSON follows these constraints:

* Must be one level deep (no sub-objects).
* Allows string, integer, and float as value types.
* Supports up to 8 key-value pairs.
* Key max length: 16 characters.
* Value max length: 32 characters.

Example:

```json theme={null}
{
	"products": [{
		"id": "24-MB02",
		"name": "Crown Summit Backpack",
		"metadata": {
			"size": "L",
			"color": "blue"
		}
	}]
}
```

<ChangelogActions />
