Value Cost Averaging: Building Positions With a Plan, Not a Hunch


Why you need a plan

Say you want to build up three positions over the next year. Throughout this post I’ll use TSM, SPCX (SpaceX) and PLTR purely as examples, with a simple goal: grow each one to $30,000 in 12 months.

The hard part is not the goal. It is the monthly question of how much to buy, at what price, and whether to wait for a dip. Left to instinct, most of us buy more when a stock is running and freeze when it falls. That is exactly backwards.

Value cost averaging replaces that guesswork with a rule. This post explains the idea, walks through the math, and shows a Google Sheets template that turns it into a five-minute monthly routine.

What value cost averaging is

Value cost averaging (usually just called value averaging) fixes the value your position should reach each month, not the dollars you put in. Each month you buy whatever it takes to bring the position up to that month’s target.

Most people know dollar cost averaging (DCA): invest the same amount on a schedule, say $1,000 a month, no matter the price. Value averaging, introduced by former Harvard professor Michael Edleson in the late 1980s, adds a feedback loop. The rule each month is:

{Buy this month} = {Target value this month} - ({Shares owned} * {Price today})

That one line produces the behavior I want:

  • Price falls: your position is below its target, so you buy more than usual.
  • Price rises: the market already did some of the work, so you buy less.
  • Price jumps well above the path: you buy nothing that month.

DCA buys more shares when prices are low, purely through arithmetic. Value averaging leans into dips far harder, because it also increases the dollars invested. The tradeoff is that cash needs vary month to month, which the template handles with a cap.

Get the template: [here]

Open the link, then choose File > Make a copy to get your own editable version. Replace the example tickers and inputs with your own.

A worked example: month 1 of an example TSM plan

In the example TSM tab, the same month can call for a $2,787 buy, a $1,715 buy, or no buy at all, depending only on the price that week.

The setup: suppose you already hold a TSM position worth about $10,140 and want it to reach $30,000 in 12 months. That gap of $19,860 spread over 12 months gives a monthly step of $1,655. So month 1’s target is $10,140 + $1,655 = $11,795.

Price on buy dayValue before buyValue-averaging buyShares boughtDCA buy ($1,655) shares
$420 (down 11%)$9,008$2,7876.643.94
$470 (about flat)$10,081$1,7153.653.52
$560 (up 18%)$12,011$0 (skip)02.96

On the dip, value averaging buys about 1.7x as many shares as DCA. After the rally, it buys none and keeps the cash for a better entry later.

What my template does

The template, “Position build plan: TSM, SPCX, PLTR,” turns the formula above into a 12-row schedule per stock. The three tickers are just examples; swap in any stocks you want to build. You type one number a month, the price on buy day, and it tells you exactly how many dollars and shares to buy.

It has five tabs:

TabWhat it holdsWhat you enter
SetupShared inputs: $30,000 target per position, 12 months, first buy week (Oct 12, 2026), a 3x monthly buy cap, a 10% dip trigger, and the buy rulesInputs only, once
TSM, SPCX, PLTROne plan per stock: starting shares, monthly step, live price, dip alert, and the 12-month schedulePrice on buy day, shares bought, price paid
DashboardShares now, current value, % of target, invested since start, total cost basis, and $ remaining, per stock and in totalNothing

Inside each ticker tab, the logic runs in a few steps:

  1. Monthly step. (Target − starting value) ÷ 12. For TSM that is $1,655.
  2. Target path. Each month’s target = starting value + step × month number, ending at $30,000 in month 12.
  3. Planned buy. Month’s target − (shares owned × price on buy day), floored at $0 and capped at 3x the step ($4,965 for TSM). The cap keeps a sharp crash from asking for a huge cash outlay in one month.
  4. Planned shares. Planned buy ÷ price, so you know what to put in the order.
  5. Running share count. Once you log what actually filled, “Shares after” carries into next month’s “Shares before.”

