This extension is currently in a closed beta phase. Please contact us to get access.
How does Fynn Functions work?
Fynn Functions allows you to write custom functions that respond to events in Fynn. For this, we provide various extension points that you can use to write custom logic. If one or more functions are registered for an extension point, they are executed when the corresponding event occurs. A context object is passed that contains information about the event, which could be a cart, for example. Within the function, you can then perform any actions, such as calling an external API. Each function must return one or more predefined operations at the end, which are then executed by Fynn.Runtimes
Each function is executed in an isolated environment limited to 5 seconds. Please note that the runtime of a function directly affects Fynn’s response time.Functionality in Fynn Functions
Within Fynn Functions, you can use all JavaScript functions that are also available in the browser.Extension Points
Fynn Functions currently supports the following extension points:- Checkout:
checkout.cart.delivery,checkout.cart.cart_item_option
Add Shipping Costs
Thecheckout.cart.delivery extension point can be used to add shipping costs to the cart.
If the price of the shipping costs is one-time, it is only calculated in the 1st invoice and is not recurring.
Otherwise, the price of the shipping costs is calculated in every invoice.
Context Object
DeliveryContext
Operations
AddDelivery
Example
Add Product Options
Thecheckout.cart.cart_item_option extension point can be used to display selection options in the cart on the product.

Context Object
CartItemProductInput
CartItemInput
Operations
AddCartItemOptionSet
AddCustomFieldListAsOptionSet