Branch Lifecycle

Every branch moves through a defined lifecycle. Branches are created inside the relevant editor (Case Designer, Form Builder, Escalation Editor) — not directly from HxBranch.

StatusDescriptionWho can act
openBranch created, work in progress. The artifact is editable and diffs accumulate against the base (main).Branch creator, Admin
pending_reviewSubmitted for review. The branch is locked from further editing. The assigned reviewer is notified.Reviewer (to approve/reject)
approvedReviewer accepted the changes. Ready to be merged to main.Admin, branch creator
rejectedReviewer requested changes. Branch can be recalled back to open for further editing.Branch creator
mergedChanges applied to main configuration. Branch is read-only and retained for audit.System (on merge action)
closedBranch abandoned without merging. Retained for history.Admin, branch creator
[ open ] ----> [ pending_review ] ----> [ approved ] ----> [ merged ] │ ▼ [ rejected ] ----> recall ----> [ open ] [ open ] ----> [ closed ] (abandoned)

Branch Types

TypeWhat it tracks
case_typeChanges to a case type definition — stages, steps, SLA, transitions
formChanges to a form definition — fields, sections, visibility rules
escalation_treeChanges to an escalation tree — thresholds, actions, notification targets
connectorChanges to a connector configuration in HxBridge
generalFree-form change bundle — multiple artifact types in one branch

The Three Tabs

TabPurpose
BranchesList, filter, and manage all branches. View diffs (changed fields, added keys, removed keys with before/after values). Submit for review, approve, reject, or merge.
Pull from EnvConnect to a registered environment (staging, UAT, prod), browse its artifacts, and pull selected items as a new branch for comparison or promotion.
ConnectionsRegister environments with their URL and API token. Test connectivity. Tokens are stored encrypted on the backend.

Review Workflow

  1. A designer makes changes in Case Designer (or Form Builder / Escalation Editor) and clicks Create Branch. They assign a reviewer and enter a branch description.

  2. When ready, the designer clicks Submit for Review. The branch moves to pending_review and the reviewer is notified.

  3. The reviewer opens HxBranch > Branches, selects the pending_review branch, and views:

    Diff tab — every changed field with old > new value highlighted

    Audit tab — full event history (created, submitted, recalled, etc.)

  4. Reviewer clicks Approve (or Reject with comment to send it back).

  5. Once approved, any admin or the creator clicks Merge to main. The artifact changes are applied to the live configuration.

Merges are applied immediately. New cases and form submissions will use the merged configuration from the next request onwards. Test in a staging environment before merging to production config.

Pulling from a Remote Environment

  1. First, register the environment under Connections: add a name, URL, and API token, then click Test.

  2. Go to Pull from Env tab. Select the registered environment.

  3. Browse the remote's artifacts: case types, forms, escalation trees.

  4. Select the items to pull and click Pull as Branch. A new branch is created with the remote artifact as its content.

  5. Review the diff vs. main > submit for review > approve > merge if desired.

Use case: Pull your staging environment's case type into a branch to compare it with dev before a release, or to promote staging config changes back to dev.

Diff View

The diff for each branch shows exactly what changed in the artifact JSON:

Conflict detection: If the base artifact was modified after the branch was created, HxBranch flags conflict_detected: true on the branch. Resolve by recalling the branch, rebasing the content, and resubmitting.

Audit Trail

Every branch has a complete audit event log, visible in the Audit tab:

EventWhen it fires
branch_createdBranch is first created
submitted_for_reviewStatus changes to pending_review
recalledBranch pulled back from pending_review to open
reviewedReviewer approves or rejects
content_savedBranch content is updated while open
mergedBranch merged to main
reverted_to_baseBranch content reset to match the base
branch_deletedBranch permanently removed

API Reference

MethodPathDescription
GET/api/v1/branchesList branches (filter by status, type, artifact_id)
POST/api/v1/branchesCreate a branch
GET/api/v1/branches/{id}Branch detail + diff
POST/api/v1/branches/{id}/submitSubmit for review (open > pending_review)
POST/api/v1/branches/{id}/recallRecall from review (pending_review > open)
POST/api/v1/branches/{id}/reviewApprove or reject with comment
POST/api/v1/branches/{id}/mergeMerge approved branch to main
GET/api/v1/branches/{id}/auditAudit event log for a branch
GET/api/v1/deploy/environmentsList registered environments (for Pull from Env)