Menu
site_route
Resolve a URL path to the catalog or content object it points at (product, category, brand, page, blog post) or its redirect.
Use it in a workflow
- Add a step and choose the BigCommerce Storefront connector.
- Pick the site_route action (under Route).
- Fill in the fields below, then reference the result from later steps as
{{siteRoute.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query SiteRoute($path: String!, $redirectBehavior: RouteRedirectBehavior!) {
site {
route(path: $path, redirectBehavior: $redirectBehavior) {
node {
id
}
redirect {
id
fromPath
to {
__typename
}
toUrl
}
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"path": "string",
"redirectBehavior": "FOLLOW"
}
Response
Read the result with {{siteRoute.response.data.data.route}}. If the API returns errors, the step fails and they are at {{siteRoute.response.data.errors}}.
Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?