---
title: "deals.index_document.upserted@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/deals.index_document.upserted"
updated: null
---

# deals.index\_document.upserted@1 · OpenVibe.Services

HTML: [deals.index\_document.upserted@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/deals.index_document.upserted)

# DealsIndexDocumentUpsertedPayload `deals.index_document.upserted@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: deals
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/events/payloads/deals.index_document.upserted.v1.json`](/docs/contracts/deals.index_document.upserted.json)

deals.index\_document.upserted v1 (OpenVibe.Deals server/domain/indexing.js indexOffer and indexProduct, via openvibe-publishing/index-hooks indexEvent). The OpenVibe.Search document of a canonical offer page (type offer, /d/<slug>) or a product page (type product, /p/<slug>), sent whenever what Search should hold changed: after every offer write (offers.js, importer.js), a product resolved through the API, and the worker's re-index pass when freshness moves. The sequencer (deal\_index\_revisions) gives an unchanged document its old revision and nothing is sent. Always visibility public and publication\_state published; expired offers, offers without a fresh observation and imported or AI text awaiting review stay in Search as noindex documents (reasons expired, stale\_price, owner\_decision). Offer facets: status, freshness, store, category, currency, product (slug); product facets: brand, category, offers (active offer count). Consumed by OpenVibe.Search ('\*.index\_document.\*'). Envelope: subject { type: offer | product, id, revision: <document revision> }, visibility internal, priority important, actor service:deals.

## Fields

This schema has no named fields.

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: offer

~~~~
{
  "owner": "deals",
  "type": "offer",
  "id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 3,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.deals/d/usb-c-charger-65w-k0mnpq",
  "title": "USB-C charger 65W",
  "summary": "Two-port GaN charger, price seen on the store page.",
  "body": "USB-C charger 65W\nTwo-port GaN charger, price seen on the store page.\nshop.example\n29.99 USD as of 2026-09-23T10:15:00.000Z",
  "facets": {
    "status": "active",
    "freshness": "fresh",
    "store": "shop.example",
    "category": "electronics",
    "currency": "USD"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-09-23T10:15:00.000Z",
  "updated_at": "2026-09-23T10:15:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
~~~~

Valid: product-noindex

~~~~
{
  "owner": "deals",
  "type": "product",
  "id": "dpr_01JAB2C3D4E5F6G7H8J9K0MNPS",
  "revision": 7,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.deals/p/hose-reel-30m-k0mnps",
  "title": "Hose reel 30 m",
  "body": "Hose reel 30 m\nGardenCo\nGardenCo HR-30",
  "facets": {
    "brand": "GardenCo",
    "category": "garden",
    "offers": 1
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-09-20T08:00:00.000Z",
  "updated_at": "2026-09-21T06:00:00.000Z",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "stale_price"
    ]
  }
}
~~~~

Rejected: other-owner

~~~~
{
  "owner": "coupons",
  "type": "offer",
  "id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 3,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.deals/d/usb-c-charger-65w-k0mnpq",
  "title": "USB-C charger 65W",
  "summary": "Two-port GaN charger, price seen on the store page.",
  "body": "USB-C charger 65W\nTwo-port GaN charger, price seen on the store page.\nshop.example\n29.99 USD as of 2026-09-23T10:15:00.000Z",
  "facets": {
    "status": "active",
    "freshness": "fresh",
    "store": "shop.example",
    "category": "electronics",
    "currency": "USD"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-09-23T10:15:00.000Z",
  "updated_at": "2026-09-23T10:15:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
~~~~

Rejected: tombstone-as-upsert

~~~~
{
  "owner": "deals",
  "type": "offer",
  "id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 4,
  "deleted": true
}
~~~~

Rejected: watch-id

~~~~
{
  "owner": "deals",
  "type": "offer",
  "id": "dwt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 3,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.deals/d/usb-c-charger-65w-k0mnpq",
  "title": "USB-C charger 65W",
  "summary": "Two-port GaN charger, price seen on the store page.",
  "body": "USB-C charger 65W\nTwo-port GaN charger, price seen on the store page.\nshop.example\n29.99 USD as of 2026-09-23T10:15:00.000Z",
  "facets": {
    "status": "active",
    "freshness": "fresh",
    "store": "shop.example",
    "category": "electronics",
    "currency": "USD"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-09-23T10:15:00.000Z",
  "updated_at": "2026-09-23T10:15:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('deals.index_document.upserted@1', value);   // { valid, errors: [{ path, message }] }
~~~~
