System and method for offloading application extension script execution from application hosting infrastructure

The provided systems and methods attempt to address possible issues with the use of third party applications with software as a service (SAAS) platforms, namely that lack of performance of third party app hosting infrastructure running the third party applications can affect multiple clients on the SAAS platform. In order to least mitigate this, third party app providers can create and upload their scripts to the SAAS platform for execution on the SAAS platform. The scripts must conform with extension points within SAAS functionality that are predefined. During execution, when the extension point is reached, the script is run on the SAAS platform instead of making an API call to the application on the third party app hosting infrastructure.

FIELD

The present disclosure relates to systems and methods for offloading application extension script execution from a third party application hosting infrastructure.

BACKGROUND

In order to run custom functionality provided by a third party application or app, in current software as a service (SAAS) platforms, for example E-commerce platforms, the third party application uses application interface (API) calls through the use of the application directly or via application extensions. In either case, there can be high latency associated with the use of API calls, and the application runs its code outside of the SAAS platform. If the app's infrastructure cannot accommodate a large enough volume of requests during periods of heavy load (e.g. flash sales, product drops), merchants that rely on the application can experience low availability of their stores during any high volume events of other merchants using the app. As a result, the app's hosting infrastructure needs to be able to handle such large volumes during peak events, however, this may not be practical for a small scale developer.

It is common for a SAAS platform to expose a lot of functionality and resources through APIs to enable apps to work with the SAAS platform in a collaborative manner. However, it is less common to see the reverse, namely integrations of apps into the SAAS platform. This can result in a gap between apps and a service instance that may be visible to users. For example, apps may run in completely separate tabs or have visible constraints, such as being constrained to an iFrame. This can lead to a disjointed user experience as users are required to jump repeatedly between multiple apps and the SAAS platform functionality.

SUMMARY

The provided systems and methods attempt to address or at least mitigate one or more of the problems referenced in the background section, by allowing apps to surface in a more native way within the SAAS platform. Extension points allow apps to integrate in SAAS platform workflows through the use of scripts that run on the SAAS platform. This may result in faster workflow execution and less context switching for SAAS clients.

According to one aspect of the present invention, there is provided a software as a service (SAAS) platform comprising: a memory storing computer executable code to implement a plurality of service instances for execution on the SAAS platform, the computer executable code comprising a plurality of extension points; at least one processor for executing said computer executable code; for a software application registered on the SAAS platform and installed on at least one of the service instances, a script associated with at least one of the plurality of extension points, the script stored on the SAAS platform for execution on the SAAS platform; wherein during execution of said computer executable code for the at least one service instance, when the at least one of the plurality of extension points is reached: executing on the SAAS platform the script associated with the at least one of the plurality of extension point.

Optionally, the SAAS platform is an e-commerce platform, and each service instance is an online store.

Optionally the platform further comprises: an interface for registering the at least one software application on the SAAS platform.

Optionally the platform further comprises: an interface for uploading the script in association with the at least one extension point and in association with the software application registered on the SAAS platform.

Optionally the platform further comprises: a script manager configured to send the script to a front end device for execution by the front end device.

Optionally the platform further comprises: a script executor configured to execute the script.

Optionally the platform is further configured to determine whether the script is available for a particular extension point and for a particular service instance.

Optionally, the SAAS platform determines the script is available when: the script is associated with the particular service instance; and the software application is installed on the particular service instance.

Optionally the platform further comprises: a script execution selector that selects between executing the script on the SAAS platform and calling an API to execute code associated with the software application on an external hosting infrastructure.

Optionally, the script execution selector selects based on one or more of: capacity of the SAAS platform to execute the script; load balancing; fee structure; current performance of the external hosting infrastructure in executing the code; criticality of the software application set on a per-service instance basis; preferences set on a per-service instance basis.

Optionally the platform further comprises: for each of at least one extension point associated with the script, respective default logic stored in the memory that is executed for a given service instance when the software application is not installed for the service instance.

Optionally the platform further comprises: one or more data structures stored in memory containing: a list of available extension points; for each of a plurality of software applications, and for each of the available extension points, an indication of whether a script has been uploaded; for each service instance, an indication of which software applications are installed.

According to another aspect of the present invention, there is provided a method executed on a SAAS platform, the method comprising: executing computer executable code to provide a service instance in respect of which a third party application has been installed, the computer executable code including an extension point; wherein during execution of said computer executable code for the service instance, the extension point is reached, executing on the SAAS platform a script associated with the extension point and the third party application.

Optionally, the SAAS platform is an e-commerce platform, and the service instance is an online store.

Optionally the method further comprises: receiving input registering the third party application on the SAAS platform.

Optionally, the computer executable code includes a plurality of extension points, the method further comprising determining whether a script is available for a particular extension point and for the service instance.

Optionally, determining whether a script is available for a particular extension point and for the service instance comprises determining the script is available when: the script is associated with the particular service instance; and the software application is installed on the particular service instance.

Optionally the method further comprises: at least some of the time, selecting between executing the script on the SAAS platform and calling an API to execute code associated with the application on an external hosting infrastructure.

Optionally, said selecting is based on one or more of: capacity of the SAAS platform to execute the script; load balancing; fee structure; current performance of the external hosting infrastructure in executing the code; criticality of the software application set on a per-service instance basis; set preferences.

DETAILED DESCRIPTION

Referring toFIG. 1, shown is a SAAS platform300provided by an embodiment of the application. The SAAS platform is configured to implement service instances302, a service instance being a set of functionality provided by the SAAS platform to a client of the SAAS platform. In a specific example, the SAAS platform is an E-commerce platform, and the service instances302are online stores implemented on the E-commerce platform. A detailed example of an embodiment of an E-commerce platform is described below with reference toFIGS. 6 and 7.

The executable code that implements the service instances302includes one or more extension points303. Extension points303are defined inside the SAAS platform to allow the customization of functionality of the SAAS platform, and more specifically the service instances. Each extension point has a specified format that includes well defined inputs and outputs. A specific example of an extension point relevant to the E-commerce context is a shipping rate calculator extension point which has an associated set of inputs which might for example include product details and shipping address, and has an associated set of outputs that includes a shipping rate. An extension point manager305, described in further detail below, is responsible for determining how to proceed once an extension point is reached during execution of code for a service instance. Any code that is to be executed for a given extension point must conform with the specified format.

The SAAS platform300has applications functionality304associated with applications that may be registered with the SAAS platform. In the illustrated example, this includes an application registration interface310for registering an application with the SAAS platform. For example, third party application developers may use this interface to register their applications. There is an application register312which associates each registered application with an application ID. There is an application installation interface314that is used to select which registered applications are to be installed against a given service instance. In the E-commerce context, the application installation interface314may be part of a merchant user interface, in which case personnel associated with an online store can use the application installation interface314to select which applications to install. An application installations register316maintains an indication of which application(s) are installed on (or registered against) which service instance(s).

The SAAS platform300has scripts functionality306associated with scripts to be executed on the SAAS platform. In the illustrated example, this includes a script uploading interface318for uploading scripts. Each script is uploaded in association with a specific application that is registered in the application registration interface310and a specific extension point within extension points303. Typically, the source of the script is the same as the source of the application, for example an application developer or provider. The scripts are stored in script storage320together with a script ID for each script. In addition, a script mapping322is maintained. The script mapping322indicates for each script, the associated application and the associated extension point. There are many ways equivalent information can be maintained. For example, for each extension point, script mapping could indicate which applications have scripts for the extension point, and indicate the script ID of such scripts.

