Solve Business Challenges
Add validation rules, dynamic pricing, inventory checks, and custom integrations. Transform checkout data with your exact business requirements.
Zero Infrastructure
Deploy instantly without managing servers. Functions scale automatically from one order to millions. Pay only when they run.

All Functions run server-side guaranteeing security and maximum performance.
Function Triggers
Functions are similar to AWS Lambda’s, it’s where we store and run your custom code. The most important aspect of a Function is to determine when it should be executed, meaning what will trigger the Function. Given the headless nature of Ollie Shop, there are many HTTP requests flowing between the client and the server. You can define any of these HTTP request as a trigger.Example - execute function when the user adds their email to the cart
Let’s say you want to run a customization that runs a background check everytime the user add’s an email to the cart. The traditional way of thikning how to approach this problem is to build a new textbox component and in this component use AXIOS or a similar lib to fetch an external API, directly ffrom the component. Clear downsides is that you’ll depend on the browser, and also the front-end developer will have to know how this external API works. With Ollie this is not required. You know that there is already a textbox where the user will enter their email, the Contact Step in your checkout process. You also know that this action will use the Ecommerce Provider API to add the email to the cart data.Example: the VTEX API that adds the client profile data - accountName.myvtex.com/api/checkout/pub/orderForm/:orderFormId/attachments/clientProfileData

Ollie Shop Functions can be seem as interceptors of HTTP requests.
response /api/checkout/pub/orderForm/:orderFormId/attachments/clientProfileData
clientProfileData.email
- and use this data in the custom code you deployed to the function.
By using the “Add Profile to Cart” as a trigger we are taking advantage of the fact that in a normal chekout flow you want the user to add their email to the cart. We are “piggybacking” on an action that was already meant to happen
clientProfileData.backgroundCheck
response of the original HTTP enriched with the Function
Function Types
Invocation TypeRequest
Runs before the HTTP setup as the triggerResponse
Runs after the HTTP setup as the trigger
Request Functions
intercept an HTTP request and modify the payloadUse them for validation, data modification, and pre-processing logic.
Response Functions
intercept an HTTP request and modify the responseUse them for post-processing, integrations, and response enhancement.
Error Handling Strategies
Understanding error handling is crucial for building reliable checkout flows:- Throw - an error message will appear for the user
- Skip - the user will continue it’s journey and the error will be suppressed.

Best Practice: Use
throw
for anything that affects order validation or payment. Use skip
for analytics, logging, and optional features.Priority
If you need to trigger multiple functions using the same trigger, you can use thepriority
feature. This creates an order in which Ollie Shop will trigger your functions. When a functions is triggered it will use the data made available from the previous function.
Priority starts with 0
(zero) and currently there are no limits on the number of functions you can trigger.