Two live signals sit at the top of each tab. A Live price pulled with GOOGLEFINANCE, and a Dip alert price set 10% below the last buy. A Status cell compares them and tells you either “No action until the buy week” or “At or below dip alert: do next month’s buy now.”

The Dashboard rolls everything up, so you can see each position’s progress toward its target, and the combined total, at a glance.

How to use it each month

The routine takes about five minutes per stock, once a month. The rules live in the Setup tab so you don’t renegotiate them with yourself.

  1. Monday of buy week: Type that day’s price into “Price on buy day.” The sheet fills in the planned dollars and shares.
  2. Place a limit order about 1% below that price. If it hasn’t filled by Thursday, buy at market on Friday.
  3. Log the fill: shares bought and price paid. The amount invested and running share count update, and so does the Dashboard.
  4. Earnings in the buy week? Wait and buy the week after the report, so one print doesn’t dictate my entry.
  5. Dip alert hits between buy weeks? If the live price falls to the dip alert price, pull next month’s buy forward and use the next row.
  6. Planned buy shows $0? Skip that month. Don’t sell to get back on the path.

Rule 6 is a deliberate change from textbook value averaging, which sells when you’re above target. The template is meant for long-term, high-conviction holdings, so it uses a buy-only version and lets winners run.

Tradeoffs to know before you try it

Value averaging is a discipline tool, not a return guarantee, and it has real costs.

  • Uneven cash needs. A falling stock asks for more money right when it feels worst. Keep a cash buffer; the template’s 3x cap sets the worst case per month.
  • It assumes the thesis holds. If a stock is falling for a good reason, value averaging keeps buying it. Revisit the thesis, not just the price.
  • Buy-only means you may finish over target. Skipping months on rallies is fine; the path is a guide, not a rebalancing rule.
  • Data quirks. GOOGLEFINANCE quotes can lag or fail. The sheet falls back to the last buy price, so always check your broker before trading.

The biggest benefit is that the sheet makes the decision before your emotions do. A dip becomes a scheduled opportunity, a rally becomes a reason to wait, and you can see progress toward each $30,000 target at a glance.

If you want to build your own, start with three inputs: a target value, a timeframe, and how much one month’s buy is allowed to swing. The rest is one subtraction.

The stocks in this post are illustrative examples, not recommendations, and nothing here is investment advice. Do your own research or talk to a licensed advisor before investing.

Seeing Inside Your Robinhood Managed Account with Claude and MCP


I have a Robinhood Strategies managed account. Professional strategists pick the holdings, and the account now holds more than 50 stocks and ETFs I didn’t choose myself. That is the point of a managed account, but it leaves a simple question hard to answer: which of those holdings are driving my returns, and which are dragging them down?

I built a Claude skill that answers it in one line: /robinhood-gainers-losers over last week. This post covers the problem, the pieces that make the fix work (MCP, Claude’s connectors, Robinhood’s MCP server), and the skill itself. You can download the skill at the end.

The problem: reviewing a managed account

In a self-directed account, I bought every position, so I know what to check and I check it one stock page at a time. A managed account flips that. Robinhood Strategies gives an account-level view instead: performance over time, a return breakdown, and a benchmark comparison, plus written and audio updates on major moves.

Those views tell me how the account did. In my experience they don’t quickly tell me why. The review I wanted looks like this:

  • Every holding’s change over a period I choose, sorted best to worst.
  • The dollar impact of each move, not just the percentage. A 1% dip in a large bond fund can cost more than a 9% drop in a small stock position.
  • My managed and self-directed accounts side by side, in one report.

Doing that by hand across 50+ holdings isn’t practical. Claude can do it in seconds, once it can see the account.

1. The basics of MCP

MCP (Model Context Protocol) is an open standard for connecting an AI assistant to outside tools and data. Anthropic introduced it in November 2024, and many AI apps and services now support it.

