An important part of a great developer experience is the ability to develop independently. Earlier, Flex developers needed to wait for Sharetribe's customer service for making changes in the configuration of their marketplace on request.
This changed a lot with the recent release of the Flex CLI (Command-line interface). The first release allowed you to build your transaction process independently and test your changes without any delays.
The second major CLI release gives you full control over two more important Flex functionalities. The Flex CLI now allows developers to
- manage search schema (search filters)
- test and validate transaction email templates.
Edit search schemas (search filters)
When you store information in the extended data of your listings, you typically want to create search filters based on the information. A common example is categories: marketplaces usually define a set of categories for their listings and allow customers to search listings by category.
You might add a number of other filters based on the various extended data fields listings have on your marketplace. To get these filters to work, you need to tell the Flex search engine about them by defining search schemas. You can now do it yourself with the Flex CLI.
If your marketplace uses keyword search, you can use the Flex CLI to define which extended data fields should be indexed for the keyword search. For instance, you can set the keyword search to return results that match the category of the listing, but not results that match its cancellation policy.
Learn more about managing search schemas with the Flex CLI.
Test and validate transaction email templates
Creating and editing transaction email templates has been possible since the first release of the Flex CLI. However, until now, you didn’t have a simple way of testing how your emails looked with the changes you made or if they rendered properly with real data.
The latest release of the Flex CLI introduces two new commands that change this: notifications preview and notifications send.
With the new preview feature, you can see a live view of how your email template looks with real data. When you make changes to your template, you can hit the refresh button on your browser to get an updated view instantly. If you happen to make a mistake, the preview functionality shows you a helpful error message that allows you to quickly find and fix the problem.
What’s more, you can now freely define the email context that is applied when the email is rendered. This is great for example when you want to take advantage of the new features of transaction emails and use extended data in your template.
Finally, to really test an email, you’ll want to see how it works in an actual email client software. The new send feature allows you to send a preview email to your own inbox.
To learn more about the new editing capabilities, check out the refreshed guide for editing transaction email templates.