Internal Service β This is not an HTTP endpoint. Itβs called by the create-boosted-page orchestrator.
Purpose
Retrieves the AI site deployment URL and existing boosted pages from the database.
Function Signature
async def get_source_deployment(
user_account_id: str,
business_id: str,
product_id: Optional[str] = None,
product_name: Optional[str] = None
) -> dict
Returns
{
"status": "success",
"deployment_url": "https://business.searchcompany.dev",
"project_name": "business-abc123",
"source_url": "https://customer-domain.com",
"existing_posts": [
{"title": "Existing Post 1", "slug": "existing-post-1"},
{"title": "Existing Post 2", "slug": "existing-post-2"}
],
"entity_id": "uuid-..."
}
What It Does
- Query ai_sites - Find the AI site for this business/product
- Get deployment URL - The Vercel deployment URL
- Get existing posts - From boosted_pages table (for deduplication)
- Return entity_id - For later database updates
Code Location
src/app/apis/cron/create_boosted_page/children/step_1_get_source.py