MCP has two sides:

  • MCP server: a service that exposes a set of tools, such as “list my positions” or “get a quote”. Each tool has a name, a plain-English description, and typed inputs.
  • MCP client: the AI app that discovers those tools and calls them when a question needs them. In this post, the client is Claude.

Before MCP, every AI integration was custom-built. With MCP, a company builds one server, and any MCP-compatible assistant can use it. The assistant reads the tool descriptions and decides which tools to call, in what order, to answer your question.

2. Using Claude with MCP

In Claude, an MCP server shows up as a connector. You add it once from the Connectors area in Claude’s settings, sign in to the service, and its tools become available in your chats. When you ask a question, Claude picks the tools it needs, calls them, and reads the results.

Connectors give Claude access. Skills give it a method. A skill is a folder with a SKILL.md file of instructions, plus optional scripts and reference files. Claude loads a skill when your request matches it, or when you call it by name with a slash command.

The skill tells Claude what to do; the MCP server supplies the data to do it with.

3. Robinhood’s MCP access

Robinhood offers an official MCP server, the Robinhood Trading MCP, at https://agent.robinhood.com/mcp/trading. It is part of Robinhood Agentic Trading, which launched on May 27, 2026 and works with Claude, ChatGPT, Codex, Cursor, Grok, and other MCP clients.

The access model is what makes it useful for a P&L view. Per Robinhood’s overview, a connected agent gets read access to all your Robinhood accounts: positions, balances, transactions, and watchlists. It can only place trades in one dedicated Agentic account. That read access covers managed accounts too. Claude can see every holding the strategists picked, but it cannot trade in your managed account or your main accounts.

Steps to enable it in Claude (web or desktop):

  1. Have a primary Robinhood individual investing account in good standing.
  2. In Claude, open Settings → Connectors → Add custom connector.
  3. Paste the MCP link: https://agent.robinhood.com/mcp/trading.
  4. Sign in when prompted. Robinhood walks you through opening an Agentic account as part of this step. Do it on a desktop browser; Robinhood only supports this onboarding on desktop.
  5. Start a chat and ask something simple, like “list my Robinhood accounts”, to confirm the connection.

You are responsible for any trades your agent places, so review Robinhood’s disclosures before you fund the Agentic account. The skill in this post never trades; it only reads.

4. The skill: a P&L review of your managed account

The robinhood-gainers-losers skill shows which holdings are up or down over 1 day, 1 week, or 1 month, with one section per account. You can ask in plain English (“how is my portfolio doing this week?”) or call it directly:

/robinhood-gainers-losers over last month

What happens behind the scenes:

  1. Find accounts. Claude calls get_accounts and uses every active account, or only the one you name (“my IRA”).
  2. Pull positions. It calls get_equity_positions and get_crypto_positions for each account, following page cursors so nothing is missed.
  3. Get current prices. get_equity_quotes (batches of 20) and get_crypto_quotes give the latest price and the previous close.
  4. Get the starting price. For week or month views, get_equity_historicals (batches of 10) returns daily bars. The starting price is the close of the last trading day before the period began.
  5. Compute and format. Claude writes the data to a JSON file and runs a bundled Python script. The script does all the math: % change, $ change per share, position change, account totals, and sorting.

That last step is the key design choice. The language model gathers data; a deterministic script does the arithmetic. The same inputs always give the same numbers, and the script ships with its own tests.

What you get: for each account, the total value and total change for the period, then a Gainers table (best first) and a Losers table (worst first). Account numbers are masked to the last four digits. An illustrative row:

SymbolQtyPrice% Change$ Change / SharePosition ChangePosition Value
XYZ10$120.00+20.00%+$20.00+$200.00$1,200.00

Claude closes with a one-line summary: the biggest mover each way, and anything left out and why. From there you can ask follow-ups, such as technicals for a big mover or your realized P&L for tax season.

