= how to create a CAP message template = [[TOC]] == Creating Alert Template == An '''alert template''' is a pre-populated CAP message that is created to speed-up with the message creation as well as preserving the consistency of a message. Wherever the event specific information such as the DATE or LOCATION or other information you may create place holders for those values within the text. You should mark up places in the text that need to be changed within a pair of square brackets with capitalized text inside as shown below. ''Example'' the ''headline'' text in a CAP message template for a earthquake event could be something like this: '''''[YYYY] [MMM]''' massive earthquake hit '''[LOCATION]'''. If we talk about the recent earthquake in Nepal, then the message creator would replace the MMM YYYY and LOCATION to create the headline to be specific as such: then the headline could be '''''2015 April''''' - massive earthquake hit '''Nepal'''. You can fill in the alert details and info segment details in the template alert message. For creating predefined area, see [#CreatingPredefinedAlertArea here] Here I will guide you through how to create Earthquake Template. You can use this as a guideline to create any event specific template. 1. In your browser, open up the SAMBRO system 2. Once you have opened the system, various menu options are available on the top. Click on '''Alerting''' option.[[BR]][[BR]] [[Image(http://i.imgur.com/3DwcxIt.png)]][[BR]][[BR]] 3. This opens up the table with the alert. We now begin to create template. On the side menu, under TEMPLATES, there is an option to '''Create'''. Click on that. [[BR]][[BR]][[Image(http://i.imgur.com/85sIxcO.png)]][[BR]][[BR]] 4. Now a form appears to fill in the ''Alert'' section of ''CAP Template Message.'' Fill in the values. You can refer the picture on the side. [[BR]][[BR]] [[Image(http://i.imgur.com/YVR476g.png)]] [[BR]][[BR]] || 5. || After you fill out necessary information and click on '''Save''' button at the bottom of the form I mentioned above, you can now see one extra tab ['''''Information template''''']. Now go to the '''''Information template''''' tab and begin to fill the information.[[br]]To add information, you can see '''Add alert information''' on the right side of your screen. A form appears. Now you can begin to add information to the alert. Refer the image on the side. || [[Image(http://i.imgur.com/Fsm78Xw.png)]] || || 5. || After you fill out necessary information and click on '''Save''' button at the bottom of the form I mentioned above, you can now see one extra tab ['''''Information template''''']. Now go to the '''''Information template''''' tab and begin to fill the information.[[br]]To add information, you can see '''Add alert information''' on the right side of your screen. A form appears. Now you can begin to add information to the alert. Refer the image on the side. || [[Image(http://i.imgur.com/Fsm78Xw.png)]] || == Importing/ Prepopulating Multi Language Alert Template == You can prepopulate the multi-language template into the system or if your site is already live, you can import the multi-language. 1. First start by importing Alert. In the browser, go to /eden/cap/alert/import. You can download the template and use that to prepare the data.[[BR]] The column name - [[BR]] '''Template Title''' (does exactly what it says),[[BR]] '''Identifier''' (you need to remember this because we use this identifier to link to the info segment which you will see below [of course, the identifier for the actual alert is not this one so don't be afraid ;-)]),[[BR]] '''Scope''' (is one of ''''Public, Restricted or Private'''' : take care of the match case as this will go into database),[[BR]] '''Restriction''' (if Scope=Restricted, use this to denote who is the restriction scope audience),[[BR]] '''Recipients''' (use list of strings eg ''''["Coast Guard", "Public", "Local Officials"]'''' to fill the value in this field)[[BR]] '''Note'''' (free text that gives in the purpose or the significance of the message) '''Incidents'''(list of strings as Recipients. The list of possible values that can come in are [https://github.com/flavour/eden/blob/master/modules/s3db/cap.py#L103 here]) - value on the left side of the colon (eg. "civil.volunteerRequest", "civil.publicEvent" etc) OR on [https://github.com/flavour/eden/blob/master/modules/s3db/cap.py this] page, search for '''''cap_incident_type_opts = {''''' and you will find them. || 5. || After you fill out necessary information and click on '''Save''' button at the bottom of the form I mentioned above, you can now see one extra tab ['''''Information template''''']. Now go to the '''''Information template''''' tab and begin to fill the information.[[br]]To add information, you can see '''Add alert information''' on the right side of your screen. A form appears. Now you can begin to add information to the alert. Refer the image on the side. || [[Image(http://i.imgur.com/Fsm78Xw.png)]] ||