{"id":102673,"plugin_id":"plugin_asdk_app_6a79f1d2046c8191abe959a682371e57","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-18T06:12:29.427Z","digest":"0f40879db70f7de4f24dc3f4a2551dbd3ec4a184c3e677b2da773be59f4ea565","against":null,"payload":{"description":"This skill should be used when a CallRail agency asks to \"export all my tracking numbers\", \"list every tracker across clients\", \"give me an account inventory\", \"check call recording compliance\", \"do we have recording notices\", \"audit our users and admins\", \"clean up tracker names and source rules\", \"onboard a new client\", \"set up a new company from a template\", \"create the same setup for every client\", or needs a full account export or one-pass client setup that the CallRail UI can't do in one step.\n","included_files":[],"name":"bulk-setup-audit","skill_md_contents":"---\nname: bulk-setup-audit\ndescription: >\n  This skill should be used when a CallRail agency asks to \"export all my tracking numbers\",\n  \"list every tracker across clients\", \"give me an account inventory\", \"check call recording compliance\",\n  \"do we have recording notices\", \"audit our users and admins\", \"clean up tracker names and source rules\",\n  \"onboard a new client\", \"set up a new company from a template\", \"create the same setup for every client\",\n  or needs a full account export or one-pass client setup that the CallRail UI can't do in one step.\n---\n\n# Bulk setup and audit\n\nBefore starting, read [ChatGPT runtime guidance](../../references/chatgpt-runtime.md).\n\n**Scope.** This skill covers the account's admin side: inventory, exports, compliance, configuration hygiene, users and new-client setup. Anything that affects a client's calls or reports (no tracking, forwarding loops, number swapping off, recording off, unused numbers, voicemail, call trends) belongs to agency-health-check, so this skill doesn't flag those. The inventory still shows the raw data (active trackers, website script active, calls in 28 days) for each client.\n\n## Which accounts this covers\n\nThe connector can reach every CallRail account the signed-in user has access to, and nothing else. That can be one agency account with many client companies, several separate client accounts the user was added to, or both. In CallRail an account holds companies, and each company is usually one client.\n\n1. Call `get_account`. It lists every account this user can reach.\n2. One account: use it. Several: show the account names and ask which to cover (one, several or all). If the user already named accounts or clients, use those and don't ask.\n3. Run the workflow once per account, passing that `account_id` on every call. Never mix data from different accounts in one call or one total.\n4. Report each account in its own section. Account-wide numbers and patterns are per account, and a client in one account never appears in another account's results.\n5. The skill sees only what the user's role allows in each account. If a call fails with a permission error (for example forms or users for a reporting-only user), say which account and what was skipped, and keep going.\n6. If a client the user names isn't in the chosen accounts, search `list_companies` in the user's other accounts before saying it doesn't exist.\n\nSetup mode creates the new company in one account. If the user can reach several, ask which account it belongs in and confirm the account name back before any write. Creating companies, numbers and users needs a role in that account that's allowed to do it. If a write fails with a permission error, stop, say which account and what was and wasn't created.\n\nTwo modes. **Audit** builds a full inventory of each account and an admin cleanup list. **Setup** creates a new client company from an agency template in one pass. Ask which mode if the request is unclear.\n\n## Rules for every connector response\n\n- **Check for `_truncated`.** When a response is too large, the connector returns fewer records than requested and adds a `_truncated` object (field, showing, total, message). If it's present, re-request that range with a smaller `per_page` until it's gone. Never treat a truncated page as complete.\n- **Page size 100 or less**, and page until `page` equals `total_pages`. Check the total collected against `total_records`.\n- **Trackers: start with `per_page: 80`.** Long call flows can exceed result limits. Reduce the page size and restart pagination if needed; inline results are valid.\n- **Large responses save to files.** Parse saved files with code (Python or similar) and do all counting there. Consume inline structured results directly. If a result cannot be read, narrow the query or request smaller pages; de-duplicate by id.\n\n## Audit mode (read-only)\n\n1. **Clients:** `list_companies` with `status: active` (paged per the rules above). Keep id, name, created date and `dni_active` (whether CallRail sees the website swap script running). Count disabled clients from `total_records` with `status: disabled` (`per_page: 1` is enough for the count).\n2. **Trackers, account-wide:** `list_trackers` with `status: active`, **no `company_id`**, `fields=swap_targets`, `per_page: 80`. Never loop client by client: one large agency took 19 account-wide pages vs 916 per-client calls. Each tracker includes its company id.\n3. **Call volume (for context):** `get_calls_summary` with `group_by: company_id`, `fields=total_calls`, last 28 days.\n4. **Tags:** `list_tags` with `tag_level: account` for the shared tags. For company-level tags, report only the total from `total_records` (they are usually the same default tags copied into every client; one account had 12,572). Pull company tags only for a named client on request.\n5. **Users:** check size first with `list_users` (`per_page: 1`): `total_records` gives the user count. Each user record includes every company that user can see, so on large accounts only one user fits per response. If users x active clients is over 20,000, skip the user detail, report the user count only, and say why. Otherwise page through users and record name, email domain, role, accepted, and number of companies.\n\n### Findings to compute\n\n**Admin companies:** clients whose names contain \"template\", \"transfer\" or \"test\" (whole words, case-insensitive). List them once as \"admin or template companies\". Include them in the recording-notice and shared-destination findings (a transfer company still records real callers, and a template's settings are copied into every new client), and leave them out of the other findings.\n\n| Finding | Rule | Suggested check |\n|---|---|---|\n| Recording with no notice | `recording_enabled` true and no greeting: basic flow with empty `greeting_text` and no `greeting_recording_url`, or advanced flow with no `greeting` step | Add a recording notice. Matters most in all-party consent states (for example CA, FL, IL, MD, MA, PA, WA). Say \"check with counsel,\" never \"this is illegal\" |\n| Shared destination across clients | The same `destination_number` on trackers in 2 or more clients | Confirm it's intended (a brand-wide 800 line or a shared call center) and not a copy-paste error |\n| Source rules that may never match | `landing_params` rule starts with \"?\" or \"&\"; or uses a different parameter key (for example `utm_source`) than most trackers in the account (for example `utm_campaign`) | Fix the rule. Also list trackers whose name doesn't match their `utm_campaign` value, as low priority |\n| Trackers with no number | Active tracker with an empty `tracking_numbers` list | Disable or add a number |\n| Duplicate tracker names | Same name twice inside one client, after trimming spaces and ignoring case. Also list names with leading or trailing spaces | Rename so reports are readable |\n| Texting off on text-capable numbers | `sms_supported` true and `sms_enabled` false | Count only; mention if the agency sells texting |\n| Admin sprawl (when users were audited) | Many admins, or admins on personal email domains | Downgrade anyone who only needs reports |\n\n### Output\n\n1. **Headline:** clients, trackers, tracking numbers, and the top 2 to 3 cleanup items with counts. Lead with compliance (recording with no notice) when it's found. End with one line: for client-impact checks (no tracking, unused numbers, swapping, voicemail), run agency-health-check.\n2. **Findings table** (above), sorted by risk first (compliance, shared destinations), then tidiness. Show checks that found nothing as \"0\" so the reader knows they ran.\n3. **Workbook** (use the available spreadsheet capability):\n   - `Companies`: id, name, created, website script active, active trackers, tracking numbers, calls last 28 days.\n   - `Trackers`: client, tracker, type, source rule, numbers, count, destination, SMS enabled, recording, greeting present, created. Skip campaign name; it is almost never set.\n   - `Findings`, plus one sheet per finding list (for example `Shared destinations`).\n   - `Not audited`: anything skipped and why (users, company tags, admin companies).\n4. Never write anything in audit mode.\n\n## Setup mode\n\n1. **Template.** Use the appendix format. Ask for client name, time zone, destination number, area code, and which trackers, tags and users. Offer to copy the structure of an existing client the agency names (read its trackers and tags first).\n2. **Plan before any write:**\n\n| Step | Tool | Details | Cost or risk |\n\n   Mark every tracker step \"Buys a phone number (billed)\". Session trackers buy `pool_size` numbers (minimum 4). Mark user steps \"Sends an invite email to this person.\"\n3. **Dry run** (default, or \"test\" / \"preview\"): stop after the plan.\n4. **On explicit approval**, run in order:\n   - `create_company`. New companies come with 4 default tags (Conversion, Existing Customer, Opportunity, Other). Skip any template tag that matches one of these (ignore case).\n   - Trackers (`create_source_tracker` or `create_session_tracker` with the new `company_id`). Always pass `sms_enabled` and `recording_enabled` explicitly; texting turns on when omitted. When recording is on, always pass `greeting_text` with a recording notice.\n   - `create_tag` (company level) for the remaining tags.\n   - `create_user` (with `companies: [new id]`).\n   - Stop at the first error and report what was and wasn't created.\n5. **Verify:** read back with `list_trackers` (`company_id`) and `list_tags` (`company_id`) and confirm each item exists with the settings in the plan.\n6. **Finish** with the new company id, tracking numbers, the swap script URL from the `create_company` response, and what still has to be done in the CallRail app (the connector can't set call flows beyond basic routing, website pool size changes, Multiscripts, integrations, form tracking or AI feature toggles). Also list how to undo the test if it was one (disable the company in the app, which releases its numbers).\n\n### Guardrails\n\n- Never create users with the `admin` role unless the user names it explicitly.\n- One company per approval.\n- Phone numbers must be E.164 (example: +14045551234). Confirm the destination number back to the user before writing.\n- For tests, prefer 1 source tracker (1 number) over a session pool (4+ numbers).\n\n## Appendix: setup template\n\n```\nclient_name: Smile Dental Midtown\ntime_zone: America/New_York\ndestination_number: +14045551234\narea_code: 404\nrecording_enabled: true\nrecording_notice: \"This call may be recorded for quality assurance.\"\nsms_enabled: true\n\nsession_trackers:\n  - name: Website Pool\n    pool_size: 4          # 4-50, each number is billed\n    source: all\n    swap_targets: [+14045551234]\n\nsource_trackers:\n  - name: Google Business Profile\n    source_type: google_my_business\n  - name: Google Ads Call Extension\n    source_type: google_ad_extension\n  - name: Billboard I-85\n    source_type: offline\n    campaign_name: Q4 billboard\n\ntags:                     # company level; defaults already exist\n  - new-patient\n  - booked\n  - insurance-question\n\nusers:\n  - first_name: Dana\n    last_name: Lee\n    email: dana@smiledental.com\n    role: reporting        # admin, manager or reporting\n```\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}