Requires Powercode build 26.10.05 or later.
Bulk Tag Customers adds or removes customer tags on many customers at once. You choose the customers with a query or a saved custom report, and Powercode lists exactly who matched and what would change for each of them before anything is written. Untick anyone you want to leave alone, then apply.
Use it for jobs like tagging every active customer in one town, or taking a tag off every customer a report finds. If you only need to pick customers by the tags they already carry, the Customer Tags Report does that without a query. To tag a list of customer IDs you already have in a spreadsheet, use the CSV upload described in Customer Groups and Customer Tags.
In Admin Mode, go to Accounts > Bulk Tag Customers.
| Permission | Why it is needed |
|---|---|
| Tags (System → Users) at View | To open the page. It is also what shows the menu entry. |
| Custom Reports (Reports → Custom) at View | To open the page, because the customers are chosen by a query. At View you can only choose from saved reports. |
| Custom Reports at Edit | To write your own query, to use the AI helper, and to save your query as a report with Create Report. |
| Tags at Edit | To add tags. |
| Tags at Delete | To remove tags. |
| Admin Mode Permission (System → Configuration) | To see the menu entry, which is in Admin Mode. |
| Use AI features (Modules → AI) | Only for the AI helper. |
Each level includes the ones below it, so Delete on Tags lets you both add and remove. By default the Administrator and Owner groups have all of these.
Under Customer Query, use Saved report to choose where the customer list comes from:
The query box is labeled Write a SELECT that returns a CustomerID column. The query runs read-only. The rules are:
SELECT statement. A query that starts with WITH is also accepted. Anything else, or a second statement after a semicolon, is refused.CustomerID. Capitalization does not matter. If your column has a different name, rename it with AS CustomerID.CustomerID column that are not plain whole numbers, such as blanks or text, are ignored.For example, the query shown in the empty box:
SELECT CustomerID FROM Customer WHERE Status = 'Active'
A saved report works the same way as a typed query: it must return a CustomerID column. A report saved from the Customer Tags Report keeps that column, so you can use it here.
A report that runs against a different database cannot be used, because its IDs are not Powercode customer IDs.
If AI is turned on, a Describe the customers you want box appears above the query box. Describe the customers in plain English, for example Active customers on fiber with no service call in the last year, then click Build Query or press Enter.
The AI writes a query that returns a CustomerID column and puts it in the query box, with a short note about any assumptions it made. Nothing runs against your customers until you click Preview Matches, so read the query first. To adjust it, describe the change and click Build Query again; each description builds on the query already in the box. You can also edit the query by hand.
The AI helper uses the same AI service as the AI Report Builder, so the same rules apply: the AI is given your database layout, not your customer data.
The AI helper only appears when all of these are true:
Click Preview Matches. Powercode runs the query and lists every matched customer under Matched Customers. Everyone starts out ticked.
| Column | What it shows |
|---|---|
| Customer ID | Click it to open the customer in a new tab. |
| Name | The customer's name, or their company name if they have no name. |
| Status | The customer's status. |
| Current Tags | The tags the customer has right now. |
| Effect | What Apply will do to this customer once you choose tags: Will add, Will remove, No change (they already are as requested) or Not selected (they are unticked). |
Export CSV downloads every matched customer, from all pages, with the same columns, including Effect. Export before you apply if you want a record of everyone's tags as they were.
Create Report saves your query as a custom report on the Reports dashboard, so you can run it again later. You need Custom Reports at Edit to see it. It is not offered when the customers came from a saved report, since that is already a report.
The preview belongs to the query that produced it. If you change the query, choose a different saved report or change the dates, the list disappears and you need to click Preview Matches again.
Only the tags you choose are touched. Adding never takes any other tag away, and removing only takes away the tags you chose.
SELECT.| Symptom | Likely cause |
|---|---|
| Bulk Tag Customers is not in the Accounts menu | You are missing Tags, or you are not in Admin Mode or do not have Admin Mode Permission. |
| You do not have the appropriate permission to view this page. Please contact your administrator for assistance | You have Tags but not Custom Reports. The menu entry only checks Tags. |
| There is no query box, only a list of saved reports | You have Custom Reports at View, not Edit. |
| The Describe the customers you want box is missing | AI is off, you are missing Use AI features or Custom Reports at Edit, or a saved report is selected. |
| Choose a saved report or write a query. | Nothing is selected or typed. If you can only use saved reports, there may be no custom reports yet. |
| Enter a query that returns a CustomerID column. | The query box is empty. |
| Only SELECT queries are allowed here. | The query does not start with SELECT or WITH. |
| Only a single statement can be run. Remove the extra semicolon. | There is more than one statement. Remove everything after the first one. |
| The query must return a CustomerID column. | No column in the results is named CustomerID. Add AS CustomerID to the right column. |
| The query matched no customers. | The query ran but found nobody. |
| The query matched more than 5,000 customers. Please narrow the query. | Add conditions so it matches 5,000 customers or fewer. |
| N matched id(s) no longer exist and were dropped. | Some IDs the query returned belong to customers that no longer exist. Everyone else is listed normally. |
| Choose a start date and an end date for this report. | The saved report needs a date range. Fill in Start Date and End Date. |
| The end date cannot be before the start date. | Swap the dates. |
| This report runs against database, so its results cannot be used to tag customers. | The saved report reads a different database. Use a report that reads Powercode's own data. |
| A database error appears under the query | The query has a mistake. The message comes from the database. |
| Describe the customers you want first. | Build Query was clicked with the description box empty. |
| AI features are disabled. or No AI credential is configured for your account. | See AI Providers. |
| The generated query did not run cleanly: … | The AI's query failed when it was tried. It is still in the query box, so fix it by hand or describe the change and try again. |
| Add tags or Remove tags is greyed out | You need Tags at Edit to add, or at Delete to remove. |
| Apply stays greyed out | No tags are chosen, none of the ticked customers would change, or you lack the permission for the chosen action. |
| This run does not match a recent preview. Preview the query again before applying. | Your preview has expired, for example because you logged out, or you ran several newer previews in other tabs. Click Preview Matches again. |
| N customer(s) failed. with a Retry N failed button | Those customers could not be updated. The first ten are listed with the reason. Customer not found means the customer no longer exists. Retry sends the same tags to just those customers. |
| N customer(s) failed, P of them only partly … | For some customers, some of the tags were changed before the failure. Those tags are named on each line. Click Retry to finish the rest. |
| N customer(s) had tags applied but no customer event could be written. … | The tags were changed, but the customer event could not be saved. The change was recorded in the System Event Log instead. |
| A report already runs this query: name (#ID). | Create Report found an existing custom report with the same query. Use that one. |