What it showed in my managed account. A 9-day run over 52 holdings took seconds. Chip and chip-software names led: Credo was up 25%, and Lam Research, Cadence, and AMD were each up 15% or more. Energy and materials lagged, with Alcoa down about 9% and Diamondback down about 5%. The dollar view told a different story from the percentages. The S&P 500 fund moved the account most, on a gain of just 1.4%, and a 1% dip in the muni bond fund cost more than any single stock’s loss. That is the insight I couldn’t get quickly from the app.

Limits to know:

  • The skill is read-only. It never places, changes, or cancels orders.
  • Crypto has no historical-price tool, so crypto week and month changes show as not included.
  • Options positions are not covered.
  • Changes are price-only. Dividends and fund distributions paid during the period are not counted.
  • On weekends and holidays, “current” price means the last close.

5. Get the skill

Download: robinhood-gainers-losers.zip — free to use and adapt.

The ZIP holds the whole skill folder:

FileWhat it does
SKILL.mdThe instructions Claude follows: parameters, workflow, output format
scripts/compute_gainers_losers.pyDoes all the P&L math and renders the tables
scripts/test_compute_gainers_losers.pyUnit tests for the script
references/implementation.mdThe JSON input format and design notes
test-cases.jsonSample requests for checking the skill end to end

To install it in Claude (per Use skills in Claude):

  1. Turn on Code execution and file creation in Settings → Capabilities.
  2. Go to Customize → Skills, click +, then Create skill → Upload a skill.
  3. Upload the ZIP. The skill appears in your list and can be toggled on or off.
  4. Connect the Robinhood MCP (section 3), then ask: /robinhood-gainers-losers over last week.

As with any skill from someone else, read the files before you enable it. This one is short, has no outside dependencies, and only reads from your account.

Sources: Robinhood Strategies charts · Robinhood Agentic Trading overview · Finder: Robinhood Agentic Trading review · Claude Help Center: Use skills in Claude

The Enterprise AI Trap: Is Your “AI Agent” Just a Rule-Based Script in a Trench Coat?


(I used an AI assistant to help structure and word this post)

AI-washing is in full swing. If you open almost any recent enterprise guide, you will find lists of “100+ AI Agent Use Cases.” But if you look under the hood of these modern frameworks, a striking pattern emerges: a vast majority of these use cases are actually traditional, deterministic automations dressed up with a natural language interface.

While there is undeniable value in streamlining enterprise workflows, confusing deterministic automation with true Large Language Model (LLM) reasoning is a recipe for high costs, unnecessary complexity, and eventual project failure.

So, how do you separate genuine LLM use cases from standard rule-based automation? Let’s break down the core differences, analyze real-world examples, and arm you with a practical heuristic to evaluate your own AI roadmap.


The Two Classes of Enterprise Workflows

To build a realistic enterprise AI roadmap, we must first define the two fundamentally different types of work happening in your digital workspace:

1. Traditional/Deterministic Automation (The “Rules-Based” Layer)

This is what enterprises have spent decades perfecting through scripts, robotic process automation (RPA), and system integration flows.

  • How it works: It follows rigid, predefined “if/then” rules. It operates within highly structured environments with clear, predictable triggers.
  • Where it struggles: It is extremely brittle. It breaks easily the moment system conditions, schemas, or inputs change, requiring constant scripting, updates, and manual human troubleshooting.
  • The LLM Role: Minimal to none. If a workflow can be resolved entirely by checking database fields and triggering API endpoints (e.g., resetting an MFA token), you do not need a trillion-parameter neural network to think about it. You just need a robust connection to Microsoft Graph or ServiceNow.

2. True LLM Use Cases (The “Cognitive” Layer)

This is where LLMs and “Agentic AI” genuinely shine.

  • How it works: It leverages semantic reasoning, contextual understanding, and synthesis of unstructured data. It works across domains, choosing the best path dynamically based on context.
  • Where it thrives: It excels at tasks with high ambiguity, messy inputs (like conversational transcripts, handwritten logs, or dense legal contracts), and outcomes requiring human-like judgment.

