Weekly churn risk writeback from Qlik to Salesforce

By General Input

Every Monday, pull at risk accounts from a Qlik dashboard, flag them in Salesforce, and post a prioritized outreach list in Slack.

Integrations

  • Qlik Cloud
  • Salesforce
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Operations

Build me an agent workflow that runs every Monday at 8am in my timezone and turns a Qlik Cloud churn risk dashboard into Salesforce writebacks and one grouped Slack message. The trigger is a cron schedule.

Step 1. Read the dashboard from Qlik Cloud. Use Qlik Cloud's Get Visualization Data on a configured customer health or churn risk chart. I will provide the Qlik app id and the visualization (object) id at setup. The chart returns one row per account with these columns, which I will map at setup time: account name, account external id used as the Salesforce upsert key, risk score (numeric), last activity date, ARR (numeric), and CSM owner. Treat the column mapping as configuration so I can change column names without editing the workflow.

Step 2. Identify at risk accounts. An account is at risk when its risk score is greater than or equal to a configurable threshold (default 70 on a 0 to 100 scale, but ask me at setup). Also skip any account that is already flagged as At Risk in Salesforce, so we do not write back or alert twice for the same account. Make the skip behavior a toggle so I can switch it to re-flag every week if I want recurring reminders.

Step 3. Write back to Salesforce. For each at risk account, call Salesforce's Create or Update Account (Upsert) using the account external id from Qlik as the upsert key. Set the configurable health status field (default field name Health_Status__c, picklist value At Risk; let me override both at setup) and append a short note to a configurable notes or description field explaining the signal. The note should be one short sentence derived from the row, for example "Risk score 82, last activity 41 days ago, ARR $120k" or "Usage trend down, no activity in 30 days". Do not overwrite existing notes; append with a timestamp.

Step 4. Post one grouped Slack message. Use Slack's Send a Message to post to a configurable channel (default #revenue, with #cs as a common alternative). The message should: state how many accounts crossed the threshold this week, list each at risk account with its CSM owner, risk score, ARR, and a one-line signal, and present a suggested outreach order sorted by a blend of ARR and risk score so high-value, high-risk accounts are on top. Let me configure whether to @mention CSM owners and whether to also send each owner a DM with just their accounts. If there are zero at risk accounts, post a short all-clear message instead of skipping.

Setup questions the workflow should ask me on first run: Qlik tenant hostname and API key, Qlik app id, Qlik visualization id, the column mapping for account name, account external id, risk score, last activity, ARR, and CSM owner, the risk threshold, the Salesforce health status field and value, the Salesforce notes field, whether to skip already-flagged accounts, the Slack channel, and whether to @mention owners.

Quality bar: this is the canonical Qlik active intelligence pattern (analytics in, action out). Be defensive about empty rows, missing columns, and accounts that exist in Qlik but not in Salesforce (log those separately in the Slack message under a short "could not match" section instead of failing the run). Run it once end to end on a small sample before scheduling.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionA website visitor queue that remembers what you hide