What is Contentful?
Contentful is a Content Management System (CMS) that helps businesses to manage and deliver digital content across various channels and devices. Thanks to the Voucherify app which is available at Contentful Marketplace and which can be embedded in Contentful content, you can fetch resources from your Voucherify account and assign them to a specific Contentful entry.
You can link the Contentful entries to the following Voucherify resources:
With this app, you can easily connect the content created in Contentful to Voucherify campaigns, enhancing the customer journey and your marketing teams experience by:
- Adding links to terms and conditions to your campaigns so that customers know what they need to do to receive the discounts. The terms and conditions might be similar or the same for different campaigns, making it easier for the marketing team to manage it in one place.
- Adding banners and the rules explanations to the Earning Rules so that the customers know how they can earn points. In case a banner or a logo changes, the change will be visible after updating the content in Contentful.
- Adding banners and promotion details so that your customers know when they are eligible for the discounts.
With Contentful, it is easier to update the conditions, banners, logos, and other promotional material from one place.
Setting up the integration
On the Voucherify side, you will need to generate API integration keys for Contentful.
- Go to Project Settings and in the General tab, scroll down to Integration Keys.
- Click the plus button on the right.
- Fill in the Name for your key.
- Choose your role from the Role drop-down list.
- Choose Contentful from the Integration drop-down list.
- Click Create Integration API Key button.
Now you can configure Contentful.
- Create a new Contentful account or request an invitation to an existing project.
- Go to Apps and click the Marketplace button.
- Search for Voucherify. Select it and click Install.
- Select your environment and click Authorize access.
- In the configuration screen, fill in the required fields:
- Provide Voucherify API integration keys: Application ID and Secret Key.
- Set Custom URL to:
https://cms-integrations.voucherify.io<br>If your project uses a region other than EU1, the URL should have the prefix
- Click Verify Credentials.
- If the credentials are correct, click Install.
- Once the installation is successful, click Save in the upper right corner to save the provided configuration in the Contentful app.
- Create your own Content type or edit an existing one. In the Content type, you need to include the custom Voucherify resources field as a JSON object. The Voucherify resource allows you to link the content to, e.g., a Voucherify campaign.
- Go to Settings of that field, click Appearance tab and change display option to Voucherify app to enable linking to Voucherify.
- Click Confirm and then Save.
At this point you can create your own Entry and use the Voucherify app resources: Campaigns, Earning Rules, and Promotion Tiers.
Once integrated, Contentful automatically creates a new metadata array for linked Voucherify campaigns, earning rules, or promotion tiers upon the first connection. Each contentfulEntity contains the Entry ID and the contentType. If a Voucherify resource is linked to several Contentful entries, all those entries will be listed in metadata as contentfulEntities with respective Entry IDs and contentTypes.
Linking Contentful entries to Voucherify
The integration between Voucherify and Contentful allows your team to create and manage content directly in Contentful.
Once the integration is complete, the content with Voucherify fields can link the content to a Voucherify campaign, promotion tier, or earning rule.
In this example, a content type has a name, description, and terms and conditions fields and can be linked to Voucherify’s resources:
Voucherify will show the list of all the resources for you to choose from:
Once you choose the resource and the content is published, the Entry ID will be associated with the campaign, earning rule, or promotion tier in Voucherify.
The linked Entry IDs will be returned via the Voucherify API in the form of metadata. Once you retrieve the campaign, promotion tier, or earning rule details from Voucherify via the API, the Entry ID list will be returned. Your development team must use the returned Contentful Entry IDs to fetch the content from the Contentful CMS.
Note: If a campaign uses a voucher metadata schema, updating the content for that campaign will change the metadata of every voucher that was not published and not redeemed. Depending on the number of vouchers, this action can take from a couple of minutes to hours for multi-million voucher campaigns. During that time, the campaign will not allow any changes.