autotouch-cli 0.2.109__tar.gz → 0.2.113__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/PKG-INFO +21 -5
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/README.md +20 -4
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/cli.py +8 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/columns.py +63 -1
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/list_build.py +5 -2
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/sequences.py +170 -1
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/data/CLI_REFERENCE.md +125 -9
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/data/cli-manifest.json +1686 -927
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/parser.py +3 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/templates.py +228 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/PKG-INFO +21 -5
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/list_build_contract.py +2 -2
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/search_contract.py +6 -4
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/pyproject.toml +1 -1
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/MANIFEST.in +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/__init__.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/cli_contracts.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/__init__.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/agents.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/auth.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/cells.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/integrations.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/jobs.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/leads.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/linkedin.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/outreach.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/prompts.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/rows.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/search.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/sender_accounts.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/tables.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/tasks.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/webhooks.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/commands/workspace_secrets.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/__init__.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/auth.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/config.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/csv_import.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/http.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/io.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/output.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/polling.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/run.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/core/validation.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/exceptions.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/mongo_status.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/parser_groups.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/sequence_support.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/workflows/__init__.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli/workflows/registry.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/SOURCES.txt +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/dependency_links.txt +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/entry_points.txt +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/requires.txt +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_cli.egg-info/top_level.txt +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/__init__.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/linkedin_contract.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/linkedin_filters.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/product_lifecycle.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/autotouch_shared/provider_registry.py +0 -0
- {autotouch_cli-0.2.109 → autotouch_cli-0.2.113}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: autotouch-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.113
|
|
4
4
|
Summary: Autotouch Smart Table CLI
|
|
5
5
|
Project-URL: Homepage, https://app.autotouch.ai
|
|
6
6
|
Project-URL: Documentation, https://github.com/nicolonic/autotouch_main/tree/main/docs/research-table/reference
|
|
@@ -169,23 +169,29 @@ autotouch rows get --table-id "$TABLE_ID" --row-id "$ROW_ID" --output json
|
|
|
169
169
|
- Run controlled slices: `autotouch columns run-next`
|
|
170
170
|
- Poll authoritative state: `autotouch jobs get`
|
|
171
171
|
- Create/activate sequences: `autotouch sequences recipe`, `autotouch sequences create`, `autotouch sequences activate`
|
|
172
|
+
- Choose Instantly/Smartlead sender pools for bulk sequences: `autotouch sequences sync-accounts`
|
|
172
173
|
- Query leads: `autotouch leads query`
|
|
173
174
|
- Find a lead by email or phone: `autotouch leads query --search '<email-or-phone>' --limit 10`
|
|
174
175
|
- Create table webhook ingest tokens: `autotouch webhooks rotate`, `autotouch webhooks configure-ingest`, `autotouch webhooks ingest`
|
|
175
176
|
|
|
176
177
|
## Sequence Automation Choices
|
|
177
178
|
|
|
178
|
-
When a user asks to create a campaign sequence, distinguish
|
|
179
|
+
When a user asks to create a campaign sequence, distinguish these separate decisions:
|
|
179
180
|
|
|
180
181
|
- Manual AI-draft review: `autotouch sequences recipe --type manual_review` (or `create`) sets `executionMode=MANUAL` and `aiDraft=true`; AI drafts content and a human approves/completes each task.
|
|
181
182
|
- Template-based automated send: `autotouch sequences recipe --type automated_template` (or `bulk_automated`) sets `executionMode=AUTOMATED` and `emailSendMode=AUTOMATED` with fixed templates; use this when the user explicitly asks to automate sending without review.
|
|
182
183
|
- LinkedIn-assisted outreach: `autotouch sequences recipe --type linkedin_outreach` uses an automated profile visit followed by manual AI-draft LinkedIn connection, LinkedIn message, and fallback email tasks. Use it only when LinkedIn touches are part of the campaign.
|
|
184
|
+
- Research-field routing: `autotouch sequences recipe --type research_field_routing` starts one source-table sequence that routes each enrollment by a research-table column value, such as persona, segment, territory, product line, or campaign path.
|
|
183
185
|
|
|
184
186
|
If the user says "automate the sequence" without asking for AI-written sends, choose the template-based automated path. Offer manual AI-draft review as the higher-personalization path, but call out that it creates upfront manual tasks while the system learns.
|
|
185
187
|
|
|
188
|
+
For bulk Instantly/Smartlead sequences, email sender accounts live on the provider campaign, not on each enrollment. Use `autotouch sequences sync-accounts --sequence-id <SEQUENCE_ID> --account-selection all_eligible` for the org's eligible provider-account group, or `--account-selection selected --selected-account sender@example.com` for specific provider mailboxes. For personal mailbox or LinkedIn steps, use enrollment sender routing only when the user asks for explicit sender pinning or team routing.
|
|
189
|
+
|
|
190
|
+
Keep `requiredVariables` limited to variables that the sequence actually needs. If a variable is listed there, every provider enrollment must hydrate it from lead context, research-table mappings, or explicit overrides; unused required variables can block an otherwise valid bulk campaign.
|
|
191
|
+
|
|
186
192
|
Version guard:
|
|
187
193
|
|
|
188
|
-
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.
|
|
194
|
+
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.112` or newer.
|
|
189
195
|
- If `python3 -m pip install -U autotouch-cli` upgrades the package but `which autotouch` still points at an older shim, run the upgraded binary directly or fix PATH before creating production sequences.
|
|
190
196
|
- Before authoring a LinkedIn sequence, inspect the live recipe:
|
|
191
197
|
|
|
@@ -201,6 +207,14 @@ As of `0.2.107`, that recipe emits:
|
|
|
201
207
|
4. connected branch -> `LINKEDIN_CHAT_MESSAGE` - `MANUAL`, `aiDraft=true`
|
|
202
208
|
5. not-connected branch -> `EMAIL` - `MANUAL`, `emailSendMode=MANUAL`, `aiDraft=true`
|
|
203
209
|
|
|
210
|
+
For one sequence with multiple paths based on a source-table value, inspect the route recipe:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
autotouch sequences recipe --type research_field_routing --output json --compact
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Use one `source_field_route` condition with `columnKey`, one route case per expected value, and a default route for blank or unexpected values. Extend the route cases when the user needs more paths. Create separate sequences only when the paths require separate reporting, sender pools, schedules, ownership, or activation controls.
|
|
217
|
+
|
|
204
218
|
## Neural Search vs Durable List Build
|
|
205
219
|
|
|
206
220
|
Autotouch has two different company/people discovery paths.
|
|
@@ -209,7 +223,7 @@ Use `autotouch search companies` for Exa Company Search when the target is basic
|
|
|
209
223
|
|
|
210
224
|
Use `autotouch search similar-companies` as a convenience wrapper for Exa Company Search similarity. Prefer `--query` for Exa's documented semantic patterns, such as "companies like Notion", "competitors of Stripe", or "companies working on making space travel cheaper". The older seed fields `company_name`, `company_domain`, and `company_description` remain available when you want the CLI/API to compose that query; it does not use Exa `/findSimilar`.
|
|
211
225
|
|
|
212
|
-
Use `autotouch search people` for provider-hidden people search when the target is niche, semantic, or hard to express with structured filters. People search currently returns at most 10 results per API call and costs 1 credit per API call.
|
|
226
|
+
Use `autotouch search people` for provider-hidden people search when the target is niche, semantic, or hard to express with structured filters. Describe the person or responsibility in natural language, for example "person responsible for endpoint management and SaaS app access", then use company, location, title, or skills only as optional anchors. People search currently returns at most 10 results per API call and costs 1 credit per API call.
|
|
213
227
|
|
|
214
228
|
Use `autotouch list-build companies` and `autotouch list-build leads` for structured, repeatable LinkedIn/Sales Navigator list construction. This is the only CLI path for building LinkedIn-sourced company and lead lists. Treat list builds as the sourcing step for the Smart Table research workspace: build company/account records first by default, sync the records to a research table with `autotouch list-build sync-to-table`, then enrich, score, segment, find related leads, attach signals/notes, and continue downstream workflows from that table. Use lead builds directly when the request is explicitly person/contact focused. This path uses Autotouch-managed provider access, so users do not need to connect their own LinkedIn account. Use filters like geography IDs, company size, industry IDs, title/persona, and current company IDs; call `autotouch list-build inputs` for supported values. Durable list builds run as background jobs with status/results endpoints and cost 1 credit per successful non-empty result page.
|
|
215
229
|
|
|
@@ -306,7 +320,7 @@ For automation or agent-driven setup, use:
|
|
|
306
320
|
- `autotouch cli-manifest --output json` for the local machine-readable command contract
|
|
307
321
|
- `autotouch cli-reference` for the shipped parser-generated reference
|
|
308
322
|
- `autotouch capabilities --output json` for provider/workflow contracts
|
|
309
|
-
- `autotouch --version` should be `0.2.
|
|
323
|
+
- `autotouch --version` should be `0.2.112` or newer for structured company list builds without user-supplied keywords, stored list-build input lookup, research-workspace list-build guidance, the cleaned single LinkedIn-sourced list-build path, Exa Company Search up to 100 results, scheduled agent `--target ACCOUNTS|LEADS`, `agents signals --target`, the `agent-to-sequence` and `agent-to-leads` workflow scaffolds, paced HTTP Request column contracts, branch-aware LinkedIn sequence recipes, sequence campaign intake guards before mutating objects, real agent soft-delete with associated-table handling, research-table sequence handoff assignee and active-sequence-conflict guard config, backend-owned directional source/destination helpers, goal-level workflow plans, website visitor/external intent webhook workflow guidance, create-time agent assignment defaults, company-page signal configuration guidance, sequence authoring warnings when AI draft is mixed with fixed templates, sender-account discovery/management for explicit sequence routing, mixed parent-row/child-list Sync to Table and Sync to Leads recipe configs, and company variable guidance for `company_name_clean` versus internal match keys
|
|
310
324
|
- `autotouch capabilities --output json --select list_builds` for documented list-build inputs such as geography IDs, company size buckets, profile language, and company IDs
|
|
311
325
|
- `autotouch integrations list` and `autotouch integrations status --provider <provider>` before choosing source/destination workflows
|
|
312
326
|
- `autotouch workflows plan --type bulk-outreach` and `autotouch workflows scaffold --type bulk-outreach --out-dir workflow` for goal-level workflow planning
|
|
@@ -345,6 +359,8 @@ Schema ownership rules:
|
|
|
345
359
|
|
|
346
360
|
Prompt variables in authored prompts support nested JSON access:
|
|
347
361
|
- Use flat row variables like `{{company_name}}` for scalar columns.
|
|
362
|
+
- Use `{{company_name_clean}}` in outreach copy when you want a suffix-stripped readable company name (`Acme, Inc.` → `Acme`).
|
|
363
|
+
- Do not use `{{company_name_normalized}}` in outreach copy; it is an internal company match key for fallback lookup/debug use.
|
|
348
364
|
- Use dotted placeholders like `{{linkedin_lookup.linkedin_url}}` when the source column stores JSON or stringified JSON.
|
|
349
365
|
- For arrays, use numeric indexes such as `{{contacts.0.email}}`.
|
|
350
366
|
- This is different from config payload mappings, which use objects like `{ "column": "linkedin_lookup", "path": "linkedin_url" }`.
|
|
@@ -144,23 +144,29 @@ autotouch rows get --table-id "$TABLE_ID" --row-id "$ROW_ID" --output json
|
|
|
144
144
|
- Run controlled slices: `autotouch columns run-next`
|
|
145
145
|
- Poll authoritative state: `autotouch jobs get`
|
|
146
146
|
- Create/activate sequences: `autotouch sequences recipe`, `autotouch sequences create`, `autotouch sequences activate`
|
|
147
|
+
- Choose Instantly/Smartlead sender pools for bulk sequences: `autotouch sequences sync-accounts`
|
|
147
148
|
- Query leads: `autotouch leads query`
|
|
148
149
|
- Find a lead by email or phone: `autotouch leads query --search '<email-or-phone>' --limit 10`
|
|
149
150
|
- Create table webhook ingest tokens: `autotouch webhooks rotate`, `autotouch webhooks configure-ingest`, `autotouch webhooks ingest`
|
|
150
151
|
|
|
151
152
|
## Sequence Automation Choices
|
|
152
153
|
|
|
153
|
-
When a user asks to create a campaign sequence, distinguish
|
|
154
|
+
When a user asks to create a campaign sequence, distinguish these separate decisions:
|
|
154
155
|
|
|
155
156
|
- Manual AI-draft review: `autotouch sequences recipe --type manual_review` (or `create`) sets `executionMode=MANUAL` and `aiDraft=true`; AI drafts content and a human approves/completes each task.
|
|
156
157
|
- Template-based automated send: `autotouch sequences recipe --type automated_template` (or `bulk_automated`) sets `executionMode=AUTOMATED` and `emailSendMode=AUTOMATED` with fixed templates; use this when the user explicitly asks to automate sending without review.
|
|
157
158
|
- LinkedIn-assisted outreach: `autotouch sequences recipe --type linkedin_outreach` uses an automated profile visit followed by manual AI-draft LinkedIn connection, LinkedIn message, and fallback email tasks. Use it only when LinkedIn touches are part of the campaign.
|
|
159
|
+
- Research-field routing: `autotouch sequences recipe --type research_field_routing` starts one source-table sequence that routes each enrollment by a research-table column value, such as persona, segment, territory, product line, or campaign path.
|
|
158
160
|
|
|
159
161
|
If the user says "automate the sequence" without asking for AI-written sends, choose the template-based automated path. Offer manual AI-draft review as the higher-personalization path, but call out that it creates upfront manual tasks while the system learns.
|
|
160
162
|
|
|
163
|
+
For bulk Instantly/Smartlead sequences, email sender accounts live on the provider campaign, not on each enrollment. Use `autotouch sequences sync-accounts --sequence-id <SEQUENCE_ID> --account-selection all_eligible` for the org's eligible provider-account group, or `--account-selection selected --selected-account sender@example.com` for specific provider mailboxes. For personal mailbox or LinkedIn steps, use enrollment sender routing only when the user asks for explicit sender pinning or team routing.
|
|
164
|
+
|
|
165
|
+
Keep `requiredVariables` limited to variables that the sequence actually needs. If a variable is listed there, every provider enrollment must hydrate it from lead context, research-table mappings, or explicit overrides; unused required variables can block an otherwise valid bulk campaign.
|
|
166
|
+
|
|
161
167
|
Version guard:
|
|
162
168
|
|
|
163
|
-
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.
|
|
169
|
+
- Use `autotouch --version` before relying on recipe defaults. This repo expects `autotouch-cli` `0.2.112` or newer.
|
|
164
170
|
- If `python3 -m pip install -U autotouch-cli` upgrades the package but `which autotouch` still points at an older shim, run the upgraded binary directly or fix PATH before creating production sequences.
|
|
165
171
|
- Before authoring a LinkedIn sequence, inspect the live recipe:
|
|
166
172
|
|
|
@@ -176,6 +182,14 @@ As of `0.2.107`, that recipe emits:
|
|
|
176
182
|
4. connected branch -> `LINKEDIN_CHAT_MESSAGE` - `MANUAL`, `aiDraft=true`
|
|
177
183
|
5. not-connected branch -> `EMAIL` - `MANUAL`, `emailSendMode=MANUAL`, `aiDraft=true`
|
|
178
184
|
|
|
185
|
+
For one sequence with multiple paths based on a source-table value, inspect the route recipe:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
autotouch sequences recipe --type research_field_routing --output json --compact
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Use one `source_field_route` condition with `columnKey`, one route case per expected value, and a default route for blank or unexpected values. Extend the route cases when the user needs more paths. Create separate sequences only when the paths require separate reporting, sender pools, schedules, ownership, or activation controls.
|
|
192
|
+
|
|
179
193
|
## Neural Search vs Durable List Build
|
|
180
194
|
|
|
181
195
|
Autotouch has two different company/people discovery paths.
|
|
@@ -184,7 +198,7 @@ Use `autotouch search companies` for Exa Company Search when the target is basic
|
|
|
184
198
|
|
|
185
199
|
Use `autotouch search similar-companies` as a convenience wrapper for Exa Company Search similarity. Prefer `--query` for Exa's documented semantic patterns, such as "companies like Notion", "competitors of Stripe", or "companies working on making space travel cheaper". The older seed fields `company_name`, `company_domain`, and `company_description` remain available when you want the CLI/API to compose that query; it does not use Exa `/findSimilar`.
|
|
186
200
|
|
|
187
|
-
Use `autotouch search people` for provider-hidden people search when the target is niche, semantic, or hard to express with structured filters. People search currently returns at most 10 results per API call and costs 1 credit per API call.
|
|
201
|
+
Use `autotouch search people` for provider-hidden people search when the target is niche, semantic, or hard to express with structured filters. Describe the person or responsibility in natural language, for example "person responsible for endpoint management and SaaS app access", then use company, location, title, or skills only as optional anchors. People search currently returns at most 10 results per API call and costs 1 credit per API call.
|
|
188
202
|
|
|
189
203
|
Use `autotouch list-build companies` and `autotouch list-build leads` for structured, repeatable LinkedIn/Sales Navigator list construction. This is the only CLI path for building LinkedIn-sourced company and lead lists. Treat list builds as the sourcing step for the Smart Table research workspace: build company/account records first by default, sync the records to a research table with `autotouch list-build sync-to-table`, then enrich, score, segment, find related leads, attach signals/notes, and continue downstream workflows from that table. Use lead builds directly when the request is explicitly person/contact focused. This path uses Autotouch-managed provider access, so users do not need to connect their own LinkedIn account. Use filters like geography IDs, company size, industry IDs, title/persona, and current company IDs; call `autotouch list-build inputs` for supported values. Durable list builds run as background jobs with status/results endpoints and cost 1 credit per successful non-empty result page.
|
|
190
204
|
|
|
@@ -281,7 +295,7 @@ For automation or agent-driven setup, use:
|
|
|
281
295
|
- `autotouch cli-manifest --output json` for the local machine-readable command contract
|
|
282
296
|
- `autotouch cli-reference` for the shipped parser-generated reference
|
|
283
297
|
- `autotouch capabilities --output json` for provider/workflow contracts
|
|
284
|
-
- `autotouch --version` should be `0.2.
|
|
298
|
+
- `autotouch --version` should be `0.2.112` or newer for structured company list builds without user-supplied keywords, stored list-build input lookup, research-workspace list-build guidance, the cleaned single LinkedIn-sourced list-build path, Exa Company Search up to 100 results, scheduled agent `--target ACCOUNTS|LEADS`, `agents signals --target`, the `agent-to-sequence` and `agent-to-leads` workflow scaffolds, paced HTTP Request column contracts, branch-aware LinkedIn sequence recipes, sequence campaign intake guards before mutating objects, real agent soft-delete with associated-table handling, research-table sequence handoff assignee and active-sequence-conflict guard config, backend-owned directional source/destination helpers, goal-level workflow plans, website visitor/external intent webhook workflow guidance, create-time agent assignment defaults, company-page signal configuration guidance, sequence authoring warnings when AI draft is mixed with fixed templates, sender-account discovery/management for explicit sequence routing, mixed parent-row/child-list Sync to Table and Sync to Leads recipe configs, and company variable guidance for `company_name_clean` versus internal match keys
|
|
285
299
|
- `autotouch capabilities --output json --select list_builds` for documented list-build inputs such as geography IDs, company size buckets, profile language, and company IDs
|
|
286
300
|
- `autotouch integrations list` and `autotouch integrations status --provider <provider>` before choosing source/destination workflows
|
|
287
301
|
- `autotouch workflows plan --type bulk-outreach` and `autotouch workflows scaffold --type bulk-outreach --out-dir workflow` for goal-level workflow planning
|
|
@@ -320,6 +334,8 @@ Schema ownership rules:
|
|
|
320
334
|
|
|
321
335
|
Prompt variables in authored prompts support nested JSON access:
|
|
322
336
|
- Use flat row variables like `{{company_name}}` for scalar columns.
|
|
337
|
+
- Use `{{company_name_clean}}` in outreach copy when you want a suffix-stripped readable company name (`Acme, Inc.` → `Acme`).
|
|
338
|
+
- Do not use `{{company_name_normalized}}` in outreach copy; it is an internal company match key for fallback lookup/debug use.
|
|
323
339
|
- Use dotted placeholders like `{{linkedin_lookup.linkedin_url}}` when the source column stores JSON or stringified JSON.
|
|
324
340
|
- For arrays, use numeric indexes such as `{{contacts.0.email}}`.
|
|
325
341
|
- This is different from config payload mappings, which use objects like `{ "column": "linkedin_lookup", "path": "linkedin_url" }`.
|
|
@@ -43,11 +43,13 @@ from autotouch_cli.commands.columns import (
|
|
|
43
43
|
cmd_columns_create as cmd_columns_create_impl,
|
|
44
44
|
cmd_columns_delete as cmd_columns_delete_impl,
|
|
45
45
|
cmd_columns_estimate as cmd_columns_estimate_impl,
|
|
46
|
+
cmd_columns_hide as cmd_columns_hide_impl,
|
|
46
47
|
cmd_columns_list as cmd_columns_list_impl,
|
|
47
48
|
cmd_columns_move as cmd_columns_move_impl,
|
|
48
49
|
cmd_columns_projections as cmd_columns_projections_impl,
|
|
49
50
|
cmd_columns_run as cmd_columns_run_impl,
|
|
50
51
|
cmd_columns_run_next as cmd_columns_run_next_impl,
|
|
52
|
+
cmd_columns_show as cmd_columns_show_impl,
|
|
51
53
|
cmd_columns_stop as cmd_columns_stop_impl,
|
|
52
54
|
cmd_columns_test_http_request as cmd_columns_test_http_request_impl,
|
|
53
55
|
cmd_columns_update as cmd_columns_update_impl,
|
|
@@ -183,6 +185,7 @@ from autotouch_cli.commands.sequences import (
|
|
|
183
185
|
cmd_sequences_pause_enrollment as cmd_sequences_pause_enrollment_impl,
|
|
184
186
|
cmd_sequences_stats as cmd_sequences_stats_impl,
|
|
185
187
|
cmd_sequences_status as cmd_sequences_status_impl,
|
|
188
|
+
cmd_sequences_sync_accounts as cmd_sequences_sync_accounts_impl,
|
|
186
189
|
cmd_sequences_update as cmd_sequences_update_impl,
|
|
187
190
|
)
|
|
188
191
|
from autotouch_cli.commands.sender_accounts import (
|
|
@@ -1520,6 +1523,8 @@ _register("cells_schema", cmd_cells_schema_impl, _cell_command_runtime)
|
|
|
1520
1523
|
_register("columns_list", cmd_columns_list_impl, _column_command_runtime)
|
|
1521
1524
|
_register("columns_create", cmd_columns_create_impl, _column_command_runtime)
|
|
1522
1525
|
_register("columns_update", cmd_columns_update_impl, _column_command_runtime)
|
|
1526
|
+
_register("columns_hide", cmd_columns_hide_impl, _column_command_runtime)
|
|
1527
|
+
_register("columns_show", cmd_columns_show_impl, _column_command_runtime)
|
|
1523
1528
|
_register("columns_move", cmd_columns_move_impl, _column_command_runtime)
|
|
1524
1529
|
_register("columns_delete", cmd_columns_delete_impl, _column_command_runtime)
|
|
1525
1530
|
_register("columns_projections", cmd_columns_projections_impl, _column_command_runtime)
|
|
@@ -1554,6 +1559,7 @@ _register("sequences_update", cmd_sequences_update_impl, _sequence_command_runti
|
|
|
1554
1559
|
_register("sequences_delete", cmd_sequences_delete_impl, _sequence_command_runtime)
|
|
1555
1560
|
_register("sequences_clone", cmd_sequences_clone_impl, _sequence_command_runtime)
|
|
1556
1561
|
_register("sequences_status", cmd_sequences_status_impl, _sequence_command_runtime)
|
|
1562
|
+
_register("sequences_sync_accounts", cmd_sequences_sync_accounts_impl, _sequence_command_runtime)
|
|
1557
1563
|
_register("sequences_enroll", cmd_sequences_enroll_impl, _sequence_command_runtime)
|
|
1558
1564
|
_register("sequences_pause_enrollment", cmd_sequences_pause_enrollment_impl, _sequence_command_runtime)
|
|
1559
1565
|
|
|
@@ -2501,6 +2507,8 @@ cmd_auth_whoami = _bound("auth_whoami")
|
|
|
2501
2507
|
cmd_cells_get = _bound("cells_get")
|
|
2502
2508
|
cmd_columns_create = _bound("columns_create")
|
|
2503
2509
|
cmd_columns_update = _bound("columns_update")
|
|
2510
|
+
cmd_columns_hide = _bound("columns_hide")
|
|
2511
|
+
cmd_columns_show = _bound("columns_show")
|
|
2504
2512
|
cmd_columns_move = _bound("columns_move")
|
|
2505
2513
|
cmd_columns_projections = _bound("columns_projections")
|
|
2506
2514
|
cmd_columns_run_next = _bound("columns_run_next")
|
|
@@ -205,10 +205,15 @@ def cmd_columns_update(args: argparse.Namespace, *, runtime: ColumnCommandRuntim
|
|
|
205
205
|
inline_json=args.data_json,
|
|
206
206
|
file_path=args.data_file,
|
|
207
207
|
context="data",
|
|
208
|
-
default=
|
|
208
|
+
default={},
|
|
209
209
|
)
|
|
210
210
|
if not isinstance(payload, dict):
|
|
211
211
|
raise AutotouchInputError("column update requires --data-json/--data-file with a JSON object")
|
|
212
|
+
payload = dict(payload)
|
|
213
|
+
if getattr(args, "hide", False):
|
|
214
|
+
payload["isHidden"] = True
|
|
215
|
+
elif getattr(args, "show", False):
|
|
216
|
+
payload["isHidden"] = False
|
|
212
217
|
payload = _apply_column_position_overrides(
|
|
213
218
|
payload,
|
|
214
219
|
args,
|
|
@@ -216,6 +221,8 @@ def cmd_columns_update(args: argparse.Namespace, *, runtime: ColumnCommandRuntim
|
|
|
216
221
|
allow_neighbors=False,
|
|
217
222
|
)
|
|
218
223
|
payload = _apply_research_mode_overrides(payload, args, force_agent_on_explicit=False)
|
|
224
|
+
if not payload:
|
|
225
|
+
raise AutotouchInputError("column update requires a patch payload or an update flag such as --hide, --show, --position, or --research-mode")
|
|
219
226
|
runtime.validate_column_contract_payload_or_exit(payload)
|
|
220
227
|
data = runtime.request_api(
|
|
221
228
|
"PATCH",
|
|
@@ -230,6 +237,35 @@ def cmd_columns_update(args: argparse.Namespace, *, runtime: ColumnCommandRuntim
|
|
|
230
237
|
runtime.print_json(data, args.compact)
|
|
231
238
|
|
|
232
239
|
|
|
240
|
+
def _cmd_columns_visibility(
|
|
241
|
+
args: argparse.Namespace,
|
|
242
|
+
*,
|
|
243
|
+
runtime: ColumnCommandRuntime,
|
|
244
|
+
hidden: bool,
|
|
245
|
+
) -> None:
|
|
246
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
247
|
+
payload = {"isHidden": bool(hidden)}
|
|
248
|
+
data = runtime.request_api(
|
|
249
|
+
"PATCH",
|
|
250
|
+
f"/api/tables/{args.table_id}/columns/{args.column_id}",
|
|
251
|
+
base_url=args.base_url,
|
|
252
|
+
token=token,
|
|
253
|
+
use_x_api_key=args.use_x_api_key,
|
|
254
|
+
payload=payload,
|
|
255
|
+
timeout=args.timeout,
|
|
256
|
+
verbose=args.verbose,
|
|
257
|
+
)
|
|
258
|
+
runtime.print_json(data, args.compact)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def cmd_columns_hide(args: argparse.Namespace, *, runtime: ColumnCommandRuntime) -> None:
|
|
262
|
+
_cmd_columns_visibility(args, runtime=runtime, hidden=True)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def cmd_columns_show(args: argparse.Namespace, *, runtime: ColumnCommandRuntime) -> None:
|
|
266
|
+
_cmd_columns_visibility(args, runtime=runtime, hidden=False)
|
|
267
|
+
|
|
268
|
+
|
|
233
269
|
def cmd_columns_delete(args: argparse.Namespace, *, runtime: ColumnCommandRuntime) -> None:
|
|
234
270
|
if not getattr(args, "yes", False):
|
|
235
271
|
raise AutotouchInputError("column delete is destructive and also removes all cells for that column. Re-run with --yes to confirm.")
|
|
@@ -482,6 +518,9 @@ def register_columns_subcommands(
|
|
|
482
518
|
pcu.add_argument("--data-json", help="ColumnUpdate payload JSON")
|
|
483
519
|
pcu.add_argument("--data-file", help="ColumnUpdate payload file path")
|
|
484
520
|
pcu.add_argument("--position", type=float, help="Explicit numeric position override")
|
|
521
|
+
visibility = pcu.add_mutually_exclusive_group()
|
|
522
|
+
visibility.add_argument("--hide", action="store_true", help="Hide the column without deleting its cells")
|
|
523
|
+
visibility.add_argument("--show", action="store_true", help="Show a previously hidden column")
|
|
485
524
|
pcu.add_argument(
|
|
486
525
|
"--research-mode",
|
|
487
526
|
choices=["lite", "heavy"],
|
|
@@ -490,6 +529,29 @@ def register_columns_subcommands(
|
|
|
490
529
|
add_api_common_arguments(pcu)
|
|
491
530
|
pcu.set_defaults(func=handlers["update"])
|
|
492
531
|
|
|
532
|
+
pch = col_sub.add_parser(
|
|
533
|
+
"hide",
|
|
534
|
+
help="Hide a column without deleting its cells",
|
|
535
|
+
description=(
|
|
536
|
+
"Hide a column from the default table view. This is reversible and does not delete cells. "
|
|
537
|
+
"Use columns delete only when you intentionally want to remove the column and its data."
|
|
538
|
+
),
|
|
539
|
+
)
|
|
540
|
+
pch.add_argument("--table-id", required=True)
|
|
541
|
+
pch.add_argument("--column-id", required=True)
|
|
542
|
+
add_api_common_arguments(pch)
|
|
543
|
+
pch.set_defaults(func=handlers["hide"])
|
|
544
|
+
|
|
545
|
+
pcs_show = col_sub.add_parser(
|
|
546
|
+
"show",
|
|
547
|
+
help="Show a previously hidden column",
|
|
548
|
+
description="Make a hidden column visible in the table schema again.",
|
|
549
|
+
)
|
|
550
|
+
pcs_show.add_argument("--table-id", required=True)
|
|
551
|
+
pcs_show.add_argument("--column-id", required=True)
|
|
552
|
+
add_api_common_arguments(pcs_show)
|
|
553
|
+
pcs_show.set_defaults(func=handlers["show"])
|
|
554
|
+
|
|
493
555
|
pcm = col_sub.add_parser(
|
|
494
556
|
"move",
|
|
495
557
|
help="Reorder an existing column relative to neighbors",
|
|
@@ -10,6 +10,9 @@ from urllib.parse import urlencode
|
|
|
10
10
|
from autotouch_cli.exceptions import AutotouchInputError, AutotouchTimeoutError
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
PROVIDER_PAGE_SIZE_MAX = 50
|
|
14
|
+
|
|
15
|
+
|
|
13
16
|
@dataclass(frozen=True)
|
|
14
17
|
class ListBuildCommandRuntime:
|
|
15
18
|
resolve_token: Callable[[Optional[str], bool], Optional[str]]
|
|
@@ -56,7 +59,7 @@ def _payload(args: argparse.Namespace, *, runtime: ListBuildCommandRuntime, kind
|
|
|
56
59
|
payload: Dict[str, Any] = {
|
|
57
60
|
"kind": kind,
|
|
58
61
|
"num_results": max(1, min(int(getattr(args, "num_results", 100) or 100), 10000)),
|
|
59
|
-
"page_size": max(1, min(int(getattr(args, "page_size", 25) or 25),
|
|
62
|
+
"page_size": max(1, min(int(getattr(args, "page_size", 25) or 25), PROVIDER_PAGE_SIZE_MAX)),
|
|
60
63
|
"filters": filters,
|
|
61
64
|
}
|
|
62
65
|
for attr in ("list_name", "keywords", "title"):
|
|
@@ -252,7 +255,7 @@ def register_list_build_subcommands(
|
|
|
252
255
|
p.add_argument("--data-file", help="Path to list-build payload JSON file")
|
|
253
256
|
p.add_argument("--list-name", help="Optional display name")
|
|
254
257
|
p.add_argument("--num-results", type=int, default=100, help="Target result count, 1-10000")
|
|
255
|
-
p.add_argument("--page-size", type=int, default=25, help="Provider page size")
|
|
258
|
+
p.add_argument("--page-size", type=int, default=25, help="Provider page size, max 50")
|
|
256
259
|
p.add_argument("--wait", action="store_true", help="Poll until terminal status")
|
|
257
260
|
p.add_argument("--poll-interval", type=int, default=5, help="Polling interval seconds for --wait")
|
|
258
261
|
p.add_argument("--wait-timeout", type=int, default=0, help="Max seconds to wait (0 = no timeout)")
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
import json
|
|
5
|
+
import re
|
|
5
6
|
import sys
|
|
6
7
|
from dataclasses import dataclass
|
|
7
8
|
from typing import Any, Callable, Dict, List, Optional, Sequence
|
|
@@ -19,6 +20,9 @@ from autotouch_cli.sequence_support import (
|
|
|
19
20
|
)
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
_TEMPLATE_VARIABLE_RE = re.compile(r"\{\{\s*([A-Za-z0-9_.-]+)\s*\}\}")
|
|
24
|
+
|
|
25
|
+
|
|
22
26
|
@dataclass(frozen=True)
|
|
23
27
|
class SequenceCommandRuntime:
|
|
24
28
|
resolve_token: Callable[[Optional[str], bool], Optional[str]]
|
|
@@ -149,8 +153,57 @@ def _sequence_template_ai_draft_warnings(payload: Optional[Dict[str, Any]]) -> L
|
|
|
149
153
|
return warnings
|
|
150
154
|
|
|
151
155
|
|
|
156
|
+
def _sequence_template_variables(payload: Optional[Dict[str, Any]]) -> List[str]:
|
|
157
|
+
if not isinstance(payload, dict):
|
|
158
|
+
return []
|
|
159
|
+
steps = payload.get("steps")
|
|
160
|
+
if not isinstance(steps, list):
|
|
161
|
+
return []
|
|
162
|
+
variables: List[str] = []
|
|
163
|
+
for step in steps:
|
|
164
|
+
if not isinstance(step, dict):
|
|
165
|
+
continue
|
|
166
|
+
for field in ("subjectTemplate", "bodyTemplate", "scriptTemplate"):
|
|
167
|
+
value = step.get(field)
|
|
168
|
+
if not isinstance(value, str):
|
|
169
|
+
continue
|
|
170
|
+
variables.extend(match.group(1).strip() for match in _TEMPLATE_VARIABLE_RE.finditer(value))
|
|
171
|
+
return list(dict.fromkeys(variable for variable in variables if variable))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def _sequence_required_variable_warnings(payload: Optional[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
|
175
|
+
if not isinstance(payload, dict):
|
|
176
|
+
return []
|
|
177
|
+
required = payload.get("requiredVariables")
|
|
178
|
+
if not isinstance(required, list):
|
|
179
|
+
return []
|
|
180
|
+
template_variables = set(_sequence_template_variables(payload))
|
|
181
|
+
variable_map = payload.get("variableMap") if isinstance(payload.get("variableMap"), dict) else {}
|
|
182
|
+
warnings: List[Dict[str, Any]] = []
|
|
183
|
+
for raw in required:
|
|
184
|
+
variable = str(raw or "").strip()
|
|
185
|
+
if not variable:
|
|
186
|
+
continue
|
|
187
|
+
if variable in template_variables or variable in variable_map:
|
|
188
|
+
continue
|
|
189
|
+
warnings.append(
|
|
190
|
+
{
|
|
191
|
+
"code": "required_variable_not_used_or_mapped",
|
|
192
|
+
"variable": variable,
|
|
193
|
+
"message": (
|
|
194
|
+
f"requiredVariables includes {variable!r}, but no template uses it and variableMap does not map it. "
|
|
195
|
+
"Provider enrollments will fail unless this value is supplied by the enrollment payload or the variable is removed."
|
|
196
|
+
),
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
return warnings
|
|
200
|
+
|
|
201
|
+
|
|
152
202
|
def _attach_sequence_authoring_warnings(output: Dict[str, Any], payload: Optional[Dict[str, Any]]) -> Dict[str, Any]:
|
|
153
|
-
warnings =
|
|
203
|
+
warnings = [
|
|
204
|
+
*_sequence_template_ai_draft_warnings(payload),
|
|
205
|
+
*_sequence_required_variable_warnings(payload),
|
|
206
|
+
]
|
|
154
207
|
if not warnings:
|
|
155
208
|
return output
|
|
156
209
|
enriched = dict(output)
|
|
@@ -165,6 +218,72 @@ def _attach_sequence_authoring_warnings(output: Dict[str, Any], payload: Optiona
|
|
|
165
218
|
return enriched
|
|
166
219
|
|
|
167
220
|
|
|
221
|
+
def _split_account_values(values: Optional[List[str]]) -> List[str]:
|
|
222
|
+
out: List[str] = []
|
|
223
|
+
seen: set[str] = set()
|
|
224
|
+
for raw in values or []:
|
|
225
|
+
for part in str(raw or "").split(","):
|
|
226
|
+
value = part.strip()
|
|
227
|
+
key = value.lower()
|
|
228
|
+
if value and key not in seen:
|
|
229
|
+
seen.add(key)
|
|
230
|
+
out.append(value)
|
|
231
|
+
return out
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
def _apply_provider_account_config(payload: Dict[str, Any], args: argparse.Namespace) -> Dict[str, Any]:
|
|
235
|
+
provider = str(getattr(args, "bulk_provider", "") or "").strip().lower()
|
|
236
|
+
account_selection = str(getattr(args, "account_selection", "") or "").strip().lower()
|
|
237
|
+
selected_accounts = _split_account_values(getattr(args, "selected_account", None))
|
|
238
|
+
if not provider and not account_selection and not selected_accounts:
|
|
239
|
+
return payload
|
|
240
|
+
|
|
241
|
+
next_payload = dict(payload)
|
|
242
|
+
delivery = dict(next_payload.get("emailDelivery") or {})
|
|
243
|
+
if provider:
|
|
244
|
+
delivery["mode"] = "bulk"
|
|
245
|
+
delivery["bulkProvider"] = provider
|
|
246
|
+
provider_key = str(delivery.get("bulkProvider") or "").strip().lower()
|
|
247
|
+
if account_selection or selected_accounts:
|
|
248
|
+
if provider_key not in {"instantly", "smartlead"}:
|
|
249
|
+
raise AutotouchInputError("--account-selection/--selected-account requires --bulk-provider instantly|smartlead or existing emailDelivery.bulkProvider")
|
|
250
|
+
if selected_accounts and not account_selection:
|
|
251
|
+
account_selection = "selected"
|
|
252
|
+
if not account_selection:
|
|
253
|
+
account_selection = "all_eligible"
|
|
254
|
+
provider_config = dict(delivery.get("providerConfig") or {})
|
|
255
|
+
provider_entry = dict(provider_config.get(provider_key) or {})
|
|
256
|
+
provider_entry["accountSelection"] = account_selection
|
|
257
|
+
if account_selection == "selected":
|
|
258
|
+
if not selected_accounts:
|
|
259
|
+
raise AutotouchInputError("--selected-account is required when --account-selection selected")
|
|
260
|
+
provider_entry["selectedAccounts"] = selected_accounts
|
|
261
|
+
else:
|
|
262
|
+
provider_entry.pop("selectedAccounts", None)
|
|
263
|
+
provider_config[provider_key] = provider_entry
|
|
264
|
+
delivery["providerConfig"] = provider_config
|
|
265
|
+
next_payload["emailDelivery"] = delivery
|
|
266
|
+
return next_payload
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def _add_provider_account_arguments(parser: argparse.ArgumentParser) -> None:
|
|
270
|
+
parser.add_argument(
|
|
271
|
+
"--bulk-provider",
|
|
272
|
+
choices=["instantly", "smartlead"],
|
|
273
|
+
help="Set sequence emailDelivery to bulk mode with this provider",
|
|
274
|
+
)
|
|
275
|
+
parser.add_argument(
|
|
276
|
+
"--account-selection",
|
|
277
|
+
choices=["all_eligible", "selected"],
|
|
278
|
+
help="Bulk provider sender pool: all eligible org accounts or selected account emails",
|
|
279
|
+
)
|
|
280
|
+
parser.add_argument(
|
|
281
|
+
"--selected-account",
|
|
282
|
+
action="append",
|
|
283
|
+
help="Bulk provider sender email for --account-selection selected; repeatable or comma-separated",
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
|
|
168
287
|
def _fetch_sequence_readback(
|
|
169
288
|
sequence_id: str,
|
|
170
289
|
args: argparse.Namespace,
|
|
@@ -308,6 +427,7 @@ def cmd_sequences_create(args: argparse.Namespace, *, runtime: SequenceCommandRu
|
|
|
308
427
|
)
|
|
309
428
|
if not isinstance(payload, dict):
|
|
310
429
|
raise AutotouchInputError("sequence create requires --data-json/--data-file with a JSON object")
|
|
430
|
+
payload = _apply_provider_account_config(payload, args)
|
|
311
431
|
|
|
312
432
|
data = runtime.request_api(
|
|
313
433
|
"POST",
|
|
@@ -335,6 +455,7 @@ def cmd_sequences_update(args: argparse.Namespace, *, runtime: SequenceCommandRu
|
|
|
335
455
|
)
|
|
336
456
|
if not isinstance(payload, dict):
|
|
337
457
|
raise AutotouchInputError("sequence update requires --data-json/--data-file with a JSON object")
|
|
458
|
+
payload = _apply_provider_account_config(payload, args)
|
|
338
459
|
|
|
339
460
|
try:
|
|
340
461
|
data = runtime.request_api(
|
|
@@ -376,6 +497,31 @@ def cmd_sequences_update(args: argparse.Namespace, *, runtime: SequenceCommandRu
|
|
|
376
497
|
runtime.print_json(data, args.compact)
|
|
377
498
|
|
|
378
499
|
|
|
500
|
+
def cmd_sequences_sync_accounts(args: argparse.Namespace, *, runtime: SequenceCommandRuntime) -> None:
|
|
501
|
+
token = runtime.resolve_token(args.token, required=True)
|
|
502
|
+
selected_accounts = _split_account_values(getattr(args, "selected_account", None))
|
|
503
|
+
payload: Dict[str, Any] = {
|
|
504
|
+
"accountSelection": str(getattr(args, "account_selection", "") or "all_eligible").strip(),
|
|
505
|
+
}
|
|
506
|
+
if selected_accounts:
|
|
507
|
+
payload["selectedAccounts"] = selected_accounts
|
|
508
|
+
if bool(getattr(args, "no_refresh", False)):
|
|
509
|
+
payload["refresh"] = False
|
|
510
|
+
|
|
511
|
+
data = runtime.request_api(
|
|
512
|
+
"POST",
|
|
513
|
+
f"/api/sequences/{args.sequence_id}/sync-account-pool",
|
|
514
|
+
base_url=args.base_url,
|
|
515
|
+
token=token,
|
|
516
|
+
use_x_api_key=args.use_x_api_key,
|
|
517
|
+
params=_sequence_mutation_params(args),
|
|
518
|
+
payload=payload,
|
|
519
|
+
timeout=args.timeout,
|
|
520
|
+
verbose=args.verbose,
|
|
521
|
+
)
|
|
522
|
+
runtime.print_json(data, args.compact)
|
|
523
|
+
|
|
524
|
+
|
|
379
525
|
def cmd_sequences_delete(args: argparse.Namespace, *, runtime: SequenceCommandRuntime) -> None:
|
|
380
526
|
if not getattr(args, "yes", False):
|
|
381
527
|
raise AutotouchInputError("sequence delete is destructive. Re-run with --yes to confirm. Only DRAFT or ARCHIVED sequences can be deleted.")
|
|
@@ -598,6 +744,7 @@ def register_sequences_subcommands(
|
|
|
598
744
|
psqc = sequences_sub.add_parser("create", help="Create a sequence from a JSON payload")
|
|
599
745
|
psqc.add_argument("--data-json", help="Sequence create payload JSON")
|
|
600
746
|
psqc.add_argument("--data-file", help="Sequence create payload file path")
|
|
747
|
+
_add_provider_account_arguments(psqc)
|
|
601
748
|
add_actor_override_argument(psqc)
|
|
602
749
|
add_api_common_arguments(psqc)
|
|
603
750
|
psqc.set_defaults(func=handlers["create"])
|
|
@@ -609,10 +756,32 @@ def register_sequences_subcommands(
|
|
|
609
756
|
psqu.add_argument("--sequence-id", required=True)
|
|
610
757
|
psqu.add_argument("--data-json", help="Sequence update payload JSON")
|
|
611
758
|
psqu.add_argument("--data-file", help="Sequence update payload file path")
|
|
759
|
+
_add_provider_account_arguments(psqu)
|
|
612
760
|
add_actor_override_argument(psqu)
|
|
613
761
|
add_api_common_arguments(psqu)
|
|
614
762
|
psqu.set_defaults(func=handlers["update"])
|
|
615
763
|
|
|
764
|
+
psqsa = sequences_sub.add_parser(
|
|
765
|
+
"sync-accounts",
|
|
766
|
+
help="Choose and sync Instantly/Smartlead sender accounts for a managed bulk sequence",
|
|
767
|
+
description=(
|
|
768
|
+
"For bulk sequences, sender accounts live on the provider campaign rather than per enrollment. "
|
|
769
|
+
"Use --account-selection all_eligible for the org's eligible provider account group, or "
|
|
770
|
+
"--account-selection selected with --selected-account for specific mailbox emails."
|
|
771
|
+
),
|
|
772
|
+
)
|
|
773
|
+
psqsa.add_argument("--sequence-id", required=True)
|
|
774
|
+
psqsa.add_argument("--account-selection", choices=["all_eligible", "selected"], default="all_eligible")
|
|
775
|
+
psqsa.add_argument(
|
|
776
|
+
"--selected-account",
|
|
777
|
+
action="append",
|
|
778
|
+
help="Provider sender email when --account-selection selected; repeatable or comma-separated",
|
|
779
|
+
)
|
|
780
|
+
psqsa.add_argument("--no-refresh", action="store_true", help="Use cached provider account snapshot")
|
|
781
|
+
add_actor_override_argument(psqsa)
|
|
782
|
+
add_api_common_arguments(psqsa)
|
|
783
|
+
psqsa.set_defaults(func=handlers["sync_accounts"])
|
|
784
|
+
|
|
616
785
|
psqdel = sequences_sub.add_parser("delete", help="Delete a DRAFT or ARCHIVED sequence")
|
|
617
786
|
psqdel.add_argument("--sequence-id", required=True)
|
|
618
787
|
psqdel.add_argument("--yes", action="store_true", help="Required confirmation flag for destructive delete")
|