Menu FTL File Parameters

You can use the following header data and body data in the FTL files associated with menu notifications.

Menu Notification Header Parameters

Header Parameters lists header parameters that you can set in menu notification FTL files. To set a menu header parameter value, use the Apache FreeMarker setHeader() function within the template file, for example:
<#t>${request.setHeader('xmlLogicalState', '100')}
Table 1. Header Parameters
Parameter Name Type Description
headers.dataEncodingScheme Integer Overrides the incoming data coding scheme (DCS) of the original menu request.
Note: You can override the alertingPattern and protocolVersion properties set in the mtx_notifier_camel.yaml file by setting the following variables.
headers.alertingPattern Integer Overrides the alert Camel property. For example:
menu:
  alert: 0
The alertingPattern field is sent in MAP v2+ USSD notifications by default. If you do not want to send the alertingPattern field, set alertingPattern to "-1" by including the following line in the FreeMarker template:
<#t>${request.setHeader('alertingPattern', -1)}
headers.protocolVersion Integer Overrides the protocolVersion Camel property. For example:
menu:
  protocolVersion: 1
headers.onSuccessEndOfMenuFlags When playing an announcement or sending a USSD message, defines the action to perform if the service succeeds. Set to one of:
  • sendMenu
  • releaseCall
  • unchargedCall
  • reauthorizeAndCharge

For voice calls, it is used to set the first 4 bits of the EndOfmenuFlags field in the MtxmenuResquestMsg MDC. For USSD sessions, set to releaseCall to close the session after sending the menu result, or sendMenu to leave the session open after sending the menu result.

headers.onFailureEndOfMenuFlags When playing an announcement or sending a USSD message, defines the action to perform if the service fails. Set to one of:
  • sendMenu
  • releaseCall
  • unchargedCall
  • reauthorizeAndCharge

For voice calls, this property is used to set the last 4 bits of the EndOfmenuFlags field in the MtxmenuResquestMsg MDC. For USSD sessions, set to releaseCall to close the session after sending the menu result, or sendMenu to leave the session open after sending the menu result.

headers.announcementProfileId Integer The ID of the PostRating profile to use for announcements.
headers.variableParts String A comma-separated list of variables.
headers.xmlHolding String Holds information set by the FTL logic between successive menu actions and responses.
headers.xmlLogicalState Integer The logical state between successive menu actions and responses. The logical state is set in the FTL and returned to MATRIXX Engine in the LogicalState field in the MtxMenuRequestMsg MDC. It identifies which menu to use in the menu hierarchy.
headers.CamelHttpMethod String Defines the actions to perform for the REST call after the FTL has completed:
  • ZERO — Do not perform a REST call.
  • GET — Perform a REST call GET.
  • PUT — Perform a REST call PUT.
For information about REST call actions, see MATRIXX Business API SDK.
headers.restCallMethod String Set to json/subscriber. For more information, see MATRIXX Business API SDK.
headers.restCallInitiator String Who triggered the original notification. One of:
  • initiatorDeviceId — The ID of the device.
  • initiatorId — The ID of the subscriber.
headers.restCallParameters String The parameters to pass into the rest call method. Generaly empty, but can be set to “offers” for one REST call.
headers.restCallBody String Contents of the REST call body, for example:
request.setHeader('restCallBody','{
"$": "MtxRequestSubscriberModify",
   "Attr": {
        "$": "MyFFSubscriberObjectExtension",
        "FieldA": ["${headers.xmlHolding}${body.receivedInfo}"]
    },
    }')} 
For information about REST calls and the requirements for specific REST calls, see MATRIXX Business API SDK.
headers.restCallBodyResult String Holds the results returned from the REST call. For example, the code in the following excerpt loops through the returned results, and sets the message to send to the subscriber based on the results value:
<#list headers.restCallBodyResult as key, value>
<#if key?string == '_resultCode'>
<#if value == 0>
Your number has been added<#lt>
</#if>
</#if>
</#list>

Menu Notification Body Parameters

Body Parameters lists body parameters that you can use in menu notification FTL files.
Table 2. Body Parameters
Parameter Name Type Description
body.Result UINT 32 The menu result status:
  • 1 — New
  • 2 — In process
  • 3 — Success
  • 4 — Fail
  • 5 — Timed out
body.serviceCode String The announcement menu service code generated through a PostRating generator, or the USSD menu service code in the USSD-String field, for example, 100 in the string **100#.
body.logicalState Integer The logical state that identifies the current location in the menu tree. Set from the MtxMenuNotification MDC.
body.receivedInfo String Holds the menu option chosen by the subscriber.
body.ussdString String The complete USSD string (the ussd-String field in the Process-UnstructuredSS-Request message) entered by the subscriber, as defined in the 3GPP TS 22.030 specification. For example, **100#.
body.ussdSCP String The service code prefix in the USSD-String. For example, in the USSD string: **100#, the service code prefix is "**". Valid prefixes are:
  • *
  • **
  • #
  • ##
  • *#
body.ussdSIList List of Strings The list of service information parameters in the USSD-String. For example, in the USSD string: **121*1*2#, the service information parameters are 1 and 2.
body.firstName String The first name of the contact.
body.lastName String The last name of the contact.
body.emailId String The email address of the contact.
body.phoneNumber String The phone number of the contact.
body.timeZone String The time zone of the contact.
body.contactType Long The contact type. Valid contact types are:
  • 1 — Subscriber
  • 2 — Group admin
  • 3 — Group members
body.notificationTime Date The date and time of the menu notification.
body.subscriber Subscriber Data If enabled in the menu notification type in My MATRIXX, this is the subscriber data appended to the menu notification.
body.subscriber.BalanceList List of Balances If enabled in the menu notification type in My MATRIXX, this is the list of subscriber balance data appended to the menu notification.
body.groupBalanceList List of Balances If enabled in the menu notification type in My MATRIXX, this is the list of group balance data appended to the menu notification.
body.subscriberPurchasedOfferList List of Purchased Offers If enabled in the menu notification type in My MATRIXX, this is the list of subscriber purchased offer data appended to the menu notification.
body.groupPurchasedOfferList List of Purchased Offers If enabled in the menu notification type in My MATRIXX, this is the list of group purchased offer data appended to the menu notification.
body.devicePurchasedOfferList List of Purchased Offers If enabled in the menu notification type in My MATRIXX, this is the list of device purchased offer data appended to the menu notification.