Step-by-step scenarios
Common Bitrix24 CLI tasks step by step: the first sync, keeping the copy fresh, safe agent writes.
Each scenario is a common task in order: the commands to run, why each one runs and what to look at in the answer. The same scenarios are in the terminal: b24 guide lists them and b24 guide <name> prints one.
Commands that use an account start with your profile, the name you gave the account at login: b24 <profile> ….
First sync and the pipeline board
Copy your deals and leads into the local store and see where each one stands.
-
b24 session startpaste the portal's incoming webhook address; it is checked against the portal and kept in the keyring
-
b24 session status --checkthe employee the webhook acts as, and whether they are a Bitrix24 administrator
-
b24 users listyour own user id and the ids of the colleagues whose deals you want
-
b24 config set crm.bitrix24:example.bitrix24.ru.unassigned 1whose deals and leads to copy, by user id, comma-separated, with your portal's host in place of example.bitrix24.ru; until you choose, a sync copies nothing
-
b24 synccopies the chosen users' deals and leads and their clients; the next sync takes only the changes
-
b24 pipelines show Salesthe pipeline as a board, how many deals stand in each stage and how many reached it
-
b24 deals list status:openthe open deals with stage, amount and owner, from the store, offline too
What to look at:
- scope in the sync answer, which says whose deals and leads it copied
- issues in the sync answer, such as a user it could not take or a scope the webhook lacks
- the stage where most deals wait
example.bitrix24.ru stands for your portal's host, and 1 for the ids you chose. A webhook is often a colleague's,
so b24 never picks whose deals you copy.
In the terminal: b24 guide first-sync
Keep the copy up to date
Have the local store follow the portal on its own, and search it beside your other WireCat tools.
-
b24 schedule command crm --every 1h -- synca timer on this computer that runs sync every hour; it reads only what changed
-
b24 schedule listthe schedule, when it runs next and how its last run went
-
b24 store statushow far each kind's sync is, how many records are stored and when it last ran
-
b24 search all kitchenstored deals and leads beside your messages, notes and meetings from other WireCat tools
What to look at:
- a schedule whose last run failed
- a kind in store status that is partial, which the next sync goes on with
In the terminal: b24 guide keep-in-sync
Let an agent change the CRM without surprises
Give an agent your CRM over MCP while the writes that reach clients or cannot be undone stay yours.
-
b24 config set permissions.deals.move readonlya stage change can start the portal's robots, which write to clients; over MCP ask does not ask, so ask stops nothing there
-
b24 config set permissions.deals.delete denyno agent deletes a deal, whatever it is asked
-
b24 mcp add claude-code --permission leads.delete=deny --allow-writesadd this profile to Claude Code; this server also refuses lead deletes, and --allow-writes acknowledges the writes it still offers
-
b24 config showeach permission with its level and where it came from
-
b24 runs listwhat the agent ran, refused writes too
What to look at:
- the levels of deals.move, deals.delete and leads.delete in config show
- refused runs in runs list, and which command asked
At a terminal ask still asks before the write. Over MCP nobody is there to answer, so a write at ask goes ahead;
set readonly or deny, or turn on approval of b24_write in the agent client.
In the terminal: b24 guide safe-agent-writes