The status query command is used in both standalone and integrated solutions and serves a number of purposes:

The query command is primarily used by TruModule to determine if TruRating is activated for this merchant’s outlet and device. If TruService indicates that TruRating is activated then TruModule can request questions and deliver ratings normally. If TruService indicates that the merchant is not activated then TruModule can be effectively be dormant, checking the status periodically but not wasting time asking for rating questions (which won’t return a question) or delivering transaction data (that won’t be retained).

The secondary use for the query command in in relation to Terminal Led Activation (TLA). This is explained in more detail here.

Examples

Samples of the XML Message Exchange between TruModule and TruService when TruModule wants to query the activation status for the merchant and outlet. This is a typical message exchange between TruModule and TruService where:

  • Module requests the status from TruService;
  • TruService responds with the current status and the ‘time to live’ value that tells TruModule when to send the next query;
  • The TruService response also includes the activation & status information that is relevant to the Partner ID and Merchant ID;

The full specification for the TruService XML messages can be found here

TruModule sends Query request

<?xml version="1.0" encoding="UTF-8"?>
<Request PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v230.xsd">
  <Query Force="true">
    <Language Rfc1766="en-GB"/>
    <Device Name="MX925" Firmware="FORMAGENT 2.0" >
      <Screen Height="4" Width="64" Format="RAW" Font="MONOSPACED" Separator="\n" Unit="LINE"/>
      <Receipt Height="30" Width="255" Format="RAW" Font="MONOSPACED" Separator="\n" Unit="LINE"/>
    </Device>
    <Server Id="14839345987423827P" Firmware="MCM.42" />
  </Query>
</Request>

TruService Status response

<?xml version="1.0"?>
<Response PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v230.xsd">
  <Status TimeToLive="604800" IsActive="true" IsSuspended="false" ActiveOutletCount="0" RegistrationCode=”12345678”>
    <Language Rfc1766="en-GB">
      <Receipt>TruRating is Active on this device, your code is TruHost response is DEACTIVATE</Receipt>
    </Language>
  </Status>
</Response>

Feedback