RTF Templates for Outcomes
From All n One's bxp software Wixi
Contents
1 Overview
For complex paper based forms and templates, their conversion into HTML and their ongoing maintenance can be very difficult.
bxp now supports the upload of an RTF document. In the template field replacements using the -- notation mean that content is dynamically injected into the layout.
The contents of the RTF (Rich Text Format) file are then passed to a pdf converter which generates a PDF file.
A link to this PDF can then be put straight into the external communication on an outcome.
What this means is that you can start using Microsoft Word to design and manage your templates. Then use bxp to inject data into the template, convert to pdf and email to a client.
What follows is how this process is accomplished.
2 Setup
2.1 Create the basic template
Firstly you'll need an RTF template. This is easily created and managed using tools like Microsoft Word.
Open Word and create a document. You can even pop in pictures.
2.2 Make the template dynamic
Using the -- field notation and information from Field Mapping, you can put where you want your data to be injected.
2.3 Transfer the template into bxp
When your rtf is ready, log into bxp, go Main Menu > Communications Centre > Templates > Tempate - RTF - Upload
Locate the file on your machine and upload it
2.4 Outcome setup
Next in your form we need to connect the RTF file with an outcome. So edit an outcome Main Menu > Form Management > Form - Outcome Manager > Outcome - Add > Choose the form > Set up the outcome fields and continue to External Communications > External Email Communication
As you're going to generate the PDF and send it to the client potentially for them to sign or add more details. (You don't have to but for this process we assume you do).
Create an external email as usual. Detailed in training CC-1-5 Contact_Centre_Training
In the body of the email add --strRTFFilename-- This notation lets the engine know where to add the link for the user to be able to download the pdf. The PDF is only ever sent as a link for a number of reasons, all to do with improving email delivery rates.
Next choose the External Attach RTF-PDF Template. Locate the name of the file you uploaded.
Scroll to the bottom and choose "Add Outcome".
2.5 Now to test
So the outcome is now rigged to perform the replacements from the RTF, generate the PDF and send the email. The best thing to do now is to test the process.
Add a record to the form. Main Menu > Inbound Contact > My Data > Take an Inbound contact > Choose your form >
Make sure your email address is the one being sent to.
Choose the outcome and save.
The screen should give you the option to "continue working with the record", select that and you should be able to see that the outcome saved.
Go into the "Contact History". The last entry will be your newly created pdf.
Check your email and test the link to make sure the pdf opens.
Hey presto!... RTF templates to PDF in seconds.
3 Notes
- Uploaded templates overwrite older templates. So be careful and keep RTFs on your machine. The listing will allow you to download them BEFORE you replace them.
4 Troubleshooting
4.1 Replacements not being made
From time to time replacements seem not to work. This is usually a formatting issue. Lets take a field like --strCDA_1_field_0_1--. On screen in Word it looks fine and is all together but in the actually RTF it may be split up.
To fix this. Open the RTF in notepad and search for the name without the -- notation. i.e. strCDA_1_field_0_1
When you find it ensure that there is a -- around it. If you look a little before and after you should see your -- but they're usually wrapped in RTF.
Edit the file in your text editor. Save it and reopen in Word. It should look the same, but now when bxp processes it, it should render properly.
If you're still having difficult please give us a shout at support@bxpsoftware.com or call +353 1 429 4000 and we'll do what we can to help.
4.2 Slowness - due to images
RTF is rather unforgiving size wise. Image size really matters. If you have a very big image in there and have resized it to be small ALL of the large image data is going to be there too. The best option is to resize the image in a graphics package and re-add it to a template.
Please see Images_and_Printing for more information.