Integration field: Shopify

Hi,

we're trying out the integration field for shopify but cant get it to work (or I dont understand how it's supposed to work).

I've added the data and it says that the field is synced. But how do I see my products in prismic and/or fetch them to the front end?

Does this look right?


Hi Team,

If it's syncing correctly, then it should be fine.

Which repo is it specifically?

Have you added the integration field in the custom type?

The repo is wlsn-nuxt3-prismic.

I have not added an integration field to any custom type. What is "the custom type"? Can't add integration field with slicemachine on any of my current custom types or a new one.

OK, in that case, you'll need to add an integration field in Slice Machine to a custom type or page type with this workaround:

Okey, i've added this to my custom type but the list is empty. I changed the "catalog" to "Products" to match my integration above.

Its also not really working as I was expecting. Was expecting the products to automaticly be added to my repo as a document.

Can you show me how you added your catalog ID?

{
  "id": "product",
  "label": "Product",
  "format": "custom",
  "repeatable": true,
  "status": true,
  "json": {
    "Main": {
      "uid": {
        "config": {
          "label": "UID"
        },
        "type": "UID"
      },
      "catalog": {
        "type": "IntegrationFields",
        "config": {
          "catalog": "Products",
          "label": "catalog"
        }
      }
    }
  }
}

Your product catalog ID needs to be wlsn-nuxt3-prismic--products, so:

   "products": {
      "type": "IntegrationFields",
      "config": {
        "catalog": "wlsn-nuxt3-prismic--products",
        "label": "Products"
      }
    }

Ey it works! Cheers Phil :slight_smile:

Time to explore this further!

1 Like

Glad to hear :slight_smile:

Do you have any examples how other clients use this feature? It seems to me like it will be a lot of double work. First adding to shopify then having to manually add to prismic as well :thinking:

Is it possible to query a document based on the shopify handle in the integration field? Or do I still need to add a UID in order to query the document? :thinking:

Yes, you will still have to add your products to the documents and publish them with a UID. What is your exact use case?

Well mainly connect shopify and spotify to enrich shopify product with slices if needed. Right now I'm just setting up a starter for us internally.

But the fact that I have to manually add the products to prismic for let say 1000 products to me defeats the entire purpose. I would expect the product to get imported as a custom type that I can use.

If I have to create a document manually i can just enter the shopify handle manually also, which is a terrible solution :D Integration field makes this 5% better but not much more :smiley:

I don't mean to be harsh, integration fields just sounded so much better when I read about this feature.

Please let me know if I'm missunderstanding how this works!

OK, yeah, in that case, there was a bit of a misunderstanding for the integration fields use case. It's not an import or a write API. It's for if you want to maintain your catalog elsewhere and drop a product in as a Slice as part of a larger page, so kind of the inverse of your use case.

If you want to import and maintain the data in a document in Prismic, then it's not possible right now as we don't have a write API. Although the team is working on a migration API, which might help you with your use case of moving all your Shopify catalog into Prismic as documents to maintain it there.

Sign up for the Beta waitlist to try the Migration API. We'll get you set up as soon as the next spot becomes available.

Thanks Phil! Good to know :slight_smile:

1 Like

A post was split to a new topic: Using Integration Fields