Background

We are trying to implement a "Custom Form"(not Sitecore wffm) on Sitecore platform. The form is a multiple-steps form. To make it simple, let's say 3 main steps:

  1. enter personal information(name/email/DOB/etc)
  2. enter more information(terms/etc)
  3. enter payment information(credit card or bank info or paypal etc)

After go through above steps: user finished the process, got a receipt and receive an email

Our ambitious target

Because users might drop off on any step and the website is based on the Sitecore platform, our ambitious target is not only get above 3 steps done, but also want to maximize Sitecore marketing functionalities. E.g.

  • Analytics Tracking for each step
  • Register different goals/campaigns
  • Assign different pattern card directly to user if they didn't finished the process
  • Personalization
  • Add user to Engagement Plan if not finished the process
  • and so on

Our main approach:

On each of step, when user click "Continue Button", will trigger Api call and post entered data to Back-end codes.

In back-end codes, cast the posted data into a PipelineArgs, then go through a "Custom Pipeline"(refer: https://laubplusco.net/creating-custom-pipeline-in-sitecore/). Each of processor in the pipeline will focus on one functionality.

E.g. first processor to do validation; second processor to save data to session/database; third processor to do Analytics; fourth to register a goal; fifth to do Engagement Plan; sixth to send email......

There're several advantages: developers can share the tasks; we can implement functionalities in different stages; processors kind of not affected each other; if any processor wrong, just remove it, then user can still go through the form and finish the application; don't need to re-compile if urgent issue on Production environment.

By the way, we got this idea inspired by "Save Actions" on WFFM(a bit difference though). Refer: https://doc.sitecore.net/web_forms_for_marketers/web_forms_for_marketers/working_with_actions_and_validations/the_submit_button/submit_actions

My questions:

  1. someone said Sitecore pipeline can only be used to extend build-in/Core pipelines, e.g. httpRequest/sessionEnd/publish/etc. Is that true and why? (personally, I can't image that Sitecore would abandon the pipeline engine in future, any roadmap?)

  2. someone concerned about Test. My understanding is that most of test will be implemented on Service layer, not on processor. Is there any specific reason for Test?

  3. any other potential issue?

  4. Is there any other better approach or pattern how to implement a custom form on Sitecore platform?

Thanks.

  • This is quite a lot of questions combined into one. this sounds a little complex to me, is there any reason not to just build this with WFFM or the new experience forms module (Sitecore 9)? as it’s designed for custom forms and both can be used to create multi step forms. You could use a custom save action to save the data to your backend database. Or use the WFFM apis to interact with the data. If you really don’t want to use WFFM / experience forms then you could just simply build a standard MVC form to do this as a custom component and still make use of personalisation, goals, analytics etc – Adam Seabridge Jun 11 at 15:41
  • Thanks @AdamSeabridge for the first reply and discussion~ – Joe Hou Jun 12 at 4:59
  • We are on Sitecore 8, no Experience Forms. Also, the form is too complicated to use wffm(front-end logic is terrible complicated). It is a standard MVC form. But inside the MVC Action, rather than implementing all Sitecore stuff(goals, analtics etc) in a sequence, we're using Sitecore pipeline, something like "Sitecore.Pipelines.CorePipeline.Run("customPipeline", args);". In each processor of the "customPipeline", it focuses on one Sitecore functionality(e.g. register a goal). – Joe Hou Jun 12 at 5:14
  • Compared with a sequence codes inside MVC Action, the pipeline provides more flexibility. E.g no need to re-compile codes to disable one of Sitecore function(just need to comment the processor out from the pipeline processors list). But I'm not sure what's the disadvantage to use Sitecore pipeline engine. – Joe Hou Jun 12 at 5:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.