> ## 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.

# Placements and Context

export const LastUpdated = ({date, lang = "en"}) => {
  const translations = {
    en: "Last updated:",
    es: "Última actualización:",
    pt: "Última atualização:",
    fr: "Dernière mise à jour:",
    de: "Zuletzt aktualisiert:"
  };
  const label = translations[lang] || translations.en;
  return <>
<style>{`
.last-updated-component {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 8px;
margin-top: 12px;
margin-bottom: 16px;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.05);
border: 1px solid rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.75);
line-height: 1;
}

        .last-updated-component svg {
          flex-shrink: 0;
          vertical-align: middle;
        }

        .last-updated-component span {
          display: inline-flex !important;
          align-items: center !important;
          line-height: 1 !important;
        }

        [data-theme="dark"] .last-updated-component {
          background-color: #3a3a3a;
          border: 2px solid #888888;
          color: #ffffff;
        }

        [data-theme="dark"] .last-updated-component svg {
          stroke: #ffffff;
        }
      `}</style>
      <div className="last-updated-component">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <circle cx="12" cy="12" r="10" />
          <polyline points="12 6 12 12 16 14" />
        </svg>
        <span>
          <strong style={{
    fontWeight: 600
  }}>{label}</strong> 
          <time dateTime={date}>{date}</time>
        </span>
      </div>
    </>;
};

<div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
  Topsort allows the creation of campaigns targeted to specific placements and
  contexts. Depending on the placements and contexts selected, each campaign
  participates in the correct auctions.
</div>

## How It Works

<Steps>
  <Step title="Campaign Setup">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      On campaign creation, three types of placements/contexts are available:
    </div>
  </Step>

  <Step title="Automatic">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      This type of setup will return winners when the auction request has the specific product ID in it, allowing for the campaign to participate wherever the marketplace thinks it's relevant. By default, all the product categories are also included as relevant contexts.
    </div>

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      **Example**: a campaign having the product Sneakers (id sneakers-123) with
      automatic targeting will have a bid that will be triggered by auctions having
      sneakers-123 in the request. It will also participate in an auction with the
      category sneakers
    </div>
  </Step>

  <Step title="Keywords">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Shows the products based on the campaign or product level keywords. If the searchQuery sent on the auction request matches any of the selected keywords, then the items will participate.
    </div>

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      **Example**: a campaign with the keyword shoes will have a bid that will
      participate by auctions having the searchQuery shoes. This applies to all ad
      formats.
    </div>
  </Step>

  <Step title="Categories">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      Items participate on the auction based on the pre-selected categories for the campaign.
    </div>

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      **Example**: a campaign having the category running-sneakers as the target
      will have a bid that will be triggered by auctions having the category
      running-sneakers in the request. This applies to all ad formats.
    </div>
  </Step>

  <Step title="Auction Process">
    <div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
      During an auction, the placement/context can be provided in the body of the request. The following auction request can be used to retrieve winners with those three contexts/placements:
    </div>

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      Example of auction request for [sponsored
      listings](/en/api-reference/examples/sponsored-listings/set-of-products):
    </div>

    ```json theme={null}
    {
      "auctions": [
        {
          "type": "listings",
          "slots": 1,
          "products": {
            "ids": [
              "sneakers-123"
            ]
          }
        },
        {
          "type": "listings",
          "slots": 1,
          "searchQuery": "shoes"
        },
        {
          "type": "listings",
          "slots": 1,
          "category": {
            "id": "running-sneakers"
          }
        }
      ]
    }
    ```

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      Example of auction request for [banner
      ads](/en/api-reference/examples/sponsored-banners/banners):
    </div>

    ```json theme={null}
    {
      "auctions": [
        {
          "type": "banners",
          "slots": 3,
          "slotId": "backtoschool-carousel"
        }
      ]
    }
    ```

    <div style={{ textAlign: "justify", marginBottom: "1.5rem" }}>
      Example of auction request for [sponsored
      brands](/en/api-reference/examples/sponsored-brands):
    </div>

    ```json theme={null}
    {
        "auctions": [
            {
                "winners": 2,
                "placementId": "some-placement",
                "triggers": {
                    "products": {
                        "ids": [
                            "1", "8"
                        ]
                    }
                }
            }
        ]
    }
    ```
  </Step>
</Steps>

***

<LastUpdated date="2025-11-18" />
