# Launch Platform Integration

## When to use

Use this skill when you need the generated ICP (ideal customer profile — the structured description of who a company should be selling to) for a given ICP submission in Launch Platform. Reach for it whenever a task requires targeting criteria, buyer personas, trigger signals, messaging templates, or qualification rules that Launch Platform has already generated for a submission, for example when building an outbound campaign, qualifying a lead list, or drafting messaging that must match an approved ICP.

## Tools

- `http-get` — read data from Launch Platform's REST API.
- `http-post` — create resources in Launch Platform's REST API.
- `http-request` — update or delete resources (PUT, PATCH, DELETE) in Launch Platform's REST API.
- `write-file` — stage large result sets locally before further processing.
- `send-message` — escalate to a human when access fails or is missing.

## Playbook

1. Confirm you have the `icp_submission_id` for the submission you need. This value comes from the calling task or a prior step; do not guess or fabricate it.
2. Use `http-get` to fetch the structured ICP data: `GET /api/v1/icp_submissions/:icp_submission_id/structured_data`. The base URL and authentication (API key) are injected automatically from the org's Integration row for Launch Platform — never hardcode or ask the user for credentials.
3. Inspect the response body for `status`. If the ICP is not yet generated (for example status is pending or processing), do not proceed with downstream work — report the current status back to the calling task and stop.
4. Once `status` indicates completion, extract the fields you need: targeting criteria, personas, trigger signals, messaging templates, qualification rules, `model_used`, and `generated_at`. Use these verbatim as the source of truth for any campaign, list-qualification, or messaging task that depends on this ICP.
5. If the result set is large (for example many personas or a long list of qualification rules) and you need to pass it to another step or tool, use `write-file` to stage it rather than inlining the full payload repeatedly.
6. Do not attempt to create or modify ICP submissions through this skill. This skill is read-only against Launch Platform; if a task requires creating or editing an ICP submission, treat that as out of scope and escalate via `send-message` describing what is needed.

## Failure modes

- If the request returns 401 or 403, stop immediately. Do not retry with different credentials and do not attempt to construct or guess an API key. Use `send-message` to escalate to a human, naming "Launch Platform" and stating that the integration's API key appears invalid or unauthorized.
- If no Integration row exists for Launch Platform in the org, `http-get` will fail before any request reaches the API. Use `send-message` to escalate to a human, naming "Launch Platform" and the scope needed (read access to ICP submission structured data), and asking them to configure the Integration.
- If the `icp_submission_id` does not exist (404), do not fabricate placeholder ICP data. Report the missing submission back to the calling task or escalate via `send-message` if the task cannot proceed without it.
- If the response is malformed or missing expected fields, do not silently proceed with partial data for downstream campaign or messaging work; escalate via `send-message` describing the malformed response.

## Done when

You have retrieved a completed (`status` indicating success) structured ICP data payload for the requested `icp_submission_id`, including targeting criteria, personas, trigger signals, messaging templates, and qualification rules, and have either used it directly for the requesting task or staged it with `write-file` for a subsequent step. If the ICP is not ready, missing, or access fails, the task is done when a clear escalation has been sent via `send-message` describing the blocker.