After you create the Modeler workspace and generate a successful build in VS Code based
Modeler, launch the simulator UI of the mobile app. Test the Consumer Goods Cloud offline mobile
app as it appears on one of the available target platforms on a tablet or mobile
phone.
Required Editions
The URL http://localhost:3000 is added to the CORS
allowed list in your Salesforce org.
Available in: Enterprise, Performance, and Unlimited
Editions that have Consumer Goods Cloud enabled
User Permissions
Needed
To start the server
Customizer, Admin
Open the config.json file at $workspace/appl/config. and then enter your consumer key in
the sfConsumerKey field: "application": { "sfConsumerKey": "consumer_key_value" }, .
This is a required one time configuration to be set after you create the Modeler
workspace. For instructions on obtaining the consumer key, see Configure Mobile Settings.
Generate the runtime artifacts. Run sf modeler workspace
build.
To start the local server for your simulator, run the sf
modeler workspace server start command in your Modeler workspace .
Alternatively, open the URL that’s available in the server logs.
When you start the local server to invoke the simulator app, if the default port 3000
is occupied by another process, the server fails to start with the EADDRINUSE error. You
should terminate that process and run the command again.
Log in and authenticate to your Salesforce org as a sales rep and allow the
synchronization process to complete. On successful synchronization, the simulator app shows
the landing screen of the CG Cloud offline mobile app.
Important Use only
one instance of the Chrome browser in incognito mode and connect to a single org as a valid
user at a time to avoid authentication mismatch or other errors.
You can run the simulation app in offline mode for subsequent use. Use the simulator in offline
mode if you don’t need additional data, the last synced data in the simulated app is
sufficient for testing purposes, for example. To launch the simulator app in offline mode,
perform a complete sync first and then open the local host URL appended with &forceOffline. For example, http://localhost:3000/framework/index.html?desktop&forceOffline
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.