Cert++
Close

Storefront APIs versus UI API and Aura controllers

Key Takeaway

Storefront APIs give custom Lightning Web Components (LWCs) four advantages over platform UI APIs and Aura controllers: security, performance and scalability, convenience, and UI cohesiveness.

Storefront APIs are a set of APIs that custom LWCs, such as headers, footers and banners, use to connect to data and run store processes. Examples of those processes are adding a product to a cart or wishlist and applying a coupon to an order. Storefront APIs are supported in B2B and B2C stores built with LWR templates. They matter because components built on them get buyer entitlement guardrails, layered caching, data aggregation and page-wide reactivity.

Three kinds of Storefront APIs

Storefront APIs come in three kinds: Imperative APIs, Wire Adapters and Storefront Actions. Each kind differs in how and when it retrieves data. Together they fetch and display data for Commerce, Platform and CMS products.

What it isWhen it runs
Imperative APIsProcess-oriented functions that change data and return an outcomeUsually when a page load or button click triggers them
Wire AdaptersAdapters that call a GET method to retrieve data from a hosted data sourceWhen the LWC loads or updates
Storefront ActionsEvents that trigger updates to closely related LWCsOn events such as adding an item to a cart or filtering search results on a product variant
Salesforce Accredited B2B Commerce Developer Professional Study Guide

Checklist progress

0/124Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Salesforce Accredited B2B Commerce Developer Professional studiers. 757 members and growing.