Skip to content

Product info

The product info service defines methods that can be used to get more information on products. A product represents a procedure or service that needs to be supplied to the customer.

Product list

The getProductList call can be used to retrieve a list of products that are selected for the current ticket. Each product in the list is represented by a ProductDetails message containing the number and name of the product. A product is selected by the customer when they create a ticket. The operator of the ticket can also add or remove products. This means that it is possible for the product list to be empty or contain multiple products.

Below is a simple code snippet that shows how to retrieve the product list.

from openobd import *


class ProductListExample(OpenOBDFunction):

    def run(self):
        # Retrieve and print the product list
        product_list = self.openobd_session.get_product_list()
        for product in product_list.products:
            print(f"Product number: {product.number}")
            print(f"Product name: {product.name}")