0% found this document useful (0 votes)
58 views

Salesforce B2C Commerce Developer Academy: Partner Enablement

This document provides an overview of the Salesforce B2C Commerce Developer Academy. It discusses expectations for the academy, including completing pre-work and post-work assignments. The agenda for the first module is presented, which is to extend an existing system object to expose a new attribute given business requirements, and to determine if a custom object is needed to store custom data for another business need. Key topics that will be covered include system and custom objects, customizing objects, accessing objects programmatically, and transaction management.

Uploaded by

PrabhuYechhi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Salesforce B2C Commerce Developer Academy: Partner Enablement

This document provides an overview of the Salesforce B2C Commerce Developer Academy. It discusses expectations for the academy, including completing pre-work and post-work assignments. The agenda for the first module is presented, which is to extend an existing system object to expose a new attribute given business requirements, and to determine if a custom object is needed to store custom data for another business need. Key topics that will be covered include system and custom objects, customizing objects, accessing objects programmatically, and transaction management.

Uploaded by

PrabhuYechhi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Salesforce B2C Commerce Developer Academy

Partner Enablement

Praveen Gaur
[email protected]
Forward-Looking Statement
Statement under the Private Securities Litigation Reform Act of 1995

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions
prove incorrect, the results of salesforce.com, Inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other
than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other
financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded
services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and
services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of
our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our
relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer
deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that
could affect the financial results of salesforce.com, Inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for
the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our
website.

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or
at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. salesforce.com, Inc. assumes no obligation and
does not intend to update these forward-looking statements.
B2C Developer Academy
Expectation Settings

- Goes beyond the Certification Requirements.


- Intent is to enable you to create customer success.
- First finish pre-work.
- Attend the webinar series.
- Implement the post-work DIY exercise.
- Attempt Quiz, if preparing for Certification.
B2C Developer Academy
Enablement Guide

Enablement Guide
Today’s Agenda

Module Objective: Agenda:

- Getting Started
Given business requirements, extend the storefront to
- System & Custom Objects
expose a new attribute on an existing system object
- Customizing Objects
type.
- Accessing Objects & Properties
Given a business need to store custom data, - Transaction Management
determine if a custom object is needed and create - Understand Key System Objects
and configure as required. - API Performance Considerations
Getting Started
- Setting up SFRA & VS-Code
Getting Started
Development Setup – Github, SFRA & VS Code

Follow the steps mentioned in Development Setup guide.


• Create Github account & get access to B2C CC Community Repo(s).
• Setup SFRA – build & deploy on Sandbox.
• Configure VSCode for development & debug.
Business Objects
- Business Objects
- System & Custom Objects
- Customizing Objects
Business Objects
What are System & Custom Objects ?

● System Objects:

● B2C Commerce provides a rich library of objects that are designed to address almost all data needed by
ecommerce applications.
● Using these object definitions greatly speeds implementation and enables you to take advantage of
functionality developed for these objects.
● You can also customize your data by creating custom attributes for system object.
● System objects define the data structure of the catalog and other essential features used by Salesforce B2C
Commerce.

● Custom Objects: When System Objects do not fit in to requirement, you can create your own Objects & define
your own schema(attributes & their properties). These custom defined Objects are called Custom Objects.
Lets do a Walkthrough !!
- System & Custom Objects
- Customizing System Object attributes
- Create custom attributes
- Import/Export Metadata
- Import/Export Custom Objects
- Import/Export System Objects
Business Objects
Data Types Supported by B2C Commerce

Review the Documentation


Accessing Objects Programmatically
- System Objects
- Custom Objects
Accessing Objects Programmatically
Reviewing SystemObjectMgr Class
Manager class which provides methods for querying for system objects with meta data using the Commerce Cloud
Digital query language.

API Method Objects Supported


static describe(type : String) : ObjectTypeDefinition

static getAllSystemObjects(type : String) : SeekableIterator


GiftCertificate
static querySystemObject(type : String, queryString : String, args : Object...) Order
: PersistentObject Profile
SourceCodeGroup
Store
static querySystemObjects(type : String, queryString : String, sortString : String, args ProductList
: Object...) : SeekableIterator

static querySystemObjects(type : String, queryAttributes : Map, sortString : String)


: SeekableIterator
Accessing Objects Programmatically
Reviewing Object Specific Manager Classes

• Object specific Manager classes provides the given Object


specific operations.
• SystemObjectMgr does not support all the System Objects &
also provides limited functionality.
• All other objects are managed via the Object specific Manager
Classes.x

Let’s review CustomerMgr & Account.js


Accessing Objects Programmatically
Reviewing CustomObjectMgr Class

• Custom Objects are managed i.e. record creation, updation &


deletion happens programmatically via this class.
• Dedicated methods for search & retrieval.
• All the API methods are static, no constructor for this class.

Let’s review the Documentation & Usage.


System & Custom Objects
Pro Tip

Stores.js in app_storefront_base has following line of code:


Use clear() on
var StoreHelpers = require('*/cartridge/scripts/helpers/storeHelpers’);
SeekableIterator
instances.
And Cartridge Path: Cartridge_DE:Link_Cartridge:app_storefront_base
All the cartridges have storeHelpers at the same path(as requested).

storeHelper.js from Cartridge_DE will be returned,


as it is the left most and Cartridges on the left takes
presidence over the right ones.
Lets do a Code Walkthrough !!
- Using SystemObjectMgr & CustomObjectMgr
- Using System Object specific Manager Classes
Create, Update & Delete Records
- Transaction
Transaction
Commerce Cloud Transaction Handling

“A transaction generally represents any change in a database. It offers Atomicity & Fault-Tolerance.”

• A transaction is an atomic operation to perform all the related changes to a given record.
• A transaction provides a context for performing atomic changes to persistent business objects.
• Before a business object can be created, changed, or deleted, a transaction must be started using
the begin() method.
• All changes on the touched business objects will only be made durable when the transaction is committed
with commit().
• If a transaction is rolled back, all changes so far will be reverted and the business object will have their previous
state again.
• In case of any exception while working with business objects inside of a transaction, the transaction cannot be
committed anymore, but only be rolled back.
Transaction
Explicit & Implicit Handling

Explicit Control Implicit Control

Review the Documentation & Usage.


Transactions
Transaction Handling

Review the Documentation


Lets do a Code Walkthrough !!
- Transaction Handling
Before we meet tomorrow…
- Check Enablement Guide to refer the resources.
- Complete the code setup & VScode.

You might also like