header-mobile-bg

How to Integrate an Online Form Service with Studio Hub

Kartsten Reuter, SVP Product Management

Karsten Reuter

Because many of our customers use forms on their websites, and there are different approaches to producing these using CoreMedia, I want to explore on how to integrate an online form service with CoreMedia Studio Hub in this post.

Use cases for this integration are:

  •     browsing existing forms in the service
  •     creating a reference to a form within the CoreMedia repository
  •     integrating the form into a website
  •     retrieving form submissions

The first thing to do is to select a form service. For my purposes, I used two criteria: First, the service had to provide an adequate API. And second, they had to have a free option.

There are lots of options out there and also most marketing automation tools also provide form capabilities. I selected Typeform, set up an account, chose a form template from the library, set up an access token, and was ready to go.

Screenshot Studio Form

Screenshot Studio Form

Now that I had an account, an API, and an access token, I was able to start implementing a Typeform connector.

The first thing I needed was a REST client that interacted with the API and retrieved the relevant information for Studio Hub. I started with Postman, which is great for testing a REST API and to experience how authentication works, how to post requests, and to analyze the format of the responses.

Along with the associated API documentation, I was able to implement the required POJOs, a client class, and a unit test to make sure the requests work. With just four classes, I was able to retrieve the following forms from the service:

  •     Form.java
  •     Forms.java
  •     TypeformConnectorClient.java
  •     TypeformConnectorClientTest.java

The test class was created to verify that I could retrieve a list of all my forms - as well as a specific form.

Spring REST templates make it easy to post a request and to assign the result to a POJO, like so:


public Form getForm(String id) {
 ResponseEntity<Form> formResponseEntity =
restTemplate.exchange("https://api.typeform.com/forms/" + id, HttpMethod.GET, createAuthEntity(), Form.class);
 if (!formResponseEntity.getStatusCode().equals(HttpStatus.OK)) {
 return null;
 }
 return formResponseEntity.getBody();
}

The next step was to implement the necessary classes for a Studio Hub Connector, which are composed of just three classes:

  •     TypeformConnectorService.java – The entry point for the integration, which pulls everything together
  •     TypeformCategory.java – With this integration, we just need a root category as all forms can be listed there
  •     TypeformItem.java – Represents a specific form within Typeform

Once the classes are implemented, you need to configure the connector in Spring and in Studio. After that, you can see your forms right in the Studio Hub.

Screenshot Studio Form

Screenshot Studio Form

To create a reference for a form in the content repository, you need a WriteInterceptor that extracts the relevant information from the form and assigns it to content properties. This is done in the TypeformItemWriteInterceptor.

Unfortunately, Typeform does not provide the HTML embed code via the API, so I got it via the web interface and converted it to a template that could be added to the connector configuration. With the WriteInterceptor in place, you can now right-click on a form and create a HTML content object within the CoreMedia content repository.

Screenshot Studio Form

Screenshot Studio Form

Within the preview, the embedded form is immediately rendered and can now be tested.

As a final step, I added the capability to download the form submission in the Studio Hub. You can right-click on a form and select “Download.” This will retrieve all submissions from the API and put them into CSV file, which than is downloaded to your local hard drive.

The code still needs some cleanup and additional documentation, but with the CoreMedia Studio Hub I was able to implement this integration in less than three hours. It shows how easy it is to integrate powerful forms services quickly and easily!

If you're interested in this integration, please feel free to reach out to me: karsten.reuter@coremedia.com. I look forward to hearing from you.

Stage 1: Fragmented: Multiple Channels

You’re a digital dinosaur!

You have a beautiful website, but with fragmented digital experiences, you run the risk of extinction.

It’s time to evolve.

Your audiences want a seamless experience, no matter what's happening behind the scenes. When your experience is different or difficult, it’s important to start with the basics, such as cultivating a holistic approach to online digital experiences. Realign your teams, platforms, processes, goals, and metrics around a comprehensive view of the online experience. Focus on the end-to-end customer journey cutting across channels, desktop and mobile.

separate channels animation circle t-rex dinosaur square
Stage 2: Integrated: Multiple channels

You’re a fish!

Signs of exciting life are starting to form. Your DX is responsive and adaptive but it’s not quite personalized yet.

Keep swimming!

The integration of your brand content across every touchpoint (website, online store, social media, emails, apps, point of sale) creates immersive experiences. These flagship sites combine content-rich brand experiences with immediate conversion capabilities. Business teams and marketing are closely aligned. However, while the digital experience is responsive and adaptive, it’s not yet personalized.

Connect with an expert
Stage 3: Instant: Global expansion

You’re a crocodile!

You’re taking it global. Speed and scalability are key and just like a crocodile, you’re fast…but you’re clumsy.

Oh snap!

In this stage, the online digital experience becomes completely dynamic. You need content that is global, yet relevant, with plenty of local insights: Who is the user? Are they using a mobile phone? Is it raining where they are? Is it snowing? If it is, maybe they need warm, waterproof boots. All of this contextualized information creates a better user experience. With one global orchestration, you’re able to adapt everything, in whatever country or language you choose – while keeping turnaround times low. So keep evolving.

Connect with an expert
Stage 4: Dynamic: Real time personalization

You’re a lion!

You’re reaching more customers in more countries and languages than ever before, and now you’re finally hunting and collecting info with precision.

But you can do more to keep your brand roaring!

As you graduate to the Instant level, you’re able to rapidly update everything - not just in one language and for one country, but in 20 languages and for 100 countries. Speed and scalability are key, driven by the need to roll out global campaigns in all languages and all touchpoints and make updates in minutes or hours, not weeks. But there’s still more to do to reach nirvana.

Connect with an expert
Stage 5: Immersive: Elevated experiences

You’re Captain Content!

You’ve done it! You have opposable thumbs AND you’re saving the world with your seamless, elevated customer experiences.

You're a superhero in the digital space.

Your digital world and your physical world are blending together in the most complementary way possible. When shoppers visit your store, they’ll be greeted with their pre-selected products. Language changes dynamically depending on country of origin – it's like the whole store was set up just for your one specific customer.

In this final stage, your customer experience is truly immersive and superior, and your flagship store merges your physical and digital world into one, with a truly personalized individual experience.

Connect with an expert