Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
i selected the query "Created in the last week" (about customers) and it made me some code
customer_date:<='{{ scheduledAt }}' AND customer_date:>'{{ scheduledAt | date_minus: "1 week" }}'
but then an error pops up that says
"scheduledAt" is invalid. Replace this variable.
i searched on the internet and chatgpt to fix this synthax but they all made it worse
Anyone knows how to fix this?
And also, why would shopify make the template code broken?
Click the "Add a variable" action in the edit query UI.
If scheduledAt is not in that list, then there is no schedule data available to that part of your flow.
If the Scheduled time trigger is directly connected to what has this issue, probably try and hard reload the shopify flow url; and test in a different browser.
Since we can't attach flows files here, an example flow JSON, save contents unformatted to a file with .flow extension to import into shopify flow:
Schedule customer query to Log output.flow
2fc8ff5c92cad7781b93dfe43c01e98567082a5352ccc08dc9aab72491ff9ef7:{"__metadata":{"version":0.1},"root":{"steps":[{"step_id":"0e8b3d00-a363-11ee-afa6-bf6712f80a55","step_position":[900,1240],"config_field_values":[{"config_field_id":"recurrence","value":"[\"DTSTART;TZID=America/New_York:20231225T120000\\nRRULE:FREQ=HOURLY;INTERVAL=1;WKST=MO\"]"}],"task_id":"shopify::flow::scheduled_time","task_version":"0.1","task_type":"TRIGGER","description":null,"note":null,"name":null},{"step_id":"1528a8a0-a363-11ee-afa6-bf6712f80a55","step_position":[1260,1240],"config_field_values":[{"config_field_id":"sort_by","value":"{\"sortKey\":\"CREATED_AT\",\"order\":\"ASCENDING\"}"},{"config_field_id":"max_root_records","value":"10"},{"config_field_id":"query","value":"customer_date:<='{{ scheduledAt }}' AND customer_date:>'{{ scheduledAt | date_minus: \"1 week\" }}'\n"}],"task_id":"shopify::flow::fetch::customers","task_version":"v1","task_type":"ACTION","description":null,"note":null,"name":"Get customer data"},{"step_id":"273db7b0-a363-11ee-afa6-bf6712f80a55","step_position":[1620,1240],"config_field_values":[{"config_field_id":"message","value":"{% for getCustomerData_item in getCustomerData %}\n {{getCustomerData_item.email}}\n{% endfor %}\n\n{{ getCustomerData | json }}\n"}],"task_id":"shopify::flow::print","task_version":"0.1","task_type":"ACTION","description":null,"note":null,"name":null}],"links":[{"from_step_id":"0e8b3d00-a363-11ee-afa6-bf6712f80a55","from_port_id":"output","to_step_id":"1528a8a0-a363-11ee-afa6-bf6712f80a55","to_port_id":"input"},{"from_step_id":"1528a8a0-a363-11ee-afa6-bf6712f80a55","from_port_id":"output","to_step_id":"273db7b0-a363-11ee-afa6-bf6712f80a55","to_port_id":"input"}],"workflow_name":"Schedule customer query to Log output"}}
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
As it says when you select that query, you need to use it with a schedule time trigger.
What are you trying to do?
I have same issue because I try to "fix" the welcome marketing block that is not triggering anymore when a customer subscribe.
Before I was selecting 100 customer but as SQL in your backend is done randomly I was try to improve it.
sot please, what I should change here to make it work(select the subscribed customer of last day)
customer_date:<='{{{{customer.createdAt}}}} }}' AND customer_date:>'{{ customer.createdAt | date_minus: "1 day" }}'
I don't know what you are trying to say there about SQL and the welcome marketing block. Or what "sot" means.
Why are you using so many brackets in your liquid?
customer_date:<='{{{{customer.createdAt}}}} }}'
This is more valid but you also may not need it (since it may be effectively saying "get all customers created before now").
customer_date:<='{{customer.createdAt}}'
Hi Paul_n
I try to explain myself better.
This code generate by shopify itself:
customer_date:<='{{{{customer.createdAt}}}} }}'
so if you ask, then ask internally at shopify ;).
About the SQL, nevermind, what i mean is I used a get customer block that as long I know, it query data data that satisfied .
As any query language usually the order is not guaranteed but probably this is another topic.
The point is, why the welcome automation marketing flow(not flow app, but marketing automation) is not working, anymore is a mistery.
No error whatsoever.
Bear in mind I tried with a never used test email, with no lack.
Hope to have some good insights.
If you have any chance please let know your managers that as a shopify avocate and Partner, I am starting to have concern regarding the quelity of feature and further develop at Shopify.
Lot of things not working anymore or stopped to work.
Support closing chat or not answering etc
Maybe your stackholder really do believe everything will be run by AI, wondering who do they will sell if merchants
won't be there anymore.
That code should not be inserting into your UI. I double-checked and do not see any action that inserts that.
Welcome automation should be working, but I haven't seen anything above suggesting otherwise. It seems like language may be a problem here, so you might have better luck reaching out directly to support. Or spend a bit more time outlining whatever issue you are seeing.
That code is generated at marketing automation block within Shopify admin API.
The welcome automation I set, did worked last time Saturday, then as I was running some ads and have organic visit, and signed people it should have worked, but nothing.
I then tested with an email, subscribed and "surfed", no emails that is set in this case
Hi, have you tried using the "Welcome new subscriber" automation template?
To learn more visit the Shopify Help Center or the Community Blog.
yes that one, it stopped to work recently for no reason
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024