Anatomy of an AI Guide: Spotting the Rebranded Automation

Let’s look at some real-world-style examples to contrast deterministic tasks with true LLM-driven applications:

CategoryRebranded Automation (Deterministic)True LLM Application (Semantic Reasoning)
IT & SupportMFA Reset (Microsoft Graph)
• What it does: Checks a user’s identity against policy and triggers an automated reset.
• Why it’s automation: It’s a binary, rule-governed transaction. No text generation or creative reasoning required.
Summarize an Incident (ServiceNow)
• What it does: Reads disorganized, technical ticket notes, attachments, and logs to synthesize a coherent step-by-step summary with root-cause insights.
• Why it’s LLM: Messy, unstructured system logs and human text cannot be parsed with simple regular expressions. It requires contextual synthesis.
SalesLook Up Opportunities Influenced by Campaign
• What it does: Querying a database to see which accounts attended a marketing webinar.
• Why it’s automation: This is a SQL query in disguise. Databases are built to perform joins; LLMs are not.
Generate a Pre-Meeting Brief
• What it does: Synthesizes raw CRM data, previous call notes, and email history into a tailored brief for a sales representative.
• Why it’s LLM: An LLM must distinguish noise from signal and synthesize disparate documents into a coherent narrative.
ProductivityCreate a Task in Asana
• What it does: Maps fields like “Task Name” and “Due Date” to trigger an API call.
• Why it’s automation: While natural language makes this easier to trigger, the back-end operation is a simple, structured POST request.
Generate Meeting Summaries (Gong)
• What it does: Ingests messy, conversational meeting transcripts and distills them into core action items and decisions.
• Why it’s LLM: Human conversations are highly unstructured, circular, and full of interruptions. Identifying who committed to what is an NLP reasoning task.

The Three-Question Heuristic for Your Roadmap

Before you authorize a budget for an LLM-based agent, put the use case through this quick diagnostic:

  1. Is the input unstructured? If your system is parsing structured JSON, clean database tables, or simple drop-down selections, you do not need an LLM. If the input is messy text, raw logs, emails, contracts, or conversational speech, you do.
  2. Can the workflow be mapped with an offline flowchart? If you can sketch every single path of the workflow using static “Yes/No” decision diamonds, write a traditional script or use standard automation software. LLMs should only be deployed when the system must reason through unexpected inputs and adapt its strategy dynamically.
  3. What is the cost of hallucination? Deterministic code executes with 100% mathematical consistency. LLMs operate probabilistically. If a 1% deviation means executing an incorrect payroll transfer, leave it to traditional APIs. If a 1% deviation means a slightly less perfect meeting summary, an LLM is a perfect fit.

Architecting the Future: Hybrid Agents

This doesn’t mean “agentic AI” is a marketing gimmick. The true “agentic advantage” lies in unifying these two layers.

A high-performing agent uses an LLM as the front-end Reasoning Engine (handling intent, perception, and planning) while routing the actual execution to deterministic, reliable APIs.

  • For instance, an agent might use its cognitive engine to read a messy email and understand that a customer is complaining about a delayed delivery.
  • It then uses deterministic automation to query the ERP system, fetch the exact tracking number, and check the status.
  • Finally, it switches back to its cognitive engine to draft a personalized, empathetic response explaining the delay.

By separating the brains (LLM) from the brawn (deterministic automation), you protect your enterprise from fragile workflows while keeping your compute costs in check.

Understanding True Positives, False Positives, and Accuracy in Simple Terms


Have you ever been startled awake by a fire alarm, only to find out it was just a burnt piece of toast? Or worse, have you ever wondered what would happen if a fire alarm failed to go off during an actual fire? These situations highlight key concepts in machine learning and statistics: true positives, true negatives, false positives, and false negatives. Let’s break them down in the simplest way possible.

