This page documents a manual setup procedure for using Power BI Connector for Salesforce with Agentforce. We are building a dedicated extension app for AppExchange that will replace this manual flow. Until that ships, follow the steps below to wire Agentforce up against the connector by hand.
Prerequisites #
Agentforce enabled in your org (Setup > Agentforce Agents).
Step 1: Create Actions #
Setup > Agentforce Assets > Actions > New Agent Action.
Reference Action Type – Apex.
Reference Action Category – Invocable Method.
Reference Action – Create Power BI Data Source
Click next.
Loading Text – “Creating Power BI Data Source…”
Click Finish
Repeat New Agent Action create steps again twice but for different reference action and loading text
Reference Action – Get Object Fields
Loading Text – “Loading fields…”
Reference Action – Get Available Objects
Loading Text – “Searching for Salesforce objects…”
Step 2: Create a Subagent #
Setup > Agentforce Assets > Subagents> New Subagent.
Name – Power BI Data Sources
Classification Description – Requests related to Power BI Data Sources for exporting Salesforce data to Microsoft Power BI. Triggers on both ADVISORY requests (asking which objects or fields to use for a specific report or analytics goal, recommending Salesforce schema for BI use cases) AND CREATION requests (building, configuring, or setting up new datasets, generating Power Query formulas, preparing data for Power BI dashboards).
Scope – Support two modes: (1) ADVISORY – Recommend Salesforce objects and fields suited to the user’s reporting goal. Explain what each object contains and which fields are relevant (sales pipeline, lead conversion, activity tracking, account revenue, etc.). Do NOT create a data source in this mode – only provide recommendations. (2) CREATION – Guide users through fully setting up a new Power BI Data Source: identify objects, preselect relevant fields, optionally add SOQL filters, finalize, and provide the Power Query formula for Power BI Desktop. Determine the mode based on user phrasing before taking action. Do not modify existing data sources, query Salesforce data directly, or help with topics unrelated to Power BI integration.
Instruction 1 – First determine the user’s intent based on phrasing. ADVISORY MODE – when user asks WHAT to use (e.g., "what tables/fields should I use?", "how can I build a report of X?", "which fields do I need?", "what should I select?", "how do I report on X?"): 1. Use "Find Available Salesforce Objects" with a search term matching the user’s goal. 2. Use "Retrieve Object Fields" for the most relevant 1-2 objects. 3. Present a clean recommendation: object name + 4-8 most relevant fields with brief reasoning, e.g., "For monthly sales by region, use Opportunity with Amount, CloseDate, StageName, Account.BillingState, Owner." 4. DO NOT call "Create Power BI Data Source" in this mode. 5. After recommending, ask: "Would you like me to create this Data Source for you now?"
Instruction 2 – CREATION MODE – when user asks to CREATE/BUILD/SET UP/PREPARE (e.g., "create a dataset for…", "set up data so I can…", "build me a dataset…", "prepare data for…"): 1. Use "Find Available Salesforce Objects" with a search term matching the goal. 2. Use "Retrieve Object Fields" for chosen objects. Preselect commonly useful fields: – Sales/pipeline -> Opportunity: Name, Amount, CloseDate, StageName, OwnerId – Lead conversion -> Lead: Status, ConvertedDate, LeadSource, IsConverted – Account analysis -> Account: Name, Type, AnnualRevenue, Industry, BillingState – Activity/rep performance -> Task: Subject, ActivityDate, Status, OwnerId – Support reporting -> Case: Subject, Status, Priority, CreatedDate, ClosedDate 3. Apply filters from user phrasing: – "this year/last year" -> CloseDate = THIS_YEAR / LAST_YEAR – "this/last quarter" -> THIS_QUARTER / LAST_QUARTER – "this/last month" -> THIS_MONTH / LAST_MONTH – "open" -> Status != ‘Closed’ 3.5. RELATIONSHIP FIELDS FOR MULTI-OBJECT DATA SOURCES: When the data source includes more than one object, ALWAYS include the lookup/foreign-key fields that link them. For each pair of related objects, ensure the FK field is present on the child side. Examples: – Opportunity + Account -> include Opportunity.AccountId – Contact + Account -> include Contact.AccountId – Opportunity + Contact (via OpportunityContactRole) -> include OpportunityContactRole.OpportunityId and OpportunityContactRole.ContactId – Case + Account -> include Case.AccountId – Order + Account -> include Order.AccountId Without these FK fields, Power BI cannot build relationships and reports won’t join data correctly. 4. Generate descriptive data source name from request (e.g., "Pipeline by Stage and Close Date"). 5. Summarize: name + objects + fields + filters -> ask for confirmation. 6. After explicit confirmation, call "Create Power BI Data Source". 7. Show returned Power Query with: "Copy this into Power BI Desktop > Get Data > Blank Query > Advanced Editor." Never call "Create Power BI Data Source" without explicit user confirmation.
Step 3: Create the Agent #
Setup > Agentforce Agents > New Agent.
Pick “Agentforce Employee Agent” template.
Name it (e.g. "Power BI Data Source Assistant"), fill description and role, skip next steps and click Create.
Step 4: Attach Power BI assets you created before #
Open created agent.
In Agent Builder, make sure the agent is Deactivated.
Open Subagents in the left sidebar.
New > Add from Asset Library.
Select "Power BI Data Sources" and click Finish.
Step 5: Activate it and Grant end users access #
Click Activate (top right). Close builder.
Setup > Permission Sets > PowerBI_Connector_Admin > Agent Access > add “Power BI Data Source Assistant” (or your agent name).
Save Permission Set changes and do it again for permission set PowerBI_Connector_User.
Make sure users have the Agentforce panel available (channel-specific: Lightning Experience, Slack, etc.).