Alternative item booster service
Item vectors representing transaction contexts for items are mapped to multidimensional space. A request is received for an alternative to a given item from a resource. The multidimensional space is evaluated to identify closest candidate items to the given item based on the corresponding item vectors. An optimal candidate item is selected from the candidate items based on the request. The association between the given item and the optimal candidate item is injected within a process workflow associated with the resource.
1. A method, comprising:
receiving, by a processor of a cloud processing environment, a given item code associated with a basket of checkout items of a current online transaction, wherein receiving further includes receiving the given item code and the basket of checkout items from an application programming interface (API) associated with a transaction service that is processing the current online transaction;
obtaining, by the processor, similarity values for potential alternative item codes to the given item code based on item vectors derived from transaction histories for previous transactions of the transaction service, wherein obtaining further includes identifying the similarity values as distances between item code vectors plotted in a multidimensional space for the potential alternative item codes and a given item code vector associated with the given item code;
selecting, by the processor, a select alternative item code from the potential alternative item codes; and
providing, by the processor, a select alternative item code to the transaction service using the API for recommending the select alternative item codes as an alternative to the given item code within the basket of checkout items during the current online transaction.
2. The method of claim 1 further comprising, providing, by the processor, the select alternative item code to an item placement service for stocking an alternative item associated with the select alternative item code within a store adjacent to or in place of a given item associated with the given item code.
3. The method of claim 1 further comprising, processing the method as a real-time cloud-based service to the transaction service.
4. The method of claim 1 , wherein selecting further includes selecting a highest value from the similarity values and associating the highest value with the select alternative item code.
5. The method of claim 1 , wherein selecting further includes providing the given item code, the potential alternative item codes, and the similarity values as an input to a trained machine-learning model associated with a trained machine-learning algorithm.
6. The method of claim 5 , wherein providing the given item code further includes providing a customer vector plotted in the multidimensional space for a customer associated with the current online transaction as a further input to the trained machine-learning model.
7. The method of claim 6 , wherein providing the given item code further includes receiving as an output from the trained machine-learning model the select alternative item code.
8. The method of claim 7 , wherein providing further includes receiving a feedback representing a result as to whether an alternative item associated with the select alternative item code was purchased with the current online transaction in place of a given item associated with the given item code.
9. The method of claim 8 , wherein receiving the feedback further includes using the feedback and transaction details associated with the current online transaction during a subsequent training session that retrains the trained machine-learning model based on the feedback.
10. The method of claim 1 , wherein providing further includes sending the given item code and the select alternative item code to the transaction service using the API.
11. The method of claim 1 , wherein providing further includes injecting a transaction identifier for the current online transaction, the given item code, and the select alternative item code into a process workflow associated with the transaction service using the API.