Service | Description |
addToCart | The addToCart service works much like the addToCart function you created in Vuforia Studio. The addToCart service intakes the part number (pid), quantity (qty) and price (price) of the selected part. Using the input information, along with user information from ThingWorx, a user ID is created as a way of designating the person using the service. This user ID (uid) is a unique identifier for each order and is necessary for persistence because it differentiates a user and their individual sessions apart from others. When a part is added to the cart, its part information is stored inside an entry in a data table, which is then sent into the infotable used to store the cart. |
getCart | Once a cart has been created, the getCart service is used to obtain the entries for the cart. It takes the information that was added to the cart and outputs it as an infotable. This will be used to update the cart when changes are made to it in the Vuforia Studio experience. |
getCartTotal | The getCartTotal service works like getCart, except instead of returning an entire table of information, its only output is the total price of the items in the cart. |
checkCart | When values are input into addToCart, there may be mistakes. For example, in the event of an incorrect price quote for a customer, the checkCart service is used to validate all product information that was input into addToCart. If any information is incorrect, checkCart will correct that information inside the cart. |
clearCart | clearCart clears all items from the cart. |
orderCart | When invoked, the orderCart service places an order for all the parts that are in the cart. Before the orderCart service completes, you are given the option of to validate the information in the cart using checkCart. After the service is invoked, a transaction ID (tid) is created with the user’s name and order number, and the purchased property of the infotable is changed to true to signify that the part in the cart has been purchased. |
getOrder | The getOrder service allows you to input a transaction ID (tid) and receive all the information about that specific order in a table. |
getOrders | getOrders skips the tid input, and displays all orders that have been made from the cart in a table. |