The scripts functionality306also has a script executor324which executes the scripts in the script storage320. The script executor324is generally a processing capability within the SAAS platform. The script uploading interface318may also compile uploaded code received through the script uploading interface to produce the script in executable form for execution by the script executor324.

Also shown, external to the SAAS infrastructure300is one or more third party hosting infrastructures330associated with one or more providers of the registered applications.

In operation, service instances302are used to deliver SAAS services to clients. Typically, each service instance is associated with a respective client, although a client may be associated with or have multiple service instances. In the E-commerce context, a client would typically be a merchant.

Third party application developers develop applications for registration on the SAAS platform300, and register these through the application registration interface310. When this takes place the application register312is updated to indicate the application has been registered, and the application ID of the application. Once an application is registered with the platform, it is available for installation (or registration) against a service instance302. Through the application installation interface314, a client can select which registered application(s) to be installed against the client's service instance302.

In addition, application developers, for example the third party application developers, may develop scripts to provide customized functionality in association with a specific application, and in association with one or more of the available extension points303. Each script is developed in conformance with the format of the associated extension point. For example, the inputs to the script and outputs produced by the script should match those of the associated extension point.

These scripts are uploaded through the script uploading interface318which results in their storage in script storage320together with a script ID for each script. The script mapping322is updated to include a record for the script indicating the associated extension point(s) and the associated application ID.

During the execution of a service instance302, for example while a merchant or customer accesses an online store, the application(s) installed against the service instance are known from the application installation register315. When one of the extension points303is reached, the extension point manager305is invoked to determine how to proceed. The extension point manager uses knowledge of which application(s) are installed against the service instance, together with the script mapping322that refers to the extension point, to identify any script ID(s) associated with the extension point, and associated with an application that is installed against the service instance. When a script ID is identified, the extension point manager305causes the script having the identified script ID to be executed by the script executor324to provide the custom functionality of the script. In some implementations, in contrast to conventional approaches where some or all of the code written by an app developer may be executed on third party hosting infrastructure, the execution of an application script by the script executor324can be done without the need to call the application through an API to access the script functionality and without the need to rely on the third party hosting infrastructure330. In some embodiments, when no such script is available, default logic provided within the SAAS service instance for the extension point is executed.

In the illustrated embodiment, the extension point manager305determines where a script is available based on the extension point ID and the service instance ID. Based on the service instance ID, the extension point manager305can determine what applications are installed for that service instance from the application installations register316. Then, with knowledge of which applications are installed, the extension point manager305consults the script mapping322to determine if there is an entry in the mapping for the specified extension point for one of the applications installed, and if so obtains the script ID for the entry, and instructs script executor324to execute the identified script. In some embodiment, where there is no such entry, default functionality is executed.

By implementing the custom functionality at an extension point, application specific functionality, provided in the script from the application developer, is executed on the SaaS platform's hosting infrastructure when the extension point is reached. The described approach allows for 3rd party customization using scripts that run on the SAAS platform, and in some cases, benefit from the scalability/volume handling capabilities of the SAAS platform, and avoids the risks associated with insufficient capacity in an app's hosting infrastructure.

Developer User Interface (UI)

In some embodiments, a developer UI is provided. The developer UI provides developers with a current list of the available extension points, and details of the relevant format for each extension point. In addition, the developer UI provides a platform for a developer to develop and upload a script in association with a specific application and a specific extension point. The above-described application registration interface310may be part of the developer UI, and the above described script uploading interface318may also be part of the developer UI. In some embodiments, the developer UI also includes functionality to validate scripts before uploading and making them available for execution.

In some embodiments, a performance dashboard is presented through the developer UI indicating the performance of registered apps, in terms of how widely it is being used, uptime/downtime, latency etc. in some embodiments, where the performance of a registered application is poor, as defined by certain metrics, a recommendation is made through the developer UI to create and upload one or more scripts as described above to address the latency/performance issues.

FIG. 2Ais an example user interface200of a performance dashboard, according to one embodiment. The performance dashboard which may be a service instance running on and hosted by the SAAS platform, highlights a number of statistics and presents controls for developer use. According to this embodiment, the performance dashboard is for developers developing scripts or applications for use with a SAAS platform that is an e-commerce platform, but a similar approach can be used for other types of SAAS platforms. At the instant depicted, the dashboard is showing information and options in respect of a Shipping Calculator application; where the same application provider has multiple apps registered on the SAAS platform, the performance dashboard allows a selection of one of these applications, or a new application.

The dashboard includes an indication202of how many merchants (i.e. service instances) have installed the application (in this case, the number of merchants who have installed the Shipping Calculator app), latency or average response time204, memory use206, and uptime208. The dashboard further has controls for a developer to create a new script210, view the usage history of the script212, edit scripts213, and open a debugger tool214.

The statistic indicators202,204,206, and208may be generated by a server (e.g. within the SAAS platform) making a query over the network to a database storing the information. According to some embodiments, the statistics may update automatically.

The performance dashboard also includes a set of controls that, when activated (e.g. by a developer user), perform a variety of actions related to scripts.

New script control210instructs the performance dashboard to send a request to the server to start a new script. This redirects the developer electronic device to a new window to write a new script or upload a script written outside of the SAAS platform.

Use history control212instructs the performance dashboard to redirect the developer electronic device to a page to view specific application statistics or use cases. This can be used to investigate strange activity or performance of the app.

Edit scripts control214instructs the performance dashboard to send a request to the server to edit a script that has previously been uploaded to the SAAS platform.

Debugger tool214instructs the performance dashboard to redirect the developer electronic device to the debugger tool. The debugger tool allows the developer to run the script under supervised and managed conditions in order to track the code operations and monitor changes in computer resources that may indicate malfunctioning code.

More generally, in some embodiments, the developer UI allows an application developer to create scripts, find out if a shop or business has his/her application/script enabled, and in what capacity, edit/delete previously uploaded scripts.

According to some embodiments, as shown inFIG. 2B, the performance dashboard can generate and provide notifications216.

A notification216may be generated if a monitored statistic exceeds a predefined or relative threshold. Using a cursor220to hover over the notification216can cause the display of a tooltip218. The tooltip218can describe the notifications216, and may include links222to direct the user to more information.

For example, inFIG. 2B, there are two notifications216generated in the performance dashboard. One of the notifications indicates that a script is using 70% more memory than normal. This is also indicated in memory use statistic206. Clicking on the link222for this notification would redirect the developer to a user interface showing memory use and time, providing a snapshot to better determine why the use met a threshold.

According to some embodiments, as shown inFIG. 2B, the notification216can also include news or updates about the developer system, such as new extension points available for developer use. Clicking on link222for this notification would direct the developer to more information about this new extension point.

FIG. 2Cis a user interface223to show extension points for developer use. As previously described, an extension point has associated format including specified inputs and outputs. Shown are two specific examples of extension points, namely “Shipping” and “Shopping”. Each extension point has associated inputs224and outputs226, with a control228to direct the developer to more information about the inputs224and outputs226.

