# Let AI shopping agents buy from you

Set the controls agents buy under — what is listed, prices, fulfillment, the platforms you allow — publish the channel, and rotate its signing key on your schedule.

Selling · a play in 3 steps.

## The steps

1. Set the channel up — the controls agents buy under. — [createAgentChannel](/reference/agent-channel/createAgentChannel/)
2. Publish — the configuration is re-checked and platforms may start buying. — [publishAgentChannel](/reference/agent-channel/publishAgentChannel/)
3. Rotate the signing key — the old one verifies for seven more days. — [rotateAgentChannelKey](/reference/system-and-integration-setup/rotateAgentChannelKey/)

## The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

### createAgentChannel

[createAgentChannel](/reference/agent-channel/createAgentChannel/) — mutation · Set up the agent channel for one of your organizations — the controls AI shopping agents buy under: the selling location, which collections are listed, an optional agent price list, fulfillment methods and shipping rates, ship-to countries and pickup locations, the platforms you allow, consent defaults, policy texts and the checkout window.

**Example request**

```graphql
mutation ExampleCreateAgentChannel($input: NewAgentChannelInput!) {
  createAgentChannel(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    pickupLogicalFacilityIds
    shipToCountries
    collectionIds
    divisionId
    showStockLevels
    excludedVariantIds
    priceListId
    allowDiscountCodes
    maxCheckoutTotalMinor
    fulfillmentMethods
    handlingDays
    requireBuyerEmail
    requireBuyerPhone
    rateClass
    returnPolicy
    warrantyPolicy
    checkoutTtlMinutes
    identityLinking
    requireLinkedBuyer
  }
}
```

Variables:

```json
{
  "input": {
    "caption": "Blue jeans",
    "organizationId": "01900000-0000-7000-8000-44b781470000",
    "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000"
  }
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "createAgentChannel": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AG-EXMP-0000-000F",
      "type": "AgentChannel",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
      "pickupLogicalFacilityIds": [
        "01900000-0000-7000-8000-095d4a1d0000"
      ],
      "shipToCountries": [
        "<ship to countries>"
      ],
      "collectionIds": [
        "01900000-0000-7000-8000-b1c179550000"
      ],
      "divisionId": "01900000-0000-7000-8000-25bd925b0000",
      "showStockLevels": true,
      "excludedVariantIds": [
        "01900000-0000-7000-8000-6ad77b420000"
      ],
      "priceListId": "01900000-0000-7000-8000-7844e9fb0000",
      "allowDiscountCodes": true,
      "maxCheckoutTotalMinor": 1,
      "fulfillmentMethods": [
        "ship"
      ],
      "handlingDays": 1,
      "requireBuyerEmail": true,
      "requireBuyerPhone": true,
      "rateClass": "low",
      "returnPolicy": "<return policy>",
      "warrantyPolicy": "<warranty policy>",
      "checkoutTtlMinutes": 1,
      "identityLinking": true,
      "requireLinkedBuyer": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### publishAgentChannel

[publishAgentChannel](/reference/agent-channel/publishAgentChannel/) — mutation · Take a draft agent channel live — the whole configuration is re-checked and agent platforms may start buying.

**Example request**

```graphql
mutation ExamplePublishAgentChannel($id: ID!, $revision: ID!, $reason: String) {
  publishAgentChannel(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    pickupLogicalFacilityIds
    shipToCountries
    collectionIds
    divisionId
    showStockLevels
    excludedVariantIds
    priceListId
    allowDiscountCodes
    maxCheckoutTotalMinor
    fulfillmentMethods
    handlingDays
    requireBuyerEmail
    requireBuyerPhone
    rateClass
    returnPolicy
    warrantyPolicy
    checkoutTtlMinutes
    identityLinking
    requireLinkedBuyer
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "publishAgentChannel": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AG-EXMP-0000-000F",
      "type": "AgentChannel",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
      "pickupLogicalFacilityIds": [
        "01900000-0000-7000-8000-095d4a1d0000"
      ],
      "shipToCountries": [
        "<ship to countries>"
      ],
      "collectionIds": [
        "01900000-0000-7000-8000-b1c179550000"
      ],
      "divisionId": "01900000-0000-7000-8000-25bd925b0000",
      "showStockLevels": true,
      "excludedVariantIds": [
        "01900000-0000-7000-8000-6ad77b420000"
      ],
      "priceListId": "01900000-0000-7000-8000-7844e9fb0000",
      "allowDiscountCodes": true,
      "maxCheckoutTotalMinor": 1,
      "fulfillmentMethods": [
        "ship"
      ],
      "handlingDays": 1,
      "requireBuyerEmail": true,
      "requireBuyerPhone": true,
      "rateClass": "low",
      "returnPolicy": "<return policy>",
      "warrantyPolicy": "<warranty policy>",
      "checkoutTtlMinutes": 1,
      "identityLinking": true,
      "requireLinkedBuyer": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### rotateAgentChannelKey

[rotateAgentChannelKey](/reference/system-and-integration-setup/rotateAgentChannelKey/) — mutation · Mint a fresh signing key for the channel — the outgoing key keeps verifying for seven more days, then retires.

**Example request**

```graphql
mutation ExampleRotateAgentChannelKey($id: ID!, $revision: ID!, $reason: String) {
  rotateAgentChannelKey(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    pickupLogicalFacilityIds
    shipToCountries
    collectionIds
    divisionId
    showStockLevels
    excludedVariantIds
    priceListId
    allowDiscountCodes
    maxCheckoutTotalMinor
    fulfillmentMethods
    handlingDays
    requireBuyerEmail
    requireBuyerPhone
    rateClass
    returnPolicy
    warrantyPolicy
    checkoutTtlMinutes
    identityLinking
    requireLinkedBuyer
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

**Example response**

```json
{
  "data": {
    "rotateAgentChannelKey": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "AG-EXMP-0000-000F",
      "type": "AgentChannel",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
      "pickupLogicalFacilityIds": [
        "01900000-0000-7000-8000-095d4a1d0000"
      ],
      "shipToCountries": [
        "<ship to countries>"
      ],
      "collectionIds": [
        "01900000-0000-7000-8000-b1c179550000"
      ],
      "divisionId": "01900000-0000-7000-8000-25bd925b0000",
      "showStockLevels": true,
      "excludedVariantIds": [
        "01900000-0000-7000-8000-6ad77b420000"
      ],
      "priceListId": "01900000-0000-7000-8000-7844e9fb0000",
      "allowDiscountCodes": true,
      "maxCheckoutTotalMinor": 1,
      "fulfillmentMethods": [
        "ship"
      ],
      "handlingDays": 1,
      "requireBuyerEmail": true,
      "requireBuyerPhone": true,
      "rateClass": "low",
      "returnPolicy": "<return policy>",
      "warrantyPolicy": "<warranty policy>",
      "checkoutTtlMinutes": 1,
      "identityLinking": true,
      "requireLinkedBuyer": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
