Cards correspond to screens on the user's mobile device.
The Android version of AMS allows you to show cards as tabs on the same screen.
By using a series of cards it is possible to spread the data within a single Message across multiple screens, with relevant sets of data items to be grouped and captured together.
Every template needs to have one card identified as the root card. This card becomes the first one displayed on the device when creating or viewing a message.
A Template can include multiple Cards, so it is good practice to spread data items across a number of cards, and to group data items into logical groups (for example, a property assessment form may contain a Root Form for the overall property and lease information, along with a Form for each room type. Cards can be linked together using using a "Link Command".
When deciding how many cards to create also consider your target device. For example when using a tablet it may be more convenient for the user to have more information on the same screen rather than splitting it up. However for a phone it may be easier to nagivate across screens rather than scroll.
There are two types of cards, Form Cards and List Cards.
Form Cards contain fields and commands. Any number of fields and command items can be added to a Form Card and ideally should contain data items that are logically grouped together.
List Cards can contain multiple entries of a sub template. If you were creating a timesheet type form you could use a list view for each of the entries rather than sending multiple messages. To use a List Card you need to select a non root Template for the type of entries that will be displayed. You will also need to specify an external label as List Cards are considered data items that contain a collection of entries.
For full details on Cards, refer to the Cards page.
Two types of Data can be added to a Template:
By defining data (Meta Data) within a Template it is possible to include hidden data within a Message.
A common use of meta data is to include data about the user (e.g. their name, staff identifier, email address), the organisation (e.g. user's branch, location or team) or other data which can be derived from information "known" by the template.
Default Data allows the configuration of default data values that will be used to populate data items with the Template's cards.
Default data can also be obtained from the mobile account level. This allows user-specific data to be pre-populated into a Template. Refer Mobile Account Default Data for further details.
Routes allow you to convert messages into documents or push received messages automatically to another server.
Routing within AMS controls the processing of messages sent to the AMS message gateway from users' devices. AMS routes allow incoming messages to trigger workflow actions and to be converted into a range of formats as they pass through the AMS gateway.
The most common use of routing is to convert a message into a format such as a Word, PDF or Excel document and send it to an email address.
Another example of a route is the creation of an XML message from incoming message data and sending the XML on to an external system. This can be used as an alternative to the Web Service API in certain situations.
For more information see the Routes section of the Developer Guide.
There are a range of settings for a template that allow you more control over messages on the phone and when they pass through the gateway.
There are two reply options.
Instructs the phone to display the 'Reply' command for recevied received messages.
Auto Delete On Reply
Cause the phone to delete the original message once the reply has been sent.
When a message is replied to it's id is associated with the new message. This id is available on the web, in Routes and when messages are exported via the API.
When Resend Allowed is checked the AMS Mobile App will display a 'Resend' menu option when viewing a message that has already been sent. After selecting this option a new message will be created with a copy of the data from the original, already sent, message. This new message will have a different id than the original and all values can be edited before the new message is sent. A 'resend' flag will be available on the web, in Routes and when messages are exported via the API.
Advanced Options Allowed
When this option is enabled you can move the send command from the root card to any other card in the root template for a message. This can be useful if you are creating a wizard style message where the user steps through the screens completing information and you want the send option to be on the last step.
On supported devices this will trigger the collection of the current location of the device using GPS, if available, when a message for this template is sent. It has a timeout and will eventually send the message if it can't get the location.
Template publishing allows you to maintain two copies of your template, a live one and a test one. This can be very useful when you have a live deployment but want to make changes without affecting your users.
To enable publishing for a template tick the 'Publishing Enabled' checkbox in the Settings section then save your template.
To create a live version, edit the template and click the 'Publish' button. Until you do this, the template will not be available to your users. If you are enabling publishing for an existing template that is already in use, after saving the change in settings, immediately edit the template and publish it as this will create a copy of the template in its current state and prevent untested changes from being made available.
To test a template before publishing the changes you need to enable 'Test Mode' for a mobile account. This will allow devices using that account to see unpublished versions of assigned templates.
Note that to receive the unpublished versions you will need to update the templates on the device.
Any templates that do not have publishing enabled will not appear in the template list on the device when 'Test Mode' is on.
Exporting Templates from one account to another
Templates can be exported to XML. This allows you to create a new template by importing the XML definition. It can be a way to duplicate a template. The "Download Definition" button will generate a XML file. To import from an exported definition, open the file in a plain text editor and copy the content (using Word will generate errors). From the main Templates tab select "Import Template" and paste the copied XML into the provided text area.
Template exporting is currently incomplete and will not include all the values from the template.
Word Merge Field Template
Click the "Download" button to download a Word document pre-populated with the data items from the current template, incorporating the field names and external labels. This is a good place to start in creating a transformation document as part of a Route.
The following screenshot illustrates a sample template and generated automatically by AMS: