# Product Data
The Data Ingestion API gives developers the option to send product data to Nacelle from a custom data source or product information management system.
To begin exploring this API, please view our Custom Quick Start Guide and our Data Ingestion Reference Docs.
# Viewing the Data Ingestion Product Docs
Please follow the instructions in the Data Ingestion Reference Docs. Once the proper headers are added to your API Client, you will be able to use GraphQL introspection to browse the Product and Variant objects. Furthermore, you will find the requirements for the indexProduct
and deleteProduct
mutations. The indexProduct
mutation is similar to a "create or update" function and is keyed on handle.
# Important Reminders
All the Data Ingestion Engine API calls are asynchronous in nature, and successful responses from the mutations sent do not guarantee successful indexing of the objects.
Product mutations require that a pim
object is inputted along with your data. A product information management system (PIM) is the source of truth for your product catalog. Pim objects follow this structure:
pim: {
syncSource: "custom"
syncSourceDomain: "<put your pim domain here>"
defaultLocale: "en-us"
}
Note: be sure to replace the "put your pim domain here" with your pim domain
# Example Mutations
A single product event. This will create a product with the handle phaser-gun
. If a product with the handle phaser-gun
already exists, it will update the index with the data provided.
mutation IndexProduct {
indexProducts(
input: {
pim: {
syncSource: "custom"
syncSourceDomain: "<put your pim domain here>"
defaultLocale: "en-us"
}
products: [
{
handle: "phaser-gun"
locale: "en-us"
pimSyncSourceProductId: "phsr782"
title: "Original Phase Gun"
description: "The most common and standard direct energy weapon in the arsenal of Starfleet. Classified as a particle weapon"
availableForSale: false
}
]
}
) {
count
ids
}
}
With the same mutation, multiple Product events can be passed at once:
mutation IndexProduct {
indexProducts(
input: {
pim: {
syncSource: "custom"
syncSourceDomain: "<your-pim-source-domain>"
defaultLocale: "en-us"
}
products: [
{
handle: "phaser-gun"
locale: "en-us"
pimSyncSourceProductId: "phsr782"
title: "Original Phase Gun"
description: "The most common and standard direct energy weapon in the arsenal of Starfleet. Classified as a particle weapon"
availableForSale: true
}
{
handle: "food-replicator"
locale: "en-us"
pimSyncSourceProductId: "foodprint1701"
title: "Food Replicator"
description: "A molecule synthesizer that uses anti-matter conversion technology. Used to feed the crew."
availableForSale: true
}
]
}
) {
count
ids
}
}
If a Product is deleted, send the following mutation to the Data Ingestion API:
mutation DeleteProduct {
deleteProduct(
input: {
pim: {
syncSource: "custom"
syncSourceDomain: "<your pim source domain>"
defaultLocale: "en-us"
}
id: "<your pim source domain>::food-replicator::en-us"
}
)
}