The Funnel-Feature allows you to create additional user journeys after the form has been submitted.
In this example, we've implemented a full checkout which allows users to buy goods which they have selected in the initial form builder form.
💰 Attention! The cart feature itself is not available under the open source licence!
Below you'll find a brief walk through to get the idea behind this powerful feature:
- The first Funnel Layer renders a Summary Page ("Checkout Summary Layer") by using a custom snippet. There are two actions:
- "Buy now" which will lead to the next channel
- "Back to form", which returns to the (restored) form
- The Cart Processor Channel processes the Payment itself (Off-Page Payment for example). Every default channel comes with two "virtual funnel actions":
- "On Success": Which will lead to the next channel
- "On Error:" "Back to form", which returns to the (restored) form
- The Email Channel (Which should be familiar to you) triggers an email submission. Since it's also a default chanel, the two virtual funnel actions most be defined:
- "On Success": Which will lead to the next channel
- "On Error:" "Back to form", which returns to the (restored) form
- The last Funnel Layer renders a "Thank You" Page ("Dynamic Layout Layer") by using a custom snippet. There is just one action:
- "Done": A disabled action, so no button will be rendered
- An existing workflow cannot be transformed into a funnel, just on creation time
- A Funnel is not able to process the default success management, use a final funnel layer to restore this feature
- The initial form will be stored within a storage provider. By default, a session storage will be shipped, but you're able to create your own storage provider
- Every funnel layer creates a physical URL (Initially a UUID/v4 will be generated, but you're able to rename them)
- Every funnel layer receives the
SubmissionEvent
object, so you're able to process users data which has been collected via form builders root form - Every funnel layer will be submitted as a form. If a funnel layer provides some additional form data, it will be stored within the storage provider via
FunnelRuntimeData
- After the last channel has been called OR an exception raised, a
funnel_finished
flag will be added to the url. This indicates, that the workflow is done and the current storage will be flushed - If you're using some custom form fields, make sure you've also defined an Input Transformer!
Funnels are disabled by default, so let's enable it:
form_builder:
funnel:
enabled: true
Import preconfigured funnel routes from the FormBuilder package or copy them into your project. Don't freak out, we're talking about one tiny route only:
# config/routes.yaml
form_builder_routing_funnels:
resource: '@FormBuilderBundle/config/pimcore/routing_funnels.yaml'
# or import routes without the {locale} flag in routes
# form_builder_routing_funnels:
# resource: '@FormBuilderBundle/config/pimcore/routing_funnels_not_localized.yaml'