ContentRunner Campaign Upsert (Stage)
AI-generatedSummary
Upsert a Strapi campaign linked to a user+bot pair by querying user_bot_interactions and updating campaign fields.
Inputs
- identifyBy — Method to locate the user+bot pair; either 'tg' (Telegram chat_id+bot_id) or 'uuid' (user_id+bio_id).
- tgChatId (required) — Telegram chat ID (used when identifyBy = tg).
- tgBotId (required) — Telegram bot ID (used when identifyBy = tg).
- userId (required) — User ID (used when identifyBy = uuid).
- botId (required) — Bot ID (used when identifyBy = uuid).
- strapiCampaignId — Strapi campaign identifier to set on the campaign.
- strapiSegmentId — Strapi segment identifier to set on the campaign.
- welcomeTemplateId — Welcome template identifier to set on the campaign.
- mainTemplateId — Main template identifier to set on the campaign.
Output shape
Array of items; each item contains a json property with either the updated campaign row or an error object.
When continueOnFail is true, errors are returned as items; otherwise the operation throws and no result is returned.
Examples
Example 1: Update campaign for a Telegram user using chat and bot IDs.
identifyBy = tg, tgChatId = 12345, tgBotId = 67890, optional fields may be filled.
Example 2: Upsert campaign for a UUID user using user_id and bot_id.
identifyBy = uuid, userId = 111, botId = 222, optional fields may be filled.