My shop has the option to personalise items, using “Personalisation” as a separate product. I’d like to automatically set this to Fulfilled when the order is placed. I’m trying to use the Flow app to achieve this, but I can’t seem to find a way to set the specific product to fulfilled.
I have similar task, but a little bit confuse about the settings, could you help me, please to figure out what is the right settings should it be here?
Hi @Fertel1 - I actually ended up using the Mechanic app to get this task done - it’s proved to be more versatile for us and has solved a few challenges.
Looking at your request, it seems the body received is not formatted correctly and has a lot of \s etc. - so I’d look to correct that initially.
A 400 error is a badly formed request. As a first step, like the other comments you should remove white space around your actual request (notice how it starts with \n\n\n\n\n). Do that by including hyphens in your tags like:
{%- endfor -%}
Also, both of your id’s are missing the quotes around them. Try something like
You can now do this using “Mark fulfillment order as fulfilled” action. This action only allows you to fulfill the entire fulfillment order, it is not able to partially fulfill by selecting line specific line items. You will have to ensure the that “Personalisation” product is the only item in the fulfillment order
Thanks @tyler_k - as my post explains, this is an addition to other products which do require fulfilment, so this would not be a solution to this problem as it would never be the only item in the fulfilment order so we’ll stick with the Mechanic app solution for now.
I’ve achieved this with an HTTPRequest using GraphQL.
Just note that the IDs for both the order and line item need to be gIDs rather than liquid IDs, so {{ order.id }} wont work in flow for either RestAPI or GraphQL requests.
{
"query": "mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {
fulfillmentCreateV2(fulfillment: $fulfillment) {
fulfillment {
id
status
}
userErrors {
field
message
}
}
}",
"variables": {
{
"fulfillment": {
"lineItemsByFulfillmentOrder": {
"fulfillmentOrderId": "{{ ID OF ORDER FULFILLMENT}}",
"fulfillmentOrderLineItems": {
"id": "{{ LINE ITEM FULFILLMENT ID OF ITEM TO BE FULFILLED }}",
"quantity": 1
}
}
}
},
"message": "Autofulfilled by Flow"
}
}