← Back to Playbooks
📊

Board Dashboard Due Tomorrow

Sprint New
⏱️ ~3 min (example estimate)

From Salesforce to Tableau workbooks in minutes. Templates + .twbx publish for executive reporting.

Note: Templates mean assembly from pre-built viz types (bar, line, table), not free-form dashboard creation.

The Prompt

Copy this prompt to Claude Code
We need Tableau workbooks for tomorrow's board meeting showing:
- Pipeline by stage (bar chart)
- Revenue trend last 6 months (line chart)
- Top 10 deals by amount (table)

Pull fresh data from Salesforce and publish to our 'Executive' project in Tableau Cloud.
📊

Template-Based Viz Creation

Templates use canonical column naming (Dimension, Metric, Date) — we rename your CSV columns to match, then package as .twbx for reliable Tableau Cloud publishing. This approach eliminates brittle XML manipulation while enabling rapid dashboard assembly from pre-built viz types.

How It Works

Four steps from Salesforce data to published Tableau workbooks.

1
💾

Query Salesforce

Extract opportunity data with aggregations for each visualization

2
📊

Select Templates

Auto-match data to bar_chart, line_chart, and table templates

3
📋

Bind Data

Map CSV columns to canonical template roles. Create .twbx packages

4
☁️

Publish to Tableau

Upload .twbx workbooks to Tableau Cloud Executive project

How Claude Code Executes It

💭 thinking

Board meeting needs 3 viz types. Let me query Salesforce for pipeline, revenue trend, and top deals.

$ command
g-gremlin sfdc query "SELECT StageName, SUM(Amount) TotalAmount FROM Opportunity WHERE IsClosed=false GROUP BY StageName" --output pipeline.csv

✓ Query complete: 6 stages, 142 opportunities
✓ Written: pipeline.csv

$ command
g-gremlin sfdc query "SELECT CALENDAR_MONTH(CloseDate) Month, SUM(Amount) Revenue FROM Opportunity WHERE IsClosed=true AND IsWon=true AND CloseDate=LAST_N_MONTHS:6 GROUP BY CALENDAR_MONTH(CloseDate)" --output revenue_trend.csv

✓ Query complete: 6 months of revenue data
✓ Written: revenue_trend.csv

📋 planning

Data ready. Now binding to templates: pipeline → bar_chart, revenue → line_chart, top deals → table.

$ command
g-gremlin tableau template bind bar_chart pipeline.csv --map Dimension=StageName --map Metric=TotalAmount --output pipeline.twbx

✓ Created: pipeline.twbx (bar chart, 6 categories)

$ command
g-gremlin tableau workbooks publish pipeline.twbx --project Executive --name "Pipeline by Stage"

✓ Published: https://tableau.company.com/views/PipelineByStage

✓ success

3 Tableau workbooks published to Executive project. Links sent to Slack.

Results

3
Workbooks published
3
Salesforce queries
~3 min
Time estimate
~2 hours
Manual alternative

Try This Workflow

Ship board reporting in minutes, not hours.