Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Keep mobile in mind

Describes considerations for the Configured Commerce Mobile App when developing Configured Commerce extensions.

To help you plan for and build Configured Commerce extensions that will work with the Configured Commerce Mobile App both now and/or in the future, consider the following scenarios when approaching development.

Optimizely recommends adding custom business logic on the API and/or server side first. Assess the impact of these customizations to ensure they work well on both your Configured Commerce website and the Mobile App before exploring other ways of extending the system or business logic.  Remember that the UI of the Mobile App is not all extensible, so custom changes in the website's UI will not carry over to the Mobile App.

Scenario - Custom field required to submit orders

You add a custom field to the Configured Commerce storefront and want to require it to have a value before customers can submit orders. You change the relevant API endpoint to accommodate for and require the new field.

Considerations

While we don't prevent you from adding custom fields to an API, consider:

  • Configured Commerce websites and the Mobile App have separate user interfaces, so anything you customize (including adding fields) on the storefront does not cascade to the Mobile App i.e. Themes, JavaScript, CSS, etc.
  • For example, adding a new, required property on an API endpoint can be implemented in the storefront but not in the Mobile App
  • Explore alternatives like making the new property on the API optional and adding in additonal logic to handle the mobile application instance

Scenario - Product availability messages

Configured Commerce passes a product availability message to your customers as a string of data through an API. You want to format this message so it's easier for your customers to read. You put logic on the storefront side to insert pipes to parse the message when it displays to customers.

Considerations

While using pipes in the storefront logic to parse the data string doesn't break anything, consider:

  • Configured Commerce websites and the Mobile App have separate user interfaces, so anything you customize (including formatting data strings) on the storefront does not cascade to the Mobile App i.e. Themes, JavaScript, CSS, etc.
  • The Mobile App will continue to use the data string and display the product availability message as-is to your customers
  • Explore alternatives like adding logic to the relevant API if you want to expose additional values for use on both your Configured Commerce website and Mobile App