# Working with Encoded Shopify Data

The Shopify data indexed by Nacelle is sourced from the Shopify Storefront Api. When Shopify sends the data to Nacelle, Shopify encodes the IDs, and Nacelle renames them. The two IDs below map to the same product in Shopify.

Shopify product.id

Nacelle product.pimSyncSourceProductId

# Using The Correct IDs

At times it may necessary to decode the IDs back to their original numeric values. This is particularly important when working with 3rd party apps, which rely on the original Shopify IDs.

# Decoding The IDs

The IDs sourced from the Shopify Storefront Api are base-64 encoded Global IDs, which take the form of:


The easiest way to decode the IDs is using one of the following methods.

const productId = Buffer.from(product.pimSyncSourceProductId, "base64")
import { decode } from 'js-base64'

const productId = decode(product.pimSyncSourceProductID)