different fullfiments for order

Hi everyone,

Is it possible to know if this order has a single fulfillment location or multiple?

We would like to send a custom review request. But when an order is just partially delivered and we ask if they liked a product, we get a negative review. We could simply add a delay. but still not sure if they get a product.

Yes, it is possible to determine if an order has multiple fulfillment locations in Shopify by analyzing the fulfillment information. Here’s how you can proceed:

Inspecting Fulfillment Information1. Check the Fulfillment Data: From your second screenshot, the order object contains a fulfillments field. Each fulfillment object corresponds to a shipment. If there are multiple fulfillment entries, the order was fulfilled from multiple locations or in multiple shipments.

  1. Identify Fulfillment Status:

    • Use the fulfillment_status field (e.g., “partial” or “fulfilled”) to assess if the order has been completely shipped.
    • A “partial” status often indicates multiple shipments.
  2. Analyze Locations: In the order API, each fulfillment object contains a location_id. If the location_id differs across fulfillments, the order was fulfilled from multiple locations.

Custom Review Logic

To send a review request only when all items have been delivered:

  • Track Fulfillment Events: Use webhooks like fulfillment/update to monitor when the fulfillment_status changes to “fulfilled.”
  • Check All Fulfillments: Before sending the review request, ensure that all items in the line_items list have been marked as delivered.

Alternative Delay Option

If tracking fulfillment is challenging:

  • Dynamic Delay: Set a delay based on the shipping estimate of the slowest fulfillment.
  • Custom Messaging: Clearly mention in the review request that the feedback is optional if they have not received all items.