Samples of the XML Message Exchange between TruModule and TruService when TruModule requires a question are given below. This is a typical message exchange between TruModule and TruService where:

  • Module requests a question from TruService (A);
  • TruService responds with a question (B);

(The ‘A’ and ‘B’ markers refer to the relevant annotations in the customer journey UML diagrams when these messages are used.)

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

TruModule requests a question - single language (A)

<?xml version="1.0" encoding="UTF-8"?>
<Request PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v240.xsd">
  <Question Trigger="PAYMENTREQUEST">
    <Language Rfc1766="en-GB"/>
    <Device Name="MX925" Firmware="FORMAGENT 2.0" >
      <Screen Height="4" Width="16" 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" />
  </Question>
</Request>

TruModule requests a question - multiple languages (A)

<?xml version="1.0" encoding="UTF-8"?>
<Request PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v240.xsd">
  <Question Trigger="PAYMENTREQUEST">
    <Language Rfc1766="en-GB"/>
    <Language Rfc1766="fr-FR"/>
    <Language Rfc1766="de-DE"/>
    <Device Name="MX925" Firmware="FORMAGENT 2.0" >
      <Screen Height="4" Width="16" 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" />
  </Question>
</Request>

TruModule requests a question (alternative version that includes POS Data) (A)

<?xml version="1.0" encoding="UTF-8"?>
<Request PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v240.xsd">
  <Question Trigger="PAYMENTREQUEST">
    <Language Rfc1766="en-GB"/>
    <Device Name="MX925" Firmware="FORMAGENT 2.0" >
      <Screen Height="4" Width="16" 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" />
    <PosEventList>
        <StartTransaction AttendantType="ATTENDED" OperatorId="James" SalesPersonId="Toby" TillType="STANDARD" Type-"SALE" Id="121212" DateTime="2015-11-29T09:13:22Z" Amount="1203" Gratuity="0" Currency="826" />
        <Item  Quantity="1" Description="A description" RetailAmount="1000" SellingAmount="1000" Sku="a stock keeping unit" UnitMeasurement="KG" Operation="ADD">
      		<Barcode Type="SYMBOLOGY"><![CDATA[asdfjansdkjfnaskjdfnaksjdnfkjasdnfkjasndkjansfdkjansdkjfnaskjdfnkj]]></Barcode>
        </Item>
    </PosEventList>
  </Question>
</Request>

TruService responds with a question - single language (B)

<?xml version="1.0" encoding="UTF-8"?>
<Response PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v240.xsd">
    <Display>
      <Language Rfc1766="en-GB">
        <Question TimeoutMs="30000">Please rate the\nproduct range\n0-9 or clear</Question>
        <Screen TimeoutMs="3000" When="RATED" Priority="false">Thanks for rating!</Screen>
        <Screen TimeoutMs="3000" When="NOTRATED" Priority="false">Sorry you didn't rate</Screen>
        <Receipt When="RATED" Priority="false" Type="CUSTOMER">Thanks for rating!     Go to trurating.com          for ratings           you can trust.     *</Receipt>
        <Receipt When="NOTRATED" Priority="false" Type="CUSTOMER">Sorry you didn't rate     Go to trurating.com          for ratings           you can trust.     </Receipt>
      </Language>
    </Display>
</Response>

TruService responds with a question - multiple languages (B)

<?xml version="1.0" encoding="UTF-8"?>
<Response PartnerId="1" MerchantId="2" TerminalId="3" SessionId="2349572348" xmlns="http://docs.trurating.com/schema/truservice/v240.xsd">
    <Display>
      <Language Rfc1766="en-GB">
        <Question TimeoutMs="30000">Please rate the\nproduct range\n0-3:Poor 4-6:OK\n7-9:Great, or X</Question>
        <Screen TimeoutMs="3000" When="RATED" Priority="false">Thanks for rating!</Screen>
        <Screen TimeoutMs="3000" When="NOTRATED" Priority="false">Sorry you didn't rate</Screen>
        <Receipt When="RATED" Priority="false" Type="CUSTOMER">Thanks for rating!     Go to trurating.com          for ratings           you can trust.     </Receipt>
        <Receipt When="NOTRATED" Priority="false" Type="CUSTOMER">Sorry you didn't rate     Go to trurating.com          for ratings           you can trust.     </Receipt>
      </Language>
      <Language Rfc1766="de-DE">
        <Question TimeoutMs="30000">Bewerten Sie den\nheutigen Service\n0-3:Mies 4-6:OK\n7-9:Toll oder X</Question>
        <Screen TimeoutMs="3000" When="RATED" Priority="false">Vielen Dank für\nIhre Bewertung!</Screen>
        <Screen TimeoutMs="3000" When="NOTRATED" Priority="false">Wir schätzen Ihr\nFeedback</Screen>
        <Receipt When="RATED" Priority="false" Type="CUSTOMER"> Vielen Dank für Ihre Bewertung! Gehen   Sie zu trurating.com für Bewertungen,  denen Sie vertrauen können.      </Receipt>
        <Receipt When="NOTRATED" Priority="false" Type="CUSTOMER">Sie haben eine Bewertung nicht! Gehen   Sie zu trurating.com für Bewertungen,  denen Sie vertrauen können. </Receipt>
      </Language>
    </Display>
</Response>
Feedback