Inventory_generate_snapshot - possible to filter on qty > 0?

Hi,
I’ve gone through the docs and they don’t mention it, but I’m just hoping here in case they’re missing something - is it possible to filter on qty > 0 while issuing inventory_generate_snapshot command?

Anything not in the results can thus be assumed to be at zero qty and greatly reduce processing time.

Thank you!

Hey @Raj,

Thanks for reaching out. Going to look into this and get back to you shortly.
Please let me know if you have any questions or concerns.

Best,
RayanP

Thank you @sh-agent. Just that Q for now, but do let me know in case something isn’t clear or you need additional details to help me.

1 Like

Hey @Raj,

I believe adding the has_inventory filter to the mutation would work. It’d look something like this:

mutation {
  inventory_generate_snapshot(data: { has_inventory: true }) {
    request_id
    complexity
    snapshot {
      snapshot_id
      job_user_id
      job_account_id
      warehouse_id
      customer_account_id
      notification_email
      email_error
      post_url
      post_error
      post_url_pre_check
      status
      error
      created_at
      enqueued_at
      updated_at
      snapshot_url
      snapshot_expiration
      new_format
    }
  }
}

Please let me know if you have any questions or concerns!

Best,
RayanP

1 Like

Brilliant! Trying it right now -

hey @sh-agent, it works perfectly - my downloaded file size is half now and it’ll help a lot with processing time - thanks so much!

2 Likes