Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
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.
So far I have the following set up:
Can anyone suggest how to complete this workflow?
Thanks,
Solved! Go to the solution
This is an accepted solution.
There isn't a "Mark as fulfilled" option yet, but you can accomplish that by using the Send HTTP Request to call the API. I would recommend using the REST API as it's easier to work with in Flow. https://shopify.dev/docs/api/admin-rest/2023-07/resources/fulfillment#post-fulfillments
This is an accepted solution.
There isn't a "Mark as fulfilled" option yet, but you can accomplish that by using the Send HTTP Request to call the API. I would recommend using the REST API as it's easier to work with in Flow. https://shopify.dev/docs/api/admin-rest/2023-07/resources/fulfillment#post-fulfillments
Thanks Paul, that's helpful.
I haven't yet used the Shopify REST API - in flows or otherwise - does my set up look correct?
And to get access tokens, would I set up an app as per these instructions?: https://help.shopify.com/en/manual/shopify-flow/reference/actions/send-http-request#call-the-shopify...
Thanks
Yeah, looks pretty good. I would remove white space by using hyphens in your tags, just in case, like:
{{- variable -}}
Hey Paul,
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?
What is the URL should be?
I guess instead of {access_token} should be something? Where I can get it?
Also, for the making a fulfillment of a single product with a specific name if it exists in an order. Is it the correct code?
and flow settings:
You should try this request first through an API tool like Postman. It will make troubleshooting much faster. In order to get an API key, you need to create a custom app with the right scopes and get the key: https://help.shopify.com/en/manual/apps/app-types/custom-apps#enable-custom-app-development
For the URL consult the docs I posted earlier.
For the code, please post it as text and not an image.
Hey man, did it work for you?
Have the same task, but a bit lost in the nuances (
Hi Vicnovo, we've not tried it quite yet - adding some conditions, but will post back here when we do (likely next week).
Hi @no_robotocha just wondering how you went with this?
We tried to recreate the flow but it is giving us a 400 response error, we have tried troubleshooting with no success.
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.
Hi @no_robotocha, thank you for your reply and for your advise.
Will check it out.
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
"{{ personalizationId }}"
I was getting similar errors and this is how I fixed it:
Notice the headers and the filter on the fOrder ID.
Hi Jonas10, thank you for getting back to me. I'll give it a go.
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"
}
}
I'll note that you can now use Send Admin API request to simplify this, where you only need the variables part.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024