Prismic Integration Field: Not possible to receive Shopify product metafields - shopify-api

I cannot fetch Shopify product metafields using Prismic Integration field via GraphQL API.
What I did:
Created a document with Integration field https://prnt.sc/11dima8
Tried to fetch the product data via GraphQL API, but product metafields are missed https://prnt.sc/11dinv1
What did I check:
The metafields can be found via Shopify GraohQL https://prnt.sc/11akxvp
Data is synced https://prnt.sc/11diq30
How can I retrieve product metafields from Shopify using Prismic Integration field? Does somebody have the same scenario? Probably some extra configurations should be done, but I'm not aware about them.
Thanks in advance!

I don't think that question is relevant anymore as only Prismic team knows about this issue, here is the topic on Prismic forum: https://community.prismic.io/t/integration-field-not-possible-to-receive-shopify-product-metafields/

Well, in fact, fetching Metadata from Shopify requires making an extra call to Shopify API that makes their API time out on the response size.
One temporary solution that we can provide for the moment is to add a link to your metadata, and you fetch them after on your side.
Having a micro-service to fetch all the data works as well, but you have to use a queue system so that if any item fails to sync due to a timeout, for example, you try several times to get it.
Also, you need to manage the authentication with Shopify API on your own.

Related

Automatically updating Shopify inventory item quantity

I have a Shopify store with rental products. Since Shopify doesn't handle return flows, the shop is connected to an external service, were the order is sent via an API to that service, which handles finalizing the rental and tracking it.
Now here is the problem, since the procedure is finalized outside of Shopify, the products are removed when rented, but not added when returned. this makes updating the shop manual. I am currently using Pipedream to handle my Web-hooks and requests, and it provides a service to change Inventory Level, but no direct way to update Shopify inventory. I know that the only way to update quantity in by getting InventoryItemID, and the only way to get that is by using ProductVarientID. I was able to acheive that using GraphQL, but I'd have to manually quary the InventoryItemID by using the ProductVarientIDs of my return orders from an API, and then use a mutation that does bulk inventory update to get the job done, but you can see, this is hardly automated.
Any thoughts and ideas are much appreciated.
If there is a way to do it using Pipedream, that's super.

WooCommerce Bookings - make a booking via API

I'm creating a headless WooCommerce application and I need to create a booking for a bookable product via an API request in Node.
Woo bookings shows this on their docs - essentially it says don't use - then I raised a ticket with the Store API team here - the answer appears to suggest we add the data ourselves, that's not good as we're then running a custom version of Woo.
Does anyone know how I can make a booking in WooCommerce via an API endpoint? It must have SOME kind of API or the frontend wouldn't work?!? It's handy to have because it means the customer runs what they've always run and get all the nice stuff like reminder texts and emails for their customers.

how to add coupons to stripe's checkout

To enable SCA changes, I am now integrating https://stripe.com/docs/payments/checkout/client stripe's (stripe v3 js file) checkout feature to my app, which makes it easy for integration of my subscription system.
Question
how to pass coupons to stripe.redirectToCheckout() method, don't see anything related to this in documentation.
code sample
stripe.redirectToCheckout({
items: plans_and_addons,
successUrl: successUrl,
cancelUrl: cancelUrl,
clientReferenceId: customer_id, // helpful in webhook response
})
I am also facing the same issue so I contacted stripe support.
Please check the support team's reply.
I did a thorough research on your query and I'm afraid, Checkout supports only a limited set of customizations (e.g. name, description, logo) and fields. Focusing the UI allows us to iterate on it more effectively to improve conversions and maintain support across a wide range of platforms.
They provided me one document link you can also check it. https://stripe.com/docs/payments/checkout/customization
I think you can solve your problem by creating custom checkout with helping stipe API. --not tried.
As Daniel says above, you can't enable the promo codes when you call redirectToCheckout but you can enable the promo codes when you create the stripe session from your API.
So, to sum app, when you create the checkout session using Stripe.checkout.sessions.create() you have to also pass the allow_promotion_codes: true and this will actually allow you to apply promo codes to the products you have created in the stripe -> products page.
You can find more informations on this page: https://stripe.com/docs/billing/subscriptions/coupons/codes
I also ran into this, and what I've deduced from the Stripe docs is that you can't apply a coupon directly to the redirectToCheckout method, you have to create a Checkout session first and then use that.
Add a discount to Checkout the sample code is calling Checkout.session.create, not Checkout directly
redirectToCheckout Reference Docs doesn't mention a discount or coupon parameter at all, and the sample code again is creating a Checkout session using fetch (to one's own server backend, which is where my expertise ceases and where I'm stifled), to generate a session ID and then passing that into the result where redirectToCheckout is called.

How to access more than 10 products in Amazon mws via ListMatchingProducts API using node.js

I am using node.js(Meteor) for calling Amazon MWS ListMatchingProducts API for getting all products of my seller account . Its running sucessfully and i am getting the response , but as the documentation said that only ten(10) products are returned at one time. So i just want to know how we get products more than 10 . In the doc Amazon also said that you can submit NextToken with a "ByNextToken" operation to request additional pages.But i am not getting any nextToken or related to that nextToken field on my response.So how do i get the nextToken from there side or how can i get more than 10 products from that API. As i also check on one post they said that we need to use Reports for that but i want to use ListMatchingProducts API for that and want result more than 10.
Please provide me any suggestion or guidance how can i achieve that.
Any help would be appriciated
Thanks
You want to call the Reports API using the Inventory Report report type or one of the other Listing Report types. That is the way to go. The ListMatchingProductsoperation of the Products API is meant to be a search, based on a query. Yes, it only lists ten products but it does not give you a NextToken like some of the other operations. Knowing your Report Type and Marketplace ID, you can submit those to the Reports API with your credentials and get back all of your products all at once and there is no searching involved.
What I would also suggest is to use the Amazon Scratchpad to play around with your operations to make sure you get what you expect, then plug it into your node.js project.

Is there a way to get Instagram #Mention History via API or otherwise?

The native application doesn't show all the activity, only the most recent.
Therefore I lose 70-90% of my notifications overnight. There must be a way to get all that historical data.
I told you can't, but, thinking.. you can. :)
The API don't provide that facility.. You can check all endpoints here: http://instagram.com/developer/endpoints/
But you can iterate over all your medias an get all comments and likes. If you store it locally, after, will be possible to request API again and check your new unseen interactions.
It will work for likes and comments.

Resources