Fire Alarm as a Machine Learning Model

Think of a fire alarm as a machine learning model designed to predict whether there is a fire. The alarm has two possible actions: it either goes off or it remains silent. However, just like any prediction system, it can make correct or incorrect judgments.

Understanding the Four Possible Outcomes

  1. True Positive (TP) – The Alarm Works as Expected
    • Imagine there is an actual fire, and the fire alarm goes off. This is the ideal scenario where the system correctly identifies the presence of fire.
  2. True Negative (TN) – No Fire, No Alarm
    • If there is no fire and the fire alarm remains silent, the system has correctly predicted the absence of fire. This is another ideal situation.
  3. False Positive (FP) – The False Alarm Problem
    • Have you ever been cooking and triggered the fire alarm even though there was no real fire? That’s a false positive. The alarm wrongly detected a fire when there wasn’t one.
  4. False Negative (FN) – The Dangerous Miss
    • This is the most dangerous scenario: a fire is actually happening, but the fire alarm doesn’t go off. This is a false negative, where the system fails to identify a real fire.

Evaluating the Performance of the Fire Alarm

Just like a fire alarm, machine learning models are evaluated based on their accuracy, precision, and recall.

  1. Accuracy:
    • Accuracy is the measure of how often the model makes the right prediction. It is calculated as:Accuracy = (TP + TN) / (Total Predictions)In simpler terms, it tells us how many times the alarm correctly worked (either going off when needed or staying silent when appropriate) compared to all situations.
  2. Precision:
    • Precision measures how many times the alarm correctly identified fire out of all times it went off:Precision = TP / (TP + FP)If your fire alarm is too sensitive and goes off every time you toast bread, its precision is low.
  3. Recall:
    • Recall focuses on how well the alarm detects actual fires. It is calculated as:Recall = TP / (TP + FN)If the fire alarm frequently fails to detect real fires, recall will be low, making it unreliable for real-world use.

The Real-World Trade-Off

In practical applications, there’s often a trade-off between precision and recall. A highly sensitive fire alarm may have a high recall (it detects every fire) but a low precision (lots of false alarms). On the other hand, an overly cautious alarm might have high precision (it rarely makes mistakes) but low recall (it might miss real fires).

The key is to find the right balance depending on the scenario. In life-threatening situations like fire detection, a system that minimizes false negatives (i.e., missing actual fires) is more critical than one that avoids false positives.

Final Thoughts

Fire alarms provide a simple yet effective analogy for understanding machine learning concepts. Whether designing fire alarms or AI models, the goal is to maximize accuracy, improve precision, and ensure high recall so that the system works as reliably as possible.

Next time your fire alarm goes off while cooking, just remember: it might be annoying, but at least it’s trying to keep you safe!

‘Topics’ to categorize, filter and search records in Salesforce


Topics serve as a means to categorize, filter and search records in Salesforce, simplifying the organization of records. They are essentially labels that can be assigned to records, with the ability to assign multiple Topics to a record and vice versa. For instance, a single topic such as “2023 Fund Raiser” can be assigned to multiple records of different objects like Contact, Account and Task.

By assigning Topics to records, relevant records can be quickly filtered and searched across objects or from the same object using list views or from global search.

When a specific topic is accessed, all related records can be viewed under related information.

The Topics for objects section in the set-up can be configured to enable Topics. You can customize further by writing triggers on Topics and Topic Assignment events.

If you’re not already using Topics in Salesforce, consider giving them a try to see how they can benefit your organization.

Enforcing the community users to accept the T&C


Have you ever wondered how Salesforce displays a maintenance window notification as the first screen when you log in, or how to present important announcements or terms and conditions as the first step before allowing users to log in? Salesforce login flows can help you handle these requirements elegantly. By creating a flow and attaching it to the login experience of a specific profile, Salesforce ensures that the flow is executed as the first step before users can access the application. Alternatively, using a Visualforce page is also an option. To connect a flow or Visualforce page to a profile, visit Setup -> Identity -> Login Flows in the admin page.

With Salesforce login flows, the possibilities for customizing the login experience are endless. You can use a flow or Visualforce page to present new announcements to employees, customers, or partners, or enforce acceptance of new terms and conditions for portal usage. Additionally, you can create more advanced functionality, such as changing a user’s profile or adding or removing permission sets based on their choices, by running the flow or Visualforce classes in System mode. Salesforce login flows are a versatile solution that can be used to handle a wide range of use cases, including anything you can imagine, as a first step before users can access the application.

Getting to know the user device specifics of a Salesforce user


When a Salesforce user experiences a specific challenge on a particular device or browser, it can be difficult to replicate the issue in a test environment because of a lack of information about the device specifics. The user may not be tech-savvy enough to provide the necessary information. In these situations, the Setup -> Security -> Activations section can provide valuable insight into the device, OS, and browser information to help set up the environment and replicate the issue. For example, when logging in from a laptop or browser, the activations section provides information about the device (Mac), OS version (X 10_16_7), Salesforce mobile SDK version (10.1.0), the browser (Chrome), and Chrome version (105.0.0.0) used. Similarly, when accessing Salesforce from a mobile device (Salesforce1 app), details about the device type (iPhone), iOS version (16), Salesforce1 app build version (238.060) can be found. Understanding these details is an important first step in debugging, testing and resolving an issue that is a one-off case.

e.g. on what you see under activations

Identity Provider, Auth provider, SSO Settings and Connected App – Confusing?


An Identity Provider (IdP) in Salesforce allows you to configure your Salesforce instance as the provider of user authentication and validation for other applications. This means that if a user is successfully authenticated and validated by your Salesforce instance, they will also be granted access to other applications that utilize the IdP service.

An Auth Provider in Salesforce is a configuration that allows you to specify other external Identity Providers (IdPs) that are authorized to authenticate users to log in to your Salesforce instance. For example, if you set up Google as an Auth Provider, Salesforce will consider a user to be a legitimate user if they are successfully authenticated by Google. In this scenario, Salesforce acts as a Service Provider (SP). Salesforce has predefined Auth connectors that are built on OpenID, which can be used to connect to popular third-party IdPs like Facebook, LinkedIn, and Google. Additionally, if the IdP supports OpenID or OAUTH 2.0, you can define your own Auth Provider.

The SSO Settings in Salesforce allows you to configure your instance of Salesforce as a Service Provider (SP) for Single Sign-On (SSO) using the SAML authentication method. This setup involves configuring your Salesforce instance with information from the Identity Provider (IdP), which acts as the gatekeeper for user access to other organizations in a multi-org Salesforce environment. Additionally, the Just-In-Time (JIT) provisioning feature in SSO Settings enables the creation or updating of users in your Salesforce instance when they are authenticated by external systems. The registration handler in Auth Providers can also be used for JIT user provisioning when users are authenticated by external systems.

A Connected App in Salesforce allows external systems to connect to your instance for identity and resource access. It acts as a bridge for external systems to access the resources they need, and can be used for both Identity Provider and Service Provider functionality. The Connected App also includes a user provisioning wizard to manage user events such as creation, activation, and updates in other connected applications.

Setting the flow context


In Salesforce, there is a feature that allows you to run flows in a context of your choice. By opening a flow and clicking on the gear icon, you can access the “show advanced” option to set the value for the “How to Run the Flow” field.

Option 1 allows for dynamic flow execution based on how it is launched. If the user launches the flow through the Salesforce UI, it will run in the user context. However, if the system runs the flow as a scheduled job, it will run in the system context.

Option 2 allows the flow to run in the System context with data sharing rules respected, but without respecting user’s field level access controls. This means that the system can read and update all fields in a record as long as the record can be accessed by the user.

Option 3 allows the flow to run in the System context with access