validate

The validate method validates candidate offers in the IGateway interface.

java.util.Collection<com.unicacorp.interact.api.Offer> validate
    (com.unicacorp.interact.treatment.optimization.
     IInteractSessionData sessionData,
           java.util.Collection<com.unicacorp.interact.api.Offer> candidateOffers,
           java.util.Map<java.lang.String,java.lang.Object> parameterMap,
           java.lang.String channel)

The Unica Interact engine invokes this method to validate the candidate offers. The implementation of this method should check the offers, offer attributes, and session attributes against the requirements of the destination to determine which offer or offers can be sent through this gateway. In addition, it may add necessary parameters into the passed-in map, which is passed back to deliver method.

The validate method requires the following parameters:

  • sessionData - the attributes currently stored in the associated Unica Interact session
  • candidateOffers - the offers Unica Interact selected based on the offer selection method, its parameters, and other factors. These offers are eligible to be delivered from the perspective of Unica Interact, but still subject to the gateway.
  • parameterMap - a map the implementation of this method should use to pass parameters to its deliver method
  • channel - the outbound channel these offers will be sent to