= 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)]] || == 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. [http://eden.sahanafoundation.org/raw-attachment/wiki/UserGuidelines/SAMBRO/Implement/CAPTemplate/cap_alert.csv DOWNLOAD SAMPLE FILE] 2. Now you can add multi-language info. In the browser, go to /eden/cap/info/import. You can download the template and use that to prepare the data.[[BR]] The column name - [[BR]] * '''Identifier''' (the same identifier as above - for which alert this info is targeted)[[BR]] * '''Language''' - the language in which the info is targeted (use en-US for English; for other language see [https://github.com/flavour/eden/blob/master/modules/templates/default/config.py#L128 here]. Use the value in the left side) * '''Category''' (list of strings. The list of possible values that can come in are {use value in the left side}[[BR]] * “Geo” - Geophysical (inc. landslide) [[BR]] * “Met” - Meteorological (inc. flood) [[BR]] * “Safety” - General emergency and public safety [[BR]] * “Security” - Law enforcement, military, homeland and local/private security [[BR]] * “Rescue” - Rescue and recovery [[BR]] * “Fire” - Fire suppression and rescue [[BR]] * “Health” - Medical and public health [[BR]] * “Env” - Pollution and other environmental [[BR]] * “Transport” - Public and private transportation [[BR]] * “Infra” - Utility, telecommunication, other non-transport infrastructure [[BR]] * “CBRNE” – Chemical, Biological, Radiological, Nuclear or High-Yield Explosive threat or attack [[BR]] * “Other” - Other events [[BR]] * '''Event Type''' - the event_type relating to this alert (can use the one already in system at /eden/event/event_type or use new one here)[[BR]] * '''Response Type''' - list of strings, can be multiple separated by comma(,).Possible values are[[BR]] * “Shelter” – Take shelter in place or per [[BR]] * “Evacuate” – Relocate as instructed in the [[BR]] * “Prepare” – Make preparations per the [[BR]] * “Execute” – Execute a pre-planned activity identified in [[BR]] * “Avoid” – Avoid the subject event as per the [[BR]] * “Monitor” – Attend to information sources as described in [[BR]] * “Assess” – Evaluate the information in this message. (This value SHOULD NOT be used in public warning applications.)[[BR]] * “AllClear” – The subject event no longer poses a threat or concern and any follow on action is described in [[BR]] * “None” – No action recommended[[BR]] * '''Audience''' - The text describing the intended audience of the alert message[[BR]] * '''Event Code''' - list of dictionary with KEY:VALUE, can be multiple, separated by comma(,) eg. [{"KEY1":"VALUE1"},{"KEY2":"VALUE2"},...][[BR]] * '''Sender Name''' - The human-readable name of the agency or authority issuing this alert.[[BR]] * '''Headline''' - A brief human-readable headline. Note that some displays (for example, short messaging service devices) may only present this headline; it SHOULD be made as direct and actionable as possible while remaining short. 160 characters MAY be a useful target limit for headline length.[[BR]] * '''Description''' - An extended human readable description of the hazard or event that occasioned this message.[[BR]] * '''Instruction''' - An extended human readable instruction to targeted recipients. [[BR]] * '''Contact''' - The text describing the contact for follow-up and confirmation of the alert message [[BR]] * '''Parameters''' - same as Event Code[[BR]] [http://eden.sahanafoundation.org/raw-attachment/wiki/UserGuidelines/SAMBRO/Implement/CAPTemplate/ DOWNLOAD SAMPLE FILE] || 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)]] ||