Interfacing with control228to show more information about the extension points will redirect the developer toFIG. 2D, a user interface229showing more details of the inputs and output of a specified extension point. For each input230, the user interface229shows the syntax or name232of the variable for developer use. For each output234, user interface229shows the format (i.e. data type, class, struct, etc.)236for the output. For example, to access the zip code of an address, the developer would use the syntax ‘zipUSA’. To return a value for output Duty, the developer must provide a value in the form of data type ‘moneyAmount’. Clicking on syntax232can direct the developer to more information about the format of each individual input. Similarly, clicking on the format236for each output can direct the developer about more information about the data types.

In some embodiments, the user interface showing information about extension points is presented in the form of an API reference, e.g.:https://shopify.dev/docs/storefront/api/reference/mutation/checkoutgiftcardsappend
together with a specific definition of the names and data types of each input (argument/variable), and a specific definition of the data type of each output (return type). Optionally, a description of each field would also be shown or otherwise made available through the interface.

FIG. 2Eis an example user interface238of a development platform for writing scripts to be used in a SAAS platform, according to one embodiment. According to this embodiment, the developer is presented with a coding window244, console output260, file explorer258, and memory watch262. The coding window244includes line numbers242and controls240. Controls240include new code control246, open code control248, play code control250, pause code control252, stop code control254, and debug code control256. File explorer258includes folders257and individual files259inside each folder257.

In operation, developers may use coding window to write code for their scripts. The scripts may have access to the input variables and generate outputs for any specific extension. According to some embodiments, coding can be done by writing syntax. According to other embodiments, coding may be done by using a visual representation and functional blocks. In some embodiments, for a specific extension point, a template script is prepared which has the necessary format, in terms of the expected inputs and outputs for that extension point.

Memory watch262is a tool to allow developers to keep track of variables, their addresses in memory, and the values. A developer can identify a variable and the memory watch262will keep track of the variable on the display.

New code control246will instruct the development environment to create a new code file from scratch. Open code control248will prompt the user to upload a new code written outside of the coding environment. Play code control250will cause the system to run the code in the coding window244. Using pause control252and stop control254after play control250will cause the development environment to pause or stop the code respectively. The debug code control256will launch the debug tool. The debug tool allows the developer to run the script under supervised and managed conditions in order to track the code operations and monitor changes in computer resources that may indicate malfunctioning code. A debug tool can include the ability to step through code one or more line at a time to identify problems. The debug tool, in conjunction with memory watch262allow the developer to best understand how their script operates.

According to some embodiments, as shown inFIG. 2F, the development environment can generate notifications263about the code in coding window244. Hovering over the notification263brings up tooltip window264, which can generate a suggestion about the script, and controls266and268to implement a proposed solution.

For example, inFIG. 2F, the developer environment has determined that line4is unnecessary in the operation of the script. Therefore, the system recommended removing the line of code in order to increase processing speed. Other examples of problems identifiable in the code could be excessively heavy computations, variable types that are larger than necessary, or large looping structures. The system offers control266to remove the unnecessary code, and control268to keep the code in.

Using open code control248can open an upload new file window270. Upload new file window270includes a file path input272, title input274, and location input276. Upload button278will upload the file located at file path input272to the location276and save the file with title as specified. File path input272may be a location on a local developer computer, on a local developer server, on a remote computer, or a remote server. Uploading using upload control278will copy the file from the file path location and save it on a memory on a server accessible to the developer environment for access and modification.

Turning toFIG. 2H, according to some embodiments, the system can save files to specific locations. By selecting location276, a location window280can provide the user with a specific folder282to save a file to.

FIG. 2Ishows an example user interface284for a file explorer. The file explorer shows the titles of all folders and files282. A developer can select a specific file or folder292and use commands to interface with the file. Using add file control286, the developer can create a new file or upload a new file using a window similar to that shown with reference toFIG. 2G. Edit control288will open the file selected in the development environment shown inFIG. 2E. Finally, delete control290will delete the file from a memory on the server.

FIG. 2Jshows an example user interface294for verifying a script. A script may be verified to ensure the code meets the standard for widespread use within the SAAS platform. Verification can be done automatically (by an inspection script) or manually (by another developer), or in combination. The interface294includes an input for the script296and extension298. The developer must select the script to submit for verification, and the extension point for which the script is written if the script is associated with more than one extension points. The developer may then use submit button299to send the script for verification.

FIG. 2Kshows an example interface2100for uploading a script. This can be viewed as an example of the script uploading interface318ofFIG. 1. Once a script has been verified, the script can be uploaded and stored, in association with a specific application and a specific extension point. Once that is done, the script will be available to SAAS clients that have installed the associated application. The user can use the script field2102to select a verified script, write a title in title2104, identify a script category2106and application2108. The developer can then use submit button2110to distribute the script with title2104for the application2108in category2106.

In some embodiments, a client UI is provided. In the e-commerce case, this would be a merchant UI. In some embodiments, the client UI presents or displays application recommendations. The client UI includes a search option for the client to conduct a search for registered applications. The search results indicate for each application whether it is script-enabled, in the sense that at least some of the application's functionality is implemented through scripts running on the SAAS platform. The search results may also provide and display historical performance for each application and/or other information relevant to each application. Other specific examples include historical uptime/downtime, security information (no external calls), regional privacy (no calls outside of a given region, etc.). The information displayed may be based on client preferences.

The client UI allows a user to select an application for installation, to enable an installed app, and to uninstall or disable a previously installed app. The above described application installation interface316may be part of the client UI. In some embodiments, the client UI includes an option for the client to set a criticality of the application.

For a script that can be run on the SAAS platform, or the 3rd party hosting infrastructure, a selection of where to run the script can be made taking into account the criticality setting, with scripts for more critical apps running on the SAAS platform where performance can be guaranteed. More generally, the client UI may include functionality for a client to configure conditions on when to run a given script on SAAS platform (for example during high volume times) or on the 3rd party hosting infrastructure (for example during low volume times).

In some embodiments, the client UI also displays application and/or script performance for applications installed for the client, and the scripts used by those applications.

In some embodiments, the SAAS platform, based on the health, performance and/or latency of a first application, determines if there is another application of similar functionality with one or more scripts running on the e-commerce platform which may provide an improvement in health, performance and/or latency. When this is the case, the system may recommend the other application to all clients using the first application. This recommendation may be made through the client UI.

As shown inFIG. 3A, a user interface350forming part of a client UI is provided for the client to search through a library of apps. The client may use a search text field352for keywords, and based on the input, results field354will populate. The results may be based on a query of a database of apps.

FIG. 3Bis an example interface356forming part of the client UI for the SAAS platform to present application recommendations358to a client (such as a merchant). The interface356includes a description366for the specific application and a control362to access more information about the application. The interface356includes a control360for installing the application into the client's service instance system within the SAAS platform.

If one or more scripts have been uploaded in association with the application for execution on the SAAS platform as detailed above, the interface366will provide an indication364that the application is script-enabled, and can also provide a description368of what a script-enabled application means. It may be preferred by a client to be able to install a script-enabled application to avoid the potential problems associated with applications that are not script-enabled.

FIG. 3Cis an example user interface370forming part of the client UI for configuring a script-enabled application, according to one embodiment. The interface includes an indication that the application has already been installed372and a current application health indication374in terms of current latency.

In some embodiments, if there is a script available for an installed application, the script is always used and executed on the SAAS platform. However, in other embodiments, the script may still run on the 3rdparty infrastructure in some circumstances. In the illustrated example, the interface370includes a threshold field376for setting a high volume threshold on sales per hour. Other metrics can alternatively be used. Based on this threshold, the client can determine when to offload the script from within the 3rdparty platform and onto the SAAS platform using field378to set a preference for where to execute the script when the threshold is exceeded, and using field380to set a preference for where to execute the script when the threshold is not exceeded. In another embodiment, not shown, the client UI, can set a percentage of time/executions that the script should be run on the SAAS platform resources.

In some embodiments, a client UI makes available a list of applications that have been registered, and the associated scripts. The client UI may allow a client to query of script runs for the client's service instance, for a specified time period.

FIG. 4shows an example of an overall setup process including application registration for example though an application registration interface, script creation for example through a script uploading interface, and application installation against a specific service instance for example through an application installation interface, using the components ofFIG. 1.

First at450, an application provider registers an application with the SAAS platform through the application registration interface. Upon success, the application registration interface returns an application registration success indication at452together with an application ID of the registered application.

Next, at500, a script creator creates a script in association with a specific extension point using the script uploading interface. The script is also in association with a specific application. In some embodiments, the script creator accesses the script uploading interface using credentials, and specifies an application ID for which a script is being created. The script uploading interface may present to the script creator a list of extension points, and the associated inputs and outputs.

The script uploading interface validates the script and publishes the script to the script storage. If any type-specific compilation is required (for example, generating an executable module from a TypeScript file), that may happen here as well.

At502, the script uploading interface will deploy this compiled version of the script to script storage320via script executor. At504, the script executor returns a URL for the compiled version of the script which the script uploading interface can store in a script URL database.

Next, at506, the script uploading interface sends this URL to the extension point manager in the SAAS platform, to register the URL in association with the extension point ID and the application ID. This is the URL that can be invoked directly from inside a SAAS service instance at a later point. In some embodiments, the extension point manager also returns a handle (e.g. script ID of the script), so that it can be modified or removed as necessary later. A success indicator may be sent back to the script creator at510.

It is not always necessarily the case that the execution of the script happens on a separate machine, or via a URL for the specific execution. It can be called/invoked directly within the SAAS service provider by downloading the compiled script locally and then invoking.

In some embodiments, compiled script (in script storage320) may be stored on a machine or processor that executes service instance code or generally on any machine/processor within the SAAS platform. Depending on where the script is stored, alternatives to invoking the script via URL are possible e.g. the extension point manager could also invoke the script locally within the service instance to get the compiled script to execute for example via e.g. a pointer, ID, etc. Generally, the script could also be run or executed in-process within the service instance, externally via URL, or in a separate container on the SAAS platform.

In some embodiments, the script manager may be configured to send the script to a front end device for execution by the front end device in certain circumstances, for example when the device goes offline. If this is done in advance of a front end device going offline, it is possible for the script to continue to be executed by the front end device even after going offline.

At520, a client requests a specific already registered application to be installed against their service instance. The application installation interface314receives this request, records the installation in the application installations register, and returns an application installation success indication at522.

It is noted that the steps involving the client, including520,522can be performed any time after an application has been registered. Scripts may be created and uploaded in association with an application after that application has been registered and installed for one or more service instances

FIG. 5shows an example of script execution, which can take place after the steps ofFIG. 4are complete, again using the components ofFIG. 1. To begin, at600, code to execute some function, for which there is an extension point, is called inside the service instance. The called function is wrapped via an extensions software development kit (SDK), and so the default implementation of that function is not executed yet. The service instance informs the extension manager at601. At602, the extension manager attempts to obtain a script URL from the script URL database. Note that for a script URL to be used for the service instance, the associated application must have been installed on the service instance. This determination can be made by the extension manager. If there is a script URL for the extension point, the script URL DB returns the script's invocation URL at604. In some embodiments, the extension manager may cache this result. Then, instead of calling the default implementation of the function, the URL is accessed at608to execute the customization block. Where no URL is available, a default implementation of the function may be executed. The result is synchronously returned back to the extension point manager at609and then to the service instance610. The service instance remains unaware as to what code was run.

In some embodiments, the whole process is tightly controlled with timeouts, failure handlers and circuit breakers, ensuring all the networking meets specified targets to remain useful in low latency operations.

With reference toFIG. 6, an embodiment e-commerce platform100is depicted for providing merchant products and services to customers. This is a specific example of a SAAS platform for implementing one or more of the embodiments described herein. For example, the functionality of SAAS platform ofFIG. 1may be implemented in e-commerce platform100ofFIG. 6. While the disclosure throughout contemplates using the apparatus, system, and process disclosed to purchase products and services, for simplicity the description herein will refer to products. All references to products throughout this disclosure should also be understood to be references to products and/or services, including physical products, digital content, tickets, subscriptions, services to be provided, and the like.

While the disclosure throughout contemplates that a ‘merchant’ and a ‘customer’ may be more than individuals, for simplicity the description herein may generally refer to merchants and customers as such. All references to merchants and customers throughout this disclosure should also be understood to be references to groups of individuals, companies, corporations, computing entities, and the like, and may represent for-profit or not-for-profit exchange of products. Further, while the disclosure throughout refers to ‘merchants’ and ‘customers’, and describes their roles as such, the e-commerce platform100should be understood to more generally support users in an e-commerce environment, and all references to merchants and customers throughout this disclosure should also be understood to be references to users, such as where a user is a merchant-user (e.g., a seller, retailer, wholesaler, or provider of products), a customer-user (e.g., a buyer, purchase agent, or user of products), a prospective user (e.g., a user browsing and not yet committed to a purchase, a user evaluating the e-commerce platform100for potential use in marketing and selling products, and the like), a service provider user (e.g., a shipping provider112, a financial provider, and the like), a company or corporate user (e.g., a company representative for purchase, sales, or use of products; an enterprise user; a customer relations or customer management agent, and the like), an information technology user, a computing entity user (e.g., a computing bot for purchase, sales, or use of products), and the like.

The e-commerce platform100may provide a centralized system for providing merchants with online resources and facilities for managing their business. The facilities described herein may be deployed in part or in whole through a machine that executes computer software, modules, program codes, and/or instructions on one or more processors which may be part of or external to the platform100. Merchants may utilize the e-commerce platform100for managing commerce with customers, such as by implementing an e-commerce experience with customers through an online store138, through channels110A-B, through point of sale (POS) devices152in physical locations (e.g., a physical storefront or other location such as through a kiosk, terminal, reader, printer, 3D printer, and the like), by managing their business through the e-commerce platform100, and by interacting with customers through a communications facility129of the e-commerce platform100, or any combination thereof. A merchant may utilize the e-commerce platform100as a sole commerce presence with customers, or in conjunction with other merchant commerce facilities, such as through a physical store (e.g., ‘brick-and-mortar’ retail stores), a merchant off-platform website104(e.g., a commerce Internet website or other internet or web property or asset supported by or on behalf of the merchant separately from the e-commerce platform), and the like. However, even these ‘other’ merchant commerce facilities may be incorporated into the e-commerce platform, such as where POS devices152in a physical store of a merchant are linked into the e-commerce platform100, where a merchant off-platform website104is tied into the e-commerce platform100, such as through ‘buy buttons’ that link content from the merchant off platform website104to the online store138, and the like.

The online store138may represent a multitenant facility comprising a plurality of virtual storefronts. In embodiments, merchants may manage one or more storefronts in the online store138, such as through a merchant device102(e.g., computer, laptop computer, mobile computing device, and the like), and offer products to customers through a number of different channels110A-B (e.g., an online store138; a physical storefront through a POS device152; electronic marketplace, through an electronic buy button integrated into a website or social media channel such as on a social network, social media page, social media messaging system; and the like). A merchant may sell across channels110A-B and then manage their sales through the e-commerce platform100, where channels110A may be provided internal to the e-commerce platform100or from outside the e-commerce channel110B. A merchant may sell in their physical retail store, at pop ups, through wholesale, over the phone, and the like, and then manage their sales through the e-commerce platform100. A merchant may employ all or any combination of these, such as maintaining a business through a physical storefront utilizing POS devices152, maintaining a virtual storefront through the online store138, and utilizing a communication facility129to leverage customer interactions and analytics132to improve the probability of sales. Throughout this disclosure the terms online store138and storefront may be used synonymously to refer to a merchant's online e-commerce offering presence through the e-commerce platform100, where an online store138may refer to the multitenant collection of storefronts supported by the e-commerce platform100(e.g., for a plurality of merchants) or to an individual merchant's storefront (e.g., a merchant's online store).

In embodiments, a customer may interact through a customer device150(e.g., computer, laptop computer, mobile computing device, and the like), a POS device152(e.g., retail device, a kiosk, an automated checkout system, and the like), or any other commerce interface device known in the art. The e-commerce platform100may enable merchants to reach customers through the online store138, through POS devices152in physical locations (e.g., a merchant's storefront or elsewhere), to promote commerce with customers through dialog via electronic communication facility129, and the like, providing a system for reaching customers and facilitating merchant services for the real or virtual pathways available for reaching and interacting with customers.

In embodiments, and as described further herein, the e-commerce platform100may be implemented through a processing facility including a processor and a memory, the processing facility storing a set of instructions that, when executed, cause the e-commerce platform100to perform the e-commerce and support functions as described herein. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, stationary computing platform, or other computing platform, and provide electronic connectivity and communications between and amongst the electronic components of the e-commerce platform100, merchant devices102, payment gateways106, application developers, channels110A-B, shipping providers112, customer devices150, point of sale devices152, and the like. The e-commerce platform100may be implemented as a cloud computing service, a software as a service (SaaS), infrastructure as a service (IaaS), platform as a service (PaaS), desktop as a Service (DaaS), managed software as a service (MSaaS), mobile backend as a service (MBaaS), information technology management as a service (ITMaaS), and the like, such as in a software and delivery model in which software is licensed on a subscription basis and centrally hosted (e.g., accessed by users using a client (for example, a thin client) via a web browser or other application, accessed through by POS devices, and the like). In embodiments, elements of the e-commerce platform100may be implemented to operate on various platforms and operating systems, such as iOS, Android, on the web, and the like (e.g., the administrator114being implemented in multiple instances for a given online store for iOS, Android, and for the web, each with similar functionality).

In embodiments, the online store138may be served to a customer device150through a webpage provided by a server of the e-commerce platform100. The server may receive a request for the webpage from a browser or other application installed on the customer device150, where the browser (or other application) connects to the server through an IP Address, the IP address obtained by translating a domain name. In return, the server sends back the requested webpage. Webpages may be written in or include Hypertext Markup Language (HTML), template language, JavaScript, and the like, or any combination thereof. For instance, HTML is a computer language that describes static information for the webpage, such as the layout, format, and content of the webpage. Website designers and developers may use the template language to build webpages that combine static content, which is the same on multiple pages, and dynamic content, which changes from one page to the next. A template language may make it possible to re-use the static elements that define the layout of a webpage, while dynamically populating the page with data from an online store. The static elements may be written in HTML, and the dynamic elements written in the template language. The template language elements in a file may act as placeholders, such that the code in the file is compiled and sent to the customer device150and then the template language is replaced by data from the online store138, such as when a theme is installed. The template and themes may consider tags, objects, and filters. The client device web browser (or other application) then renders the page accordingly.

In embodiments, online stores138may be served by the e-commerce platform100to customers, where customers can browse and purchase the various products available (e.g., add them to a cart, purchase immediately through a buy-button, and the like). Online stores138may be served to customers in a transparent fashion without customers necessarily being aware that it is being provided through the e-commerce platform100(rather than directly from the merchant). Merchants may use a merchant configurable domain name, a customizable HTML theme, and the like, to customize their online store138. Merchants may customize the look and feel of their website through a theme system, such as where merchants can select and change the look and feel of their online store138by changing their theme while having the same underlying product and business data shown within the online store's product hierarchy. Themes may be further customized through a theme editor, a design interface that enables users to customize their website's design with flexibility. Themes may also be customized using theme-specific settings that change aspects, such as specific colors, fonts, and pre-built layout schemes. The online store may implement a content management system for website content. Merchants may author pages and publish them to their online store138, such as through blogs, articles, and the like, as well as configure navigation menus. Merchants may upload images (e.g., for products), video, content, data, and the like to the e-commerce platform100, such as for storage by the system (e.g. as data134). In embodiments, the e-commerce platform100may provide functions for resizing images, associating an image with a product, adding and associating text with an image, adding an image for a new product variant, protecting images, and the like.

As described herein, the e-commerce platform100may provide merchants with transactional facilities for products through a number of different channels110A-B, including the online store138, over the telephone, as well as through physical POS devices152as described herein. The e-commerce platform100may include business support services116, an administrator114, and the like associated with running an on-line business, such as providing a domain service118associated with their online store, payment services120for facilitating transactions with a customer, shipping services122for providing customer shipping options for purchased products, risk and insurance services124associated with product protection and liability, merchant billing, and the like. Services116may be provided via the e-commerce platform100or in association with external facilities, such as through a payment gateway106for payment processing, shipping providers112for expediting the shipment of products, and the like.

In embodiments, the e-commerce platform100may provide for integrated shipping services122(e.g., through an e-commerce platform shipping facility or through a third-party shipping carrier), such as providing merchants with real-time updates, tracking, automatic rate calculation, bulk order preparation, label printing, and the like.

FIG. 7depicts a non-limiting embodiment for a home page of an administrator114, which may show information about daily tasks, a store's recent activity, and the next steps a merchant can take to build their business. In embodiments, a merchant may log in to administrator114via a merchant device102such as from a desktop computer or mobile device, and manage aspects of their online store138, such as viewing the online store's138recent activity, updating the online store's138catalog, managing orders, recent visits activity, total orders activity, and the like. In embodiments, the merchant may be able to access the different sections of administrator114by using the sidebar, such as shown onFIG. 7. Sections of the administrator114may include various interfaces for accessing and managing core aspects of a merchant's business, including orders, products, customers, available reports and discounts. The administrator114may also include interfaces for managing sales channels for a store including the online store, mobile application(s) made available to customers for accessing the store (Mobile App), POS devices, and/or a buy button. The administrator114may also include interfaces for managing applications (Apps) installed on the merchant's account; settings applied to a merchant's online store138and account. A merchant may use a search bar to find products, pages, or other information. Depending on the device102or software application the merchant is using, they may be enabled for different functionality through the administrator114. For instance, if a merchant logs in to the administrator114from a browser, they may be able to manage all aspects of their online store138. If the merchant logs in from their mobile device (e.g. via a mobile application), they may be able to view all or a subset of the aspects of their online store138, such as viewing the online store's138recent activity, updating the online store's138catalog, managing orders, and the like.

More detailed information about commerce and visitors to a merchant's online store138may be viewed through acquisition reports or metrics, such as displaying a sales summary for the merchant's overall business, specific sales and engagement data for active sales channels, and the like. Reports may include, acquisition reports, behavior reports, customer reports, finance reports, marketing reports, sales reports, custom reports, and the like. The merchant may be able to view sales data for different channels110A-B from different periods of time (e.g., days, weeks, months, and the like), such as by using drop-down menus. An overview dashboard may be provided for a merchant that wants a more detailed view of the store's sales and engagement data. An activity feed in the home metrics section may be provided to illustrate an overview of the activity on the merchant's account. For example, by clicking on a ‘view all recent activity’ dashboard button, the merchant may be able to see a longer feed of recent activity on their account. A home page may show notifications about the merchant's online store138, such as based on account status, growth, recent customer activity, and the like. Notifications may be provided to assist a merchant with navigating through a process, such as capturing a payment, marking an order as fulfilled, archiving an order that is complete, and the like.

The e-commerce platform100may provide for a communications facility129and associated merchant interface for providing electronic communications and marketing, such as utilizing an electronic messaging aggregation facility for collecting and analyzing communication interactions between merchants, customers, merchant devices102, customer devices150, POS devices152, and the like, to aggregate and analyze the communications, such as for increasing the potential for providing a sale of a product, and the like. For instance, a customer may have a question related to a product, which may produce a dialog between the customer and the merchant (or automated processor-based agent representing the merchant), where the communications facility129analyzes the interaction and provides analysis to the merchant on how to improve the probability for a sale.

The e-commerce platform100may provide a financial facility120for secure financial transactions with customers, such as through a secure card server environment. The e-commerce platform100may store credit card information, such as in payment card industry data (PCI) environments (e.g., a card server), to reconcile financials, bill merchants, perform automated clearing house (ACH) transfers between an e-commerce platform100financial institution account and a merchant's back account (e.g., when using capital), and the like. These systems may have Sarbanes-Oxley Act (SOX) compliance and a high level of diligence required in their development and operation. The financial facility120may also provide merchants with financial support, such as through the lending of capital (e.g., lending funds, cash advances, and the like) and provision of insurance. In addition, the e-commerce platform100may provide for a set of marketing and partner services and control the relationship between the e-commerce platform100and partners. They also may connect and onboard new merchants with the e-commerce platform100. These services may enable merchant growth by making it easier for merchants to work across the e-commerce platform100. Through these services, merchants may be provided help facilities via the e-commerce platform100.

In embodiments, online store138may support a great number of independently administered storefronts and process a large volume of transactional data on a daily basis for a variety of products. Transactional data may include customer contact information, billing information, shipping information, information on products purchased, information on services rendered, and any other information associated with business through the e-commerce platform100. In embodiments, the e-commerce platform100may store this data in a data facility134. The transactional data may be processed to produce analytics132, which in turn may be provided to merchants or third-party commerce entities, such as providing consumer trends, marketing and sales insights, recommendations for improving sales, evaluation of customer behaviors, marketing and sales modeling, trends in fraud, and the like, related to online commerce, and provided through dashboard interfaces, through reports, and the like. The e-commerce platform100may store information about business and merchant transactions, and the data facility134may have many ways of enhancing, contributing, refining, and extracting data, where over time the collected data may enable improvements to aspects of the e-commerce platform100.

Referring again toFIG. 6, in embodiments the e-commerce platform100may be configured with a commerce management engine136for content management, task automation and data management to enable support and services to the plurality of online stores138(e.g., related to products, inventory, customers, orders, collaboration, suppliers, reports, financials, risk and fraud, and the like), but be extensible through applications142A-B that enable greater flexibility and custom processes required for accommodating an ever-growing variety of merchant online stores, POS devices, products, and services, where applications142A may be provided internal to the e-commerce platform100or applications142B from outside the e-commerce platform100. In embodiments, an application142A may be provided by the same party providing the platform100or by a different party. In embodiments, an application142B may be provided by the same party providing the platform100or by a different party. The commerce management engine136may be configured for flexibility and scalability through portioning (e.g., sharding) of functions and data, such as by customer identifier, order identifier, online store identifier, and the like. The commerce management engine136may accommodate store-specific business logic and in some embodiments, may incorporate the administrator114and/or the online store138.

The commerce management engine136includes base or “core” functions of the e-commerce platform100, and as such, as described herein, not all functions supporting online stores138may be appropriate for inclusion. For instance, functions for inclusion into the commerce management engine136may need to exceed a core functionality threshold through which it may be determined that the function is core to a commerce experience (e.g., common to a majority of online store activity, such as across channels, administrator interfaces, merchant locations, industries, product types, and the like), is re-usable across online stores138(e.g., functions that can be re-used/modified across core functions), limited to the context of a single online store138at a time (e.g., implementing an online store ‘isolation principle’, where code should not be able to interact with multiple online stores138at a time, ensuring that online stores138cannot access each other's data), provide a transactional workload, and the like. Maintaining control of what functions are implemented may enable the commerce management engine136to remain responsive, as many required features are either served directly by the commerce management engine136or enabled through an interface140A-B, such as by its extension through an application programming interface (API) connection to applications142A-B and channels110A-B, where interfaces140A may be provided to applications142A and/or channels110A inside the e-commerce platform100or through interfaces140B provided to applications142B and/or channels110B outside the e-commerce platform100. Generally, the platform100may include interfaces140A-B (which may be extensions, connectors, APIs, and the like) which facilitate connections to and communications with other platforms, systems, software, data sources, code and the like. Such interfaces140A-B may be an interface140A of the commerce management engine136or an interface140B of the platform100more generally. If care is not given to restricting functionality in the commerce management engine136, responsiveness could be compromised, such as through infrastructure degradation through slow databases or non-critical backend failures, through catastrophic infrastructure failure such as with a data center going offline, through new code being deployed that takes longer to execute than expected, and the like. To prevent or mitigate these situations, the commerce management engine136may be configured to maintain responsiveness, such as through configuration that utilizes timeouts, queues, back-pressure to prevent degradation, and the like.

Although isolating online store data is important to maintaining data privacy between online stores138and merchants, there may be reasons for collecting and using cross-store data, such as for example, with an order risk assessment system or a platform payment facility, both of which require information from multiple online stores138to perform well. In embodiments, rather than violating the isolation principle, it may be preferred to move these components out of the commerce management engine136and into their own infrastructure within the e-commerce platform100.

In embodiments, the e-commerce platform100may provide for a platform payment facility120, which is another example of a component that utilizes data from the commerce management engine136but may be located outside so as to not violate the isolation principle. The platform payment facility120may allow customers interacting with online stores138to have their payment information stored safely by the commerce management engine136such that they only have to enter it once. When a customer visits a different online store138, even if they've never been there before, the platform payment facility120may recall their information to enable a more rapid and correct check out. This may provide a cross-platform network effect, where the e-commerce platform100becomes more useful to its merchants as more merchants join, such as because there are more customers who checkout more often because of the ease of use with respect to customer purchases. To maximize the effect of this network, payment information for a given customer may be retrievable from an online store's checkout, allowing information to be made available globally across online stores138. It would be difficult and error prone for each online store138to be able to connect to any other online store138to retrieve the payment information stored there. As a result, the platform payment facility may be implemented external to the commerce management engine136.

For those functions that are not included within the commerce management engine136, applications142A-B provide a way to add features to the e-commerce platform100. Applications142A-B may be able to access and modify data on a merchant's online store138, perform tasks through the administrator114, create new flows for a merchant through a user interface (e.g., that is surfaced through extensions/API), and the like. Merchants may be enabled to discover and install applications142A-B through application search, recommendations, and support128. In embodiments, core products, core extension points, applications, and the administrator114may be developed to work together. For instance, application extension points may be built inside the administrator114so that core features may be extended by way of applications, which may deliver functionality to a merchant through the extension.

In embodiments, applications142A-B may deliver functionality to a merchant through the interface140A-B, such as where an application142A-B is able to surface transaction data to a merchant (e.g., App: “Engine, surface my app data in mobile and web admin using the embedded app SDK”), and/or where the commerce management engine136is able to ask the application to perform work on demand (Engine: “App, give me a local tax calculation for this checkout”).

Applications142A-B may support online stores138and channels110A-B, provide for merchant support, integrate with other services, and the like. Where the commerce management engine136may provide the foundation of services to the online store138, the applications142A-B may provide a way for merchants to satisfy specific and sometimes unique needs. Different merchants will have different needs, and so may benefit from different applications142A-B. Applications142A-B may be better discovered through the e-commerce platform100through development of an application taxonomy (categories) that enable applications to be tagged according to a type of function it performs for a merchant; through application data services that support searching, ranking, and recommendation models; through application discovery interfaces such as an application store, home information cards, an application settings page; and the like.

Applications142A-B may be connected to the commerce management engine136through an interface140A-B, such as utilizing APIs to expose the functionality and data available through and within the commerce management engine136to the functionality of applications (e.g., through REST, GraphQL, and the like). For instance, the e-commerce platform100may provide API interfaces140A-B to merchant and partner-facing products and services, such as including application extensions, process flow services, developer-facing resources, and the like. With customers more frequently using mobile devices for shopping, applications142A-B related to mobile use may benefit from more extensive use of APIs to support the related growing commerce traffic. The flexibility offered through use of applications and APIs (e.g., as offered for application development) enable the e-commerce platform100to better accommodate new and unique needs of merchants (and internal developers through internal APIs) without requiring constant change to the commerce management engine136, thus providing merchants what they need when they need it. For instance, shipping services122may be integrated with the commerce management engine136through a shipping or carrier service API, thus enabling the e-commerce platform100to provide shipping service functionality without directly impacting code running in the commerce management engine136.

Many merchant problems may be solved by letting partners improve and extend merchant workflows through application development, such as problems associated with back-office operations (merchant-facing applications142A-B) and in the online store138(customer-facing applications142A-B). As a part of doing business, many merchants will use mobile and web related applications on a daily basis for back-office tasks (e.g., merchandising, inventory, discounts, fulfillment, and the like) and online store tasks (e.g., applications related to their online shop, for flash-sales, new product offerings, and the like), where applications142A-B, through extension/API140A-B, help make products easy to view and purchase in a fast growing marketplace. In embodiments, partners, application developers, internal applications facilities, and the like, may be provided with a software development kit (SDK), such as through creating a frame within the administrator114that sandboxes an application interface. In embodiments, the administrator114may not have control over nor be aware of what happens within the frame. The SDK may be used in conjunction with a user interface kit to produce interfaces that mimic the look and feel of the e-commerce platform100, such as acting as an extension of the commerce management engine136.

Applications142A-B that utilize APIs may pull data on demand, but often they also need to have data pushed when updates occur. Update events may be implemented in a subscription model, such as for example, customer creation, product changes, or order cancelation. Update events may provide merchants with needed updates with respect to a changed state of the commerce management engine136, such as for synchronizing a local database, notifying an external integration partner, and the like. Update events may enable this functionality without having to poll the commerce management engine136all the time to check for updates, such as through an update event subscription. In embodiments, when a change related to an update event subscription occurs, the commerce management engine136may make a request, such as to a predefined callback URL. The body of this request may contain a new state of the object and a description of the action or event. Update event subscriptions may be created manually, in the administrator facility114, or automatically (e.g., via the API140A-B). In embodiments, update events may be queued and processed asynchronously from a state change that triggered them, which may produce an update event notification that is not distributed in real-time.

In embodiments, the e-commerce platform100may provide application search, recommendation and support128. Application search, recommendation and support128may include developer products and tools to aid in the development of applications, an application dashboard (e.g., to provide developers with a development interface, to administrators for management of applications, to merchants for customization of applications, and the like), facilities for installing and providing permissions with respect to providing access to an application142A-B (e.g., for public access, such as where criteria must be met before being installed, or for private use by a merchant), application searching to make it easy for a merchant to search for applications142A-B that satisfy a need for their online store138, application recommendations to provide merchants with suggestions on how they can improve the user experience through their online store138, a description of core application capabilities within the commerce management engine136, and the like. These support facilities may be utilized by application development performed by any entity, including the merchant developing their own application142A-B, a third-party developer developing an application142A-B (e.g., contracted by a merchant, developed on their own to offer to the public, contracted for use in association with the e-commerce platform100, and the like), or an application142A or142B being developed by internal personal resources associated with the e-commerce platform100. In embodiments, applications142A-B may be assigned an application identifier (ID), such as for linking to an application (e.g., through an API), searching for an application, making application recommendations, and the like.

The commerce management engine136may include base functions of the e-commerce platform100and expose these functions through APIs140A-B to applications142A-B. The APIs140A-B may enable different types of applications built through application development. Applications142A-B may be capable of satisfying a great variety of needs for merchants but may be grouped roughly into three categories: customer-facing applications, merchant-facing applications, integration applications, and the like. Customer-facing applications142A-B may include online store138or channels110A-B that are places where merchants can list products and have them purchased (e.g., the online store, applications for flash sales (e.g., merchant products or from opportunistic sales opportunities from third-party sources), a mobile store application, a social media channel, an application for providing wholesale purchasing, and the like). Merchant-facing applications142A-B may include applications that allow the merchant to administer their online store138(e.g., through applications related to the web or website or to mobile devices), run their business (e.g., through applications related to POS devices), to grow their business (e.g., through applications related to shipping (e.g., drop shipping), use of automated agents, use of process flow development and improvements), and the like. Integration applications may include applications that provide useful integrations that participate in the running of a business, such as shipping providers112and payment gateways.

In embodiments, an application developer may use an application proxy to fetch data from an outside location and display it on the page of an online store138. Content on these proxy pages may be dynamic, capable of being updated, and the like. Application proxies may be useful for displaying image galleries, statistics, custom forms, and other kinds of dynamic content. The core-application structure of the e-commerce platform100may allow for an increasing number of merchant experiences to be built in applications142A-B so that the commerce management engine136can remain focused on the more commonly utilized business logic of commerce.

In an example embodiment, a customer may browse a merchant's products on a channel110A-B. A channel110A-B is a place where customers can view and buy products. In embodiments, channels110A-B may be modeled as applications142A-B (a possible exception being the online store138, which is integrated within the commence management engine136). A merchandising component may allow merchants to describe what they want to sell and where they sell it. The association between a product and a channel may be modeled as a product publication and accessed by channel applications, such as via a product listing API. A product may have many options, like size and color, and many variants that expand the available options into specific combinations of all the options, like the variant that is extra-small and green, or the variant that is size large and blue. Products may have at least one variant (e.g., a “default variant” is created for a product without any options). To facilitate browsing and management, products may be grouped into collections, provided product identifiers (e.g., stock keeping unit (SKU)) and the like. Collections of products may be built by either manually categorizing products into one (e.g., a custom collection), by building rulesets for automatic classification (e.g., a smart collection), and the like. Products may be viewed as 2D images, 3D images, rotating view images, through a virtual or augmented reality interface, and the like.

In embodiments, the customer may add what they intend to buy to their cart (in an alternate embodiment, a product may be purchased directly, such as through a buy button as described herein). Customers may add product variants to their shopping cart. The shopping cart model may be channel specific. The online store138cart may be composed of multiple cart line items, where each cart line item tracks the quantity for a product variant. Merchants may use cart scripts to offer special promotions to customers based on the content of their cart. Since adding a product to a cart does not imply any commitment from the customer or the merchant, and the expected lifespan of a cart may be in the order of minutes (not days), carts may be persisted to an ephemeral data store.

The customer then proceeds to checkout. A checkout component may implement a web checkout as a customer-facing order creation process. A checkout API may be provided as a computer-facing order creation process used by some channel applications to create orders on behalf of customers (e.g., for point of sale). Checkouts may be created from a cart and record a customer's information such as email address, billing, and shipping details. On checkout, the merchant commits to pricing. If the customer inputs their contact information but does not proceed to payment, the e-commerce platform100may provide an opportunity to re-engage the customer (e.g., in an abandoned checkout feature). For those reasons, checkouts can have much longer lifespans than carts (hours or even days) and are therefore persisted. Checkouts may calculate taxes and shipping costs based on the customer's shipping address. Checkout may delegate the calculation of taxes to a tax component and the calculation of shipping costs to a delivery component. A pricing component may enable merchants to create discount codes (e.g., ‘secret’ strings that when entered on the checkout apply new prices to the items in the checkout). Discounts may be used by merchants to attract customers and assess the performance of marketing campaigns. Discounts and other custom price systems may be implemented on top of the same platform piece, such as through price rules (e.g., a set of prerequisites that when met imply a set of entitlements). For instance, prerequisites may be items such as “the order subtotal is greater than $100” or “the shipping cost is under $10”, and entitlements may be items such as “a 20% discount on the whole order” or “$10 off products X, Y, and Z”.

Customers then pay for the content of their cart resulting in the creation of an order for the merchant. Channels110A-B may use the commerce management engine136to move money, currency or a store of value (such as dollars or a cryptocurrency) to and from customers and merchants. Communication with the various payment providers (e.g., online payment systems, mobile payment systems, digital wallet, credit card gateways, and the like) may be implemented within a payment processing component. The actual interactions with the payment gateways106may be provided through a card server environment. In embodiments, the payment gateway106may accept international payment, such as integrating with leading international credit card processors. The card server environment may include a card server application, card sink, hosted fields, and the like. This environment may act as the secure gatekeeper of the sensitive credit card information. In embodiments, most of the process may be orchestrated by a payment processing job. The commerce management engine136may support many other payment methods, such as through an offsite payment gateway106(e.g., where the customer is redirected to another website), manually (e.g., cash), online payment methods (e.g., online payment systems, mobile payment systems, digital wallet, credit card gateways, and the like), gift cards, and the like. At the end of the checkout process, an order is created. An order is a contract of sale between the merchant and the customer where the merchant agrees to provide the goods and services listed on the orders (e.g., order line items, shipping line items, and the like) and the customer agrees to provide payment (including taxes). This process may be modeled in a sales component. Channels110A-B that do not rely on commerce management engine136checkouts may use an order API to create orders. Once an order is created, an order confirmation notification may be sent to the customer and an order placed notification sent to the merchant via a notification component. Inventory may be reserved when a payment processing job starts to avoid over-selling (e.g., merchants may control this behavior from the inventory policy of each variant). Inventory reservation may have a short time span (minutes) and may need to be very fast and scalable to support flash sales (e.g., a discount or promotion offered for a short time, such as targeting impulse buying). The reservation is released if the payment fails. When the payment succeeds, and an order is created, the reservation is converted into a long-term inventory commitment allocated to a specific location. An inventory component may record where variants are stocked, and tracks quantities for variants that have inventory tracking enabled. It may decouple product variants (a customer facing concept representing the template of a product listing) from inventory items (a merchant facing concept that represent an item whose quantity and location is managed). An inventory level component may keep track of quantities that are available for sale, committed to an order or incoming from an inventory transfer component (e.g., from a vendor).

The merchant may then review and fulfill (or cancel) the order. A review component may implement a business process merchant's use to ensure orders are suitable for fulfillment before actually fulfilling them. Orders may be fraudulent, require verification (e.g., ID checking), have a payment method which requires the merchant to wait to make sure they will receive their funds, and the like. Risks and recommendations may be persisted in an order risk model. Order risks may be generated from a fraud detection tool, submitted by a third-party through an order risk API, and the like. Before proceeding to fulfillment, the merchant may need to capture the payment information (e.g., credit card information) or wait to receive it (e.g., via a bank transfer, check, and the like) and mark the order as paid. The merchant may now prepare the products for delivery. In embodiments, this business process may be implemented by a fulfillment component. The fulfillment component may group the line items of the order into a logical fulfillment unit of work based on an inventory location and fulfillment service. The merchant may review, adjust the unit of work, and trigger the relevant fulfillment services, such as through a manual fulfillment service (e.g., at merchant managed locations) used when the merchant picks and packs the products in a box, purchase a shipping label and input its tracking number, or just mark the item as fulfilled. A custom fulfillment service may send an email (e.g., a location that doesn't provide an API connection). An API fulfillment service may trigger a third party, where the third-party application creates a fulfillment record. A legacy fulfillment service may trigger a custom API call from the commerce management engine136to a third party (e.g., fulfillment by Amazon). A gift card fulfillment service may provision (e.g., generating a number) and activate a gift card. Merchants may use an order printer application to print packing slips. The fulfillment process may be executed when the items are packed in the box and ready for shipping, shipped, tracked, delivered, verified as received by the customer, and the like.

If the customer is not satisfied, they may be able to return the product(s) to the merchant. The business process merchants may go through to “un-sell” an item may be implemented by a return component. Returns may consist of a variety of different actions, such as a restock, where the product that was sold actually comes back into the business and is sellable again; a refund, where the money that was collected from the customer is partially or fully returned; an accounting adjustment noting how much money was refunded (e.g., including if there was any restocking fees, or goods that weren't returned and remain in the customer's hands); and the like. A return may represent a change to the contract of sale (e.g., the order), and where the e-commerce platform100may make the merchant aware of compliance issues with respect to legal obligations (e.g., with respect to taxes). In embodiments, the e-commerce platform100may enable merchants to keep track of changes to the contract of sales over time, such as implemented through a sales model component (e.g., an append-only date-based ledger that records sale-related events that happened to an item).

The e-commerce platform100may be providing sales channels for multiple merchants, for their respective customers, and for varying types of merchandise. Payment gateways106are provided by the e-commerce platform or by external parties to process transactions in an e-commerce environment.