Question Prefetch is an optional feature supported by TruService that allows TruModule to request a rating question in advance of the transaction/payment where the question will be used. Prefetch therefore will generally be used on start-up of TruModule to request the next question before the first transaction/payment is processed and at the end of each transaction/payment to get the next question.

Most implementations of the TruRating application there is no requirement within TruModule to make use of prefetch. The TruService application is designed to operate very quickly and highly efficiently in both a local/managed deployment configuration and in our preferred cloud based (SaaS) model.

However, there may be certain specific integration environments where reducing the need for TruModule to communicate with TruService during the transaction/payment is important and this is where prefetch can be considered.

Making use of the question prefetch feature does create some additional requirements on TruModule and implementations that use prefetch may limited in the future as TruRating add more capabilities. A summary of the requirements and considerations for using prefetch are covered in the next section.

Requirements & Considerations

  1. Partners implementing TruModule and using question prefetch must ensure that the are able to maintain the Session ID used when the question is requested all the way through to the point the question is used, and the rating/transaction linked to the question is delivered. Without this, TruService will not be able to collate the rating & transaction data with the question.

  2. Questions that are prefetched must currently be used within 24 hours. This is because TruService creates an activate session at the point the question is requested and any active session older than 24 hours are automatically discarded (as they are assumed to be incomplete sessions). Should TruModule attempt to deliver a rating/transaction to TruService with a Session ID older than 24 hours the data will be rejected and discarded by TruService (this is true, regardless of prefetch but is more applicable for obvious reasons).

  3. The TruRating question regulation feature that allows merchants to control the frequency that rating questions appear is not as predictable when the prefetch feature is used. TruService applies the regulation setting at the point the question is requested, which in the case of prefetch is not the point that the question will be asked. While question regulation is still available its behaviour in a prefetch environment is not quite as predictable for merchants.

  4. TruModule can prefetch a question and decide not to use it on the next transaction for specific use cases. For example if the next transaction is a refund and the implementation does not require a question on refund then TruModule can retain the prefetched question for the next transaction. However, as described above TruModule must follow the rules around Session ID usage.

  5. TruModule can prefetch a new question on start up, so one if ready for the first transaction/payment or only ask for a prefetch question at the end of a transaction – meaning the first transaction after startup would not include a rating.

  6. There is a small risk that a prefetched question that is stored by TruModule in readiness for the next transaction/payment could become out of date by the time the question is used. This will not cause any major operational issues but could mean that a customer is asked to provide a rating against a question which has either been changed by the merchant since it was prefetched or has been removed it is no longer valid.

  7. TruRating are moving towards the development of new functionality to offer merchants support for dynamic questions and campaigns that use realtime transaction data (i.e. transaction value, transaction type, basket contents) and other realtime data (date, time, weather, customer counters). The ability to offer this functionality to merchants where the implementation of TruModule uses question prefetch will be severely limited. This is because either the dynamic data required to support this capability is not available at the point a question is prefetched, or worse could be incorrect since the data used may be correct at the point the question is requested but inaccurate at the point the question is displayed to the customer.

Example without Question Prefetch

The attached UML diagram shows an example message flow for a rating using the Payment Request trigger where question prefetch is not utilised. The main thing demonstrated here is that TruModule requests the next question from TruService at the point it’s required and then acts based on the response from TruService as a question is not always returned.

UML Sequence
UML Sequence

Example with Question Prefetch

The attached UML diagram shows an example message flow for a rating using the Payment Request trigger where question prefetch is utilised. Firstly TruModule fetches the next question at start-up in readiness for the next transaction/payment. Secondly, when the transaction/payment triggers TruRating then if a prefetched question is available then the rating is performed, else not rating is collected. Finally, when TruModule delivers the rating/transaction to TruService upon completion is also requests the next question in readiness for the next transaction/payment.

UML Sequence
UML Sequence