How to separate dropshipped products from shop products while handling RETURN_REQUEST webhook?

We are developing a plugin that allows shops to sell our products on their
storefront. Something like a dropshipping solution.

Our plugin is a fulfillment service application. Meaning that when a client buys
our items in the shop, a fulfillment is requested. The created fulfillment order
that we receive is a separate one and only contains our items,
despite the client buying the shop’s items in the same order.

However, if the client requests a return and tries to return both our items and
the shop’s items, the return request contains all of the items together,
without any separation like with the fulfillment service. Meaning
when we receive a RETURNS_REQUEST webhook which includes the shop’s items,
we cannot approve or decline this request since it now includes items beyond
our control.

This makes us check what kind of items the return request contains. We check
if there are any return line items that are our products. Then we check that
there are no other products in the return. This way we
are only able to approve/reject the return requests which contain exclusively
our products.
The requests containing both the shop’s products and ours have to be dealt
with manually.

Ideally we want to deal with all the return requests programatically.
What can you recommend us to do?
Is there a similar mechanism to a fulfillment service, but for returns? Can
we separate our products from the shop’s products in the return request?
Can returns be split by fulfillment service similar to fulfillment orders?

Or maybe you faced some similar issue?

P.S. We are using Shopify API 2025-01 version.

Could you apply a metafield or tag to dropshipped products so you can differentiate between them in the return request?

Hey @Liam-Shopify!

We do have a metafield in the product, which allows us to differentiate the shop’s products and our products.

This is how we understand that, for example, the return request does not contain any of our products and we can ignore it. Or that the return request does contain our products and we must handle it.

If the return request consists of our products exclusively, we handle it: we decline or approve the request. And in case of approval we create the returns in our system, we generate the return labels, we create the reverse deliveries with these labels.

But the problem is when the return is requested and it includes both the shop’s products and our products, all the items are placed in the same Return entity.

In this case we have no right to approve or decline the Return request, since if we approve or decline it, we will also approve or decline the return of the shop’s items.

In order to create the reverse delivery, we need the reverse fulfillment order ID. But, AFAIU, the reverse fulfillment order is created when the return request is approved.
But we must not approve the request since we cannot decide for the shop’s products. We can only be responsible for our products.

Ideally, we want to approve the return request for our products only. Or create reverse deliveries for our products.

Is it possible to partially fulfill the return request?
Or maybe you can recommend some other way of handling this?

There is a request to “returnLineItemRemoveFromReturn”. I don’t know if this is helpful.

In any case, it doesn’t give you the opportunity to explain to the customer why the line has been removed. Maybe sending a separate email to the customer would be helpful.

@edstevo Thank you for your response! :heart:

Not exactly what we are looking for, but this is definetely one way of handling the returns which contain both the shop’s products and our products.

However, it can lead to unpleasant customer experience, which we are striving to avoid.