Switch product off or on, with redirect

ps_set_product_redirect

Write · preview + approveBlock 1 · Content & SEOPaid version onlyDaily connector

Switches off products you no longer sell and decides where visitors and Google land instead, or switches products back on.

Free TellMyShop Audit: No. This tool is only in the paid version of TellMyShop. The free TellMyShop Audit has only tools that read your store.

Ask Claude

„We stopped selling the Lumo lamp. Hide it and send people to the Garden lighting category.”

Example preview

Product 77 Lumo garden lamp: active -> off. Old URL: 301 redirect to category 12 Garden lighting (permanent, keeps the Google position).

Technical details

Product status. Switching off (end of sale) sets what customers and Google get at the old URL: 301-category or 302-category (redirect to a category, default the product's default category), 301-product or 302-product (to another product, give target_product), 404 (not found), 410 (gone for good), default (shop setting). 301 keeps the Google position and is the best choice for discontinued products. deactivate=false only sets the redirect, which applies once the product is switched off. activate=true switches a product on (instead of redirect_type), for example a draft from ps_create_product; a product priced 0 is not switched on, and missing images, stock or description give a warning.

Parameters

NameTypeRequiredDescription
shop_idintegernoShop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info.
changesarray of objectyesOne item per product. Max 100 items. Fields of each item: product (string, required): Product (id:123, ref:ABC-1, ean:..., product URL, ID, EAN or reference). Max 300 characters. redirect_type (enum: 301-category | 302-category | 301-product | 302-product | 404 | 410 | default): Redirect type. target_product (string): For 301-product / 302-product: the target product. Product (id:123, ref:ABC-1, ean:..., product URL, ID, EAN or reference). Max 300 characters. target_category_id (integer): For 301-category / 302-category: the target category (default the product's default category). deactivate (boolean): Switch the product off (default yes). activate (boolean): true = switch the product ON (instead of redirect_type).
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

Up to 100 products per call. Redirects only for product URLs; for any other old address (for example from the 404 report) use ps_manage_redirects. Revertible with ps_revert_change.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Use cases with this tool

Last updated: 2026-10-05