How to put Operator Hold on Graphql created order

Hi everyone!

I’m wondering if someone can point me in the right direction.

I’m want to create an order but to have the fulfillment put on hold until one of our staff members checks it before releasing it.

We have a new integration which we want to bed in hence the functionality above.

Thanks,

Hi @alfieandgem!
Would an operator hold (or any hold) work for you?

For that, you will need to add this part to your mutation payload:

holds:{
        operator_hold:true
      }

Thanks in advance!
Tom

Hi Tom,

Thanks for your reply.

My request payload is below;

{“query”:“mutation { order_create( data: { order_number: “{{4.shiphero order id}}” shop_name: “{{4.shop name}}” fulfillment_status: “pending” order_date: “{{4.order date}}” total_tax: “0.00” subtotal: “{{1.25}}” total_discounts: “0.00” total_price: “{{1.25}}” holds:{ operator_hold: “true” } shipping_address: { first_name: “{{4.first name}}” last_name: “{{4.last name}}” address1: “{{1.6}}” address2: “{{1.7}}” city: “{{1.8}}” state: “{{1.9}}” state_code: “{{1.9}}” zip: “{{1.10}}” country: “US” country_code: “US” email: “{{1.19}}” } billing_address: { first_name: “{{4.first name}}” last_name: “{{4.last name}}” address1: “{{1.6}}” address2: “{{1.7}}” city: “{{1.8}}” state: “{{1.9}}” state_code: “{{1.9}}” zip: “{{1.10}}” country: “US” country_code: “US” email: “{{1.19}}” } line_items:{ sku: “{{4.sku-1}}” partner_line_item_id: “{{4.shiphero order id}}” quantity: {{1.13}} price: “{{1.12}}” product_name: “{{14.data.data.product.data.name}}” fulfillment_status: “pending” quantity_pending_fulfillment: {{1.13}} warehouse_id: “{{4.warehouse id}}” } required_ship_date: “{{4.order date}}”}){ request_id complexity order { id order_number shop_name fulfillment_status order_date total_tax subtotal total_discounts total_price custom_invoice_url account_id email profile packing_note required_ship_date shipping_address { first_name last_name company address1 address2 city state state_code zip country country_code email phone } line_items(first: 1) { edges { node { id sku product_id quantity product_name fulfillment_status quantity_pending_fulfillment quantity_allocated backorder_quantity eligible_for_return customs_value warehouse_id locked_to_warehouse_id } } } } } }”}

I’ve added the (in bold);

holds:{
operator_hold: true
}

It throws an error; In field “holds”: In field “operator_hold”: Expected type “Boolean”, found “true”.

I’m assuming from the error it’s received a string instead of a boolean. I’ve tried a few different ways to construct the boolean in the request. eg;

holds:{ operator_hold: \true\ }

holds:{ operator_hold: true }

But still to no avail. Have you any ideas what I could be doing wrong?

Thanks!

HI @alfieandgem!
Ty without the quotes, instead of

holds:{ operator_hold: “true” }

send it like:

holds:{ operator_hold: true }

It might be thinking it is a string because of the quotes.

Let me know if that doesn’t work.
Thanks again!
Tom