> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flows ## Article: Sample Flows ## Article Link: https://dev.wix.com/docs/api-reference/business-management/branches/sample-flows.md ## Article Content: # Branches: Sample Flows This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation. ## Create a branch and redirect a site owner for editing You can create a new branch for a site owner to edit and provide a button that directs them to the editor to make changes. This is useful when building apps that let site owners test changes in an isolated environment before applying them to their live site. To create a branch and redirect a site owner for editing: 1. Call [Create Branch](https://dev.wix.com/docs/api-reference/business-management/branches/create-branch.md). Specify a `name` for the branch and set the `sourceType` to `SOURCE_BRANCH` with `sourceBranchProperties` containing the ID of the branch to copy from (typically the site's original branch or current working branch). Collect the branch `id` from the response. 1. Call [Get Editor URLs](https://dev.wix.com/docs/api-reference/business-management/site-urls/editor-urls/get-editor-urls.md) to retrieve the appropriate editor URL for the site. 1. Append the branch ID as a query parameter to the editor URL. For example: ``` https://editor.wix.com/...&branchId=11111111-1111-1111-1111-111111111111 ``` 1. Display a button or link in your app interface. When the site owner clicks it, redirect them to the generated URL to begin editing the new branch. ## Organize branches using tags You can use tags to organize and categorize branches across multiple sites, making it easier to manage test sites at scale. This is useful when building apps that help agencies or developers manage branches across many client sites. To organize branches using tags: 1. Define a tagging strategy for your use case. For example, use tags like `ready-for-review`, `qa-testing`, or `client-approved`. 1. When creating a branch with [Create Branch](https://dev.wix.com/docs/api-reference/business-management/branches/create-branch.md), include initial tags in the `tags` field of the branch object. 1. To update tags on existing branches, choose the appropriate method based on your needs: - **Single branch**: Call [Update Branch](https://dev.wix.com/docs/api-reference/business-management/branches/update-branch.md) with the updated `tags` field. Make sure to include the current `revision` number to prevent conflicting changes. - **Multiple specific branches**: Call [Bulk Update Branch Tags](https://dev.wix.com/docs/api-reference/business-management/branches/bulk-update-branch-tags.md) with an array of branch IDs and specify which tags to assign or unassign. The response includes the result for each branch, including any errors. - **Branches matching criteria**: Call [Bulk Update Branch Tags by Filter](https://dev.wix.com/docs/api-reference/business-management/branches/bulk-update-branch-tags-by-filter.md) with a filter and specify which tags to assign or unassign. This method runs asynchronously and returns a job ID for tracking the operation's progress. 1. To filter branches by tags, call [Query Branches](https://dev.wix.com/docs/api-reference/business-management/branches/query-branches.md) with a filter on the `tags` field to retrieve branches that match your tagging criteria.