Closed aercolino closed 4 years ago
Hi @aercolino This is a valid scenario and it should work with our current SDK, since it is a business-related question not related to our JAVA SDK, we will reach you through our support to discuss the scenario. I will close the issue in GitHub.
not related to our JAVA SDK
I think it's related to the algorithm that all Queue-it's SDKs implement, but I didn't know where else to report the issue.
I want to summarize what I found out looking at the code in validateToken
.
The following snippet is what causes the error reported above: https://hidden-customer.queue-it.net/error/eventid/?c=hidden-customer&e=specific&...
if (!config.getEventId().toUpperCase().equals(queueParams.getEventId().toUpperCase())) {
return new TokenValidationResult(false, "eventid");
}
What that check does is tying together the result of evaluating the integration before redirecting to a queue, with the result of evaluating the integration after coming from that queue.
Thus, it's not possible to achieve what I wanted: to rightfully come from a generic queue and be redirected to a specific queue during the same validation.
I created two queues: generic and specific, meant to work in series, with SafetyNet on.
The logic of triggers and actions is that
It works nicely, albeit with an error when “jumping” from (after) the generic queue to (before) the specific queue. Instead of immediately redirecting to
https://hidden-customer.queue-it.net/?c=hidden-customer&e=specific&t=https%3A%2F%2Fhidden-hostname%2Fopen%23%2Fcheckout%2Fproduct%2F00-0008587&cid=es-ES
it redirects to
https://hidden-customer.queue-it.net/error/eventid/?c=hidden-customer&e=specific&ver=v3-java-3.6.1&cver=5&man=Send%20buyer%20to%20the%20product%20queue&queueittoken=e_generic~q_fbcf1f13-0a18-49ae-b50e-6bfbad265f59~ts_1596726565~ce_true~rt_queue~h_2ad10a5ab154ac54b3a2933f57ec2ac42bd47221869b4fa85ba3d5b7a158f678&ts=1596726397&t=https%3A%2F%2Fhidden-hostname%2Fopen%23%2Fcheckout%2Fproduct%2F00-0008587
If SafetyNet is on then the error is swallowed, but if it’s off then an error page is shown, with a “Get back in line” button, pointing to the former (expected) URL.
Summarising:
KnownUser.validateRequestByIntegrationConfig
.