Flow Automation: Finding Markets via Action
You can use the Find markets action in Flow Automation to retrieve all markets created in your store, along with their settings, in a single step and pass them to later steps in the workflow. A market is a sales region you define by country or region, and each market can have its own currency, prices, and languages. For an introduction to markets, please refer to "Markets Overview."
This guide explains when to use this action, its field descriptions, the applicable workflows, and how to test it, and provides a practical example along with usage limits.
| Note: This action only queries market information. It does not change any market settings. |
When to Use the Find Markets Action
Use the Find markets action when:
- You sell in multiple markets and want to regularly review each market's currency, exchange rate, and price adjustment settings.
- You want to regularly check which markets are active or inactive.
- You need a list of markets to process one by one with a For each loop (iterate) step.
Field Descriptions
The Find markets action allows you to set how many markets to keep in the query results.
| Field | Description |
| Query conditions | Only the page_info condition is supported. Use it to specify which page of results to query. |
| The quantity to keep in the query result (Optional) | Sets the maximum number of markets kept per query. Based on the sorting rules, the top N markets are kept, up to a maximum of 100. |
Note: For each market found, you can click + Add variable in later steps to use the following information:
|
Applicable Workflows
The Find markets action is primarily used in workflows initiated by the following trigger:
- Scheduled time
Testing the Workflow
To test whether the workflow successfully retrieves the market list, follow these steps:
From your SHOPLINE admin panel, go to Markets, make sure your store has at least one market, and note the total number of markets.
Note: If your store has not created any markets, the query results will be empty. For more information about markets, please refer to "Markets Overview." - In Flow Automation, add the Scheduled time trigger. Set First trigger time to a few minutes from now, and set Repeat or not to Not repeating.
- Add the Find markets action. Leave Query conditions empty, set The quantity to keep in the query result to a number no less than the total number of markets in your store, and then click Publish.
After the first trigger time is reached, go to Flow Automation to check the execution results.
Note: For more information on how to monitor the execution of your workflows, refer to the "How to View the Running of a Flow" section in the "Introduction to Flow Automation" guide. - Open the workflow's run details and confirm that the number of markets, their names, and their settings (such as active status, selling currency, and exchange rate) match the information under Markets in your SHOPLINE Admin.
Example Use Case
Here is a practical example of using the Find markets action to remind your finance team to review manual exchange rates.
Scenario: Some markets use manually set exchange rates, which the system does not update automatically. Every Monday morning, find these markets and send an email reminding your finance team to check whether the exchange rates need to be adjusted.
- Trigger: Scheduled time (every Monday at 09:00)
- Action: Find markets
- The quantity to keep in the query result: No less than the total number of markets in your store
- Action: For each loop (iterate), which runs the following steps for each market found:
- Condition: [enabled] is equal to TRUE, and [auto_exchange_rate] is equal to FALSE
- Action: Send email
- Subject: Please Verify Market Exchange Rates: [market_name]
- Content: The selling currency for the [market_name] market is [currency_code], and the currently configured manual exchange rate is [exchange_rate]. Please check whether it needs to be updated based on the latest exchange rate. You can make changes in SHOPLINE Admin under Markets.
- Recipient: Manually enter your finance team member's email address
- Outcome: Your finance team receives a weekly list of markets to review, which prevents selling prices from becoming too high or too low because exchange rates haven't been updated for a long time.
Notes:
|
Usage Limits & Notes
- Capped results: Each run returns no more markets than the number set in The quantity to keep in the query result (up to 100). Set this number to no less than the total number of markets in your store so none are missed.
- No filtering by condition: The action returns your store's markets and cannot query only some of them. To process only certain markets, add a For each loop (iterate) step after it and add a condition inside the loop, such as [Enabled] is equal to FALSE.
- Query only: This action does not change market settings. To make changes, go to Markets in your SHOPLINE admin panel.
- No query results: If your store has not created any markets, the query results will be empty.