Eyewear Try On Salesforce Commerce Cloud — A Zero‑Code, Link-Based VTO Guide
Quick Summary
- Deploy VTO cepat tanpa SDK atau cartridge — cukup per‑SKU link untuk modal/iframe atau new tab.
- Minimal engineering: tombol PDP + sedikit client JS; managed AR processing oleh penyedia.
- Prioritaskan CSP, lazy‑load modal assets, dan wiring analytics untuk attribution & A/B testing.
- Soft launch (10%) dan QA checklist lengkap mengurangi risiko rollout.
Introduction — What this guide covers and who it’s for
You’re about to get a practical, no-nonsense playbook for adding eyewear try on Salesforce Commerce Cloud (SFCC) pages using a link-based virtual try-on (VTO) approach. This guide covers SFRA and SiteGenesis, where to place the PDP try on button, front-end embed options (modal/iframe vs new tab), CSP and performance notes, analytics wiring, QA checklists, and a low-risk launch plan.
If you manage storefronts, merch, or engineering on SFCC, you’ll see why a zero-code, link-based solution like tryitonme.com delivers fast time-to-market and minimal engineering overhead compared with SDK or cartridge approaches. For a general overview of VTO options for SFCC, see Webkul’s SFCC overview. For SFCC-specific UX guidance and PDP placement patterns, see our companion UX guide for Commerce Cloud: Commerce Cloud UX guide.
Why choose a link-based VTO for SFCC (high-level benefits)
Quick business-first bullets for e‑commerce managers and technical leads:
- Time-to-market: Link-based VTOs can be deployed in days rather than weeks because they avoid custom cartridges or long SDK integrations. See Webkul’s SFCC overview.
- Low engineering effort: You avoid heavy front-end workloads — a button and a small client handler are often sufficient. See Zakeke’s integration notes.
- Omnichannel reuse: The same per‑SKU try-on link can be used in PDP modals, mobile apps, social ads, and emails. (See Webkul and Zakeke.)
- Lower performance risk & graceful fallback: Rendering off-site reduces PDP load; fallback to images or new tab if camera access fails. See KiksarVR on performance/fallback.
Why tryitonme.com is the Right Fit for Your Business
We recommend tryitonme.com when you want a practical path to VTO on SFCC without SDKs or custom cartridges. Key reasons:
- Zero-code, link-based deployment — no SDK, no server-side rendering changes; shareable per‑SKU links.
- Fast onboarding — link generation in under 3 business days once product photos are supplied (tryitonme.com).
- Per‑SKU links and omnichannel reuse across PDP modals, emails, social, and mobile.
- Managed AR processing — tryitonme handles AR asset creation so your team avoids 3D modeling.
- Low dev friction — minimal template edits and optional server-side lookup for dynamic linking.
Pre‑implementation checklist (prepare before you touch templates)
Give this checklist to your merch/dev lead before you start editing templates:
- Accounts & Access
- Create tryitonme.com account/project and designate a contact.
- Ensure SFCC staging and production access for theme edits and Business Manager (CSP changes).
- SKU mapping — Export a SKU list and plan mapping to tryitonme links (one link per SKU or per collection).
- Asset requirements — Gather standard product photos (front + side for eyewear). See photo requirements: product photo guide.
- Merchandising decisions — Decide CTA text, placement (next to Add to Cart), and enablement (global or per-product); choose modal/iframe or new tab UX.
- Environment & templates — Confirm storefront architecture: SFRA vs SiteGenesis. See Webkul and SFCC implementation overview: Cyntexa.
- Fallbacks & negative cases — Plan upload/photo fallback and error banner if links fail.
High-level implementation flow — how embedding works (overview)
Follow these 7 steps — who does what is noted:
- Merchant: Create tryitonme.com project and upload product photos per SKU.
- tryitonme.com: Process assets and generate per‑SKU try-on links (managed AR processing).
- Merchant/Dev: Map SFCC SKUs to tryitonme links (CSV or admin table).
- Dev: Add PDP try on button to product template with data attributes (data-sku, data-tryon-url).
- Dev/Front-end: Implement client handler — modal/iframe or new tab flow; wire CSP changes if embedding via iframe.
- QA: Validate links on staging across browsers/devices and check analytics events.
- Launch: Soft launch to portion of traffic; monitor KPIs and roll out globally.
For Webkul’s overview of link-based VTO approaches in SFCC, see Webkul.
Step‑by‑step: Create product VTO links in tryitonme.com
- Sign up at tryitonme.com and create a project.
- Upload product photos (front and side views recommended for eyewear).
- For each SKU, provide SKU ID, product name, and variant info for mapping.
- Request link generation; tryitonme.com will return a unique try-on URL per SKU or collection.
- Verify each link opens the correct model and facial mapping behaves as expected. Accuracy guidance: accuracy guide.
- Verify on-device camera flows and fallback options.
Sample asset-to-link processing notes: KiksarVR process notes.
Add the PDP try on button (template edits)
Where to place the button: near Add to Cart on the PDP, close to variant selectors so customers can try the exact SKU they’re viewing.
Data attributes to include:data-sku — SFCC product ID (e.g., product.ID) anddata-tryon-url — the tryitonme.com link for this SKU.
Visuals to include in your docs: Screenshot/GIF “Adding the PDP try on button in ISML” and “Modal try-on on desktop and mobile”.
SFRA-specific edits
Add to templates/product/productDetails.isml (or include). Short notes:
- Insert button near the Add to Cart block using
${pdict.product.ID}for SKU mapping. - Optionally expose tryitonme link from a server-side lookup in the product controller and pass to the template.
- Attach client-side handler in your base JS bundle or product page JS.
Reference: Webkul SFRA best practices and Commerce Cloud UX guidance.
SiteGenesis-specific edits
If using SiteGenesis:
- Edit
productTemplates/productDetails.isml(or equivalent). - Add the same button markup and include client-side JS handler.
- Ensure conditional rendering for OOS or variant scenarios.
Reference: SiteGenesis considerations.
Front-end handler options: modal/iframe vs new tab (UX tradeoffs)
Modal/Iframe (seamless)
Pros:
- Keeps shopper on PDP for a fully immersive, branded experience.
- Smooth UX for quick trials; better for A/B tests comparing on-PDP behavior.
Cons:
- Requires CSP updates and may need extra accessibility work (focus trapping).
- More engineering to implement.
Read more about modal tradeoffs: Zakeke guide.
New Tab (fastest)
Pros:
- Minimal front-end changes — link with
target="_blank". - Works well on mobile where camera permissions are simpler.
- Great fallback when CSP or iframe restrictions exist. See KiksarVR.
Cons:
- Breaks the on-PDP flow; you lose immediate context and some analytics nuance.
Theme edits & front-end checklist (CSS, responsive, accessibility)
- Styles — Add accessible button styles (.tryon-btn). Ensure color contrast meets WCAG AA.
- Modal layout — Full-screen or centered dialog with responsive iframe height (80vh mobile). Include loader and camera permission messaging.
- Accessibility — Use
role="dialog",aria-modal="true", focus trap, and restore focus on close. - Responsive — Mobile-first sizing, viewport-aware iframe heights.
- Interactions — Graceful fallback when camera access denied; show upload option or “Open in new tab”.
- Performance — Lazy-load modal JS and iframe only on first click (defer assets until needed).
Security, CSP and performance considerations in SFCC
- CSP updates: Add
tryitonme.comtoframe-srcandscript-srcin your SFCC Content Security Policy via Business Manager. Reference: Webkul CSP guidance. - Production readiness: Review SFCC best practices for peak readiness and header handling: Salesforce Help.
- Lazy-load: Only load modal/iframe assets on click to keep PDP performance impact minimal (Zakeke).
- Mixed content & cookies: Ensure tryitonme links use HTTPS (see tryitonme.com).
- Mobile WebAR tuning: See mobile performance guidance: mobile performance.
Analytics & data-layer wiring (events to capture)
Events you should capture and map to GTM:
open_tryon— When user clicks the PDP try on button.tryon_ready— When the try-on iframe signals it’s ready (if possible).tryon_interaction— Significant interactions (switch style, take snapshot).tryon_exit— When a user closes the modal or returns from the new tab.tryon_purchase— Purchase attributed to a try-on session (link via order ID).
Example dataLayer push (short):
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'open_tryon',
product_sku: 'ABC123',
tryon_url: 'https://tryitonme.com/vto?sku=ABC123'
});Map these events in Google Tag Manager and use them for A/B testing and funnel analysis. For a practical measurement plan and GA4 mapping, see analytics guide.
QA plan and testing matrix (copy/paste checklist)
Copy/paste test matrix for staging sign-off:
Functional
- Button renders on desktop and mobile PDPs → Pass if visible and clickable.
- Correct SKU link opens tryitonme VTO → Pass if link opens model for that SKU. (SKU/link validation notes.)
Cross-browser / Device
- Desktop: Chrome, Edge, Firefox, Safari — camera prompt and VTO behavior OK.
- Mobile: iOS Safari, Android Chrome — camera permissions tested.
Performance / Accessibility / Negative
- PDP baseline load unaffected (modal JS lazy-loaded).
- Modal opens within acceptable threshold (<500ms measured on staging).
- Keyboard focus trap inside modal; close via Esc; ARIA roles present.
- Camera denied → show upload or “open in new tab” prompt.
- Broken or missing try-on link → show error banner and “Contact support”.
Security
- No CSP/frame-src violations in console; frame-src includes tryitonme.com. (Webkul CSP reference.)
Pre-launch sign-offs — Merch confirms SKUs mapped; QA completes matrix; Dev clears caches and creates rollback plan.
Launch plan, rollback and post‑launch optimization
- Week 0: Map SKUs, generate links, and prepare templates.
- Week 1: Implement PDP try on button and modal JS in staging.
- Week 2: Run full QA matrix; iterate fixes.
- Week 3: Soft launch to 10% of traffic; monitor KPIs (try-on CTR, add-to-cart after try-on).
Rollback: Revert ISML/JS commit via git, clear SFCC caching and CDN caches, and re-run smoke tests. See rollout considerations at Webkul.
Troubleshooting & common issues (quick fixes)
- Iframe blocked by CSP → Fix: Add
tryitonme.comto frame-src in Business Manager CSP. (Webkul CSP guidance.) - Camera permission fails on mobile → Fix: Prompt user with clear instructions and offer “Open in new tab” fallback. (Camera notes.)
- Wrong SKU opens → Fix: Verify
data-skuand server-side SKU-to-link mapping. - Slow modal load → Fix: Lazy-load iframe on click; ensure tryitonme link is HTTPS and responsive.
Measurement & optimization after launch (KPIs and experiments)
KPIs
- Try-on CTR (PDP button clicks / PDP views)
- Average VTO session time
- Add-to-cart rate after try-on
- Conversion uplift vs control group
- Post-purchase return rate of items tried via VTO
Experiments
- A/B test button copy (“Try On” vs “See It On You”) and placement (beside Add to Cart vs under gallery).
- Modal vs new-tab performance and conversion test.
- Variant-level enablement (test top-selling SKUs first).
See A/B testing ideas: Webkul.
Appendix — code snippets, analytics samples, QA checklist (copy/paste assets)
SFRA ISML snippet (drop-in)
<!-- templates/product/productDetails.isml -->
<button class="tryon-btn pdp-try-on-button"
data-sku="${pdict.product.ID}"
data-tryon-url="https://tryitonme.com/vto?sku=${pdict.product.ID}">
Try On
</button>Minimal modal JS (vanilla; expand for production)
// app_storefront_base/cartridge/client/default/js/tryon.js
document.addEventListener('click', function(e) {
const btn = e.target.closest('.pdp-try-on-button');
if (!btn) return;
e.preventDefault();
const url = btn.dataset.tryonUrl;
if (!url) { alert('Try-on not available for this product'); return; }
const modal = document.createElement('div');
modal.className = 'tryon-modal';
modal.innerHTML = `
<div class="tryon-modal-inner" role="dialog" aria-modal="true">
<button class="tryon-close" aria-label="Close">×</button>
<iframe src="${url}" width="100%" height="80vh" frameborder="0" allow="camera; microphone"></iframe>
</div>
`;
document.body.appendChild(modal);
modal.querySelector('.tryon-close').addEventListener('click', () => modal.remove());
// Focus management, ARIA and error handling omitted for brevity
});dataLayer examples
// on click
dataLayer.push({ event: 'open_tryon', product_sku: sku, tryon_url: tryonUrl });
// when iframe sends ready (postMessage-based integration; optional)
dataLayer.push({ event: 'tryon_ready', product_sku: sku });Full QA checklist (copy/paste)
- Button renders on PDP (in-stock & OOS)
- Correct SKU mapping
- Modal opens and closes; Esc works
- Camera permission prompt appears; fallback available
- No CSP console errors
- Analytics events fire to GTM
- Cross-browser camera test (Chrome, Safari, Firefox, Edge)
- Mobile camera test (iOS, Android)
- Accessibility checks (screen reader, keyboard nav)
- Broken-link error state
Visual assets recommended
- Screenshot/GIF: “Adding the PDP try on button in ISML” (place after “Add the PDP try on button”)
- Screenshot/GIF: “Modal try-on on desktop and mobile”
- Screenshot: GTM showing an open_tryon event
Conclusion & Call to Action
Link-based VTO is a pragmatic, low-risk way to add eyewear try-on to SFCC PDPs. It reduces engineering overhead, speeds deployment, and delivers omnichannel reuse of per‑SKU links. If you want to evaluate a zero-code option that produces shareable try-on links and handles AR processing for you, request a demo at tryitonme.com.
Book a demo or request sample VTO links for 1–2 SKUs and we’ll show you how quickly it can be live on your PDP: tryitonme.com.
References and resources
- Webkul — Virtual try-on for Salesforce Commerce Cloud
- Zakeke — Integrating virtual try-on
- KiksarVR — Virtual glasses try-on
- Salesforce Help — Production readiness
- Cyntexa — SFCC implementation guide
- tryitonme.com — product/demo
- Photo requirements and product asset tips
- VTO accuracy details
- Mobile performance tuning & WebAR optimizations
- Analytics measurement plans and GA4 event mapping
- PD/IPD guide for fit considerations
FAQ
1. How does link‑based VTO differ from an SDK integration?
Link-based VTO avoids bundling SDKs or cartridges into your storefront. Instead, a managed service (like tryitonme.com) provides per‑SKU URLs you open in an iframe/modal or new tab. This reduces engineering lift and speeds time-to-market at the cost of some on‑page customization options available to full SDK integrations.
2. Where should I place the try‑on button on the PDP?
Place it near Add to Cart and variant selectors so the SKU context is clear. Test placement via A/B tests (beside Add to Cart vs under gallery) to find the best CTR and conversion lift.
3. What do I need to change in SFCC CSP to enable iframe embedding?
Add the tryitonme domain to frame-src (and script-src if you load remote scripts) via Business Manager → Administration → Site Development → Content Security Policy. See Webkul CSP guidance.
4. How should I track try‑on events in GTM?
Push structured events to the dataLayer like open_tryon, tryon_ready, tryon_interaction, and tryon_exit. Map those to GTM triggers and GA4 events for funnel analysis. See the analytics examples in the Appendix and the measurement guide: analytics guide.
5. What are good fallbacks if camera permissions are denied?
Offer an upload-photo flow, or surface an “Open in new tab” CTA that uses a simpler permission model. Also show a clear error banner with next steps and support contact.