The IAP service flow

Now, we will look at how all IAP entities work together to provide the service. The following diagram illustrates the IAP process:

Here is an explanation of every step of the IAP service flow:

  1. A Customer will make a request to the Service Provider for a service. With this request, the Customer will pass the account token, which will be used by the Service Provider to identify the user. (Note that the customers will have your module installed in their server.)
  2. After receiving a request from the Customer, the Service Provider will ask the Odoo IAP whether the Customer has enough credit in this account. If the Customer has enough credit, then it will create the transaction to reserve that credit before providing the service.
  3. After reserving the credit, the Service Provider will perform the service. In some cases, the Service Provider will call an external service to perform the requested service.
  4. After performing the service requested by the Customer, the Service Provider goes back to the Odoo API to capture the credit reserved in step 2. If the requested service cannot be served due to an error, the Service Provider will ask Odoo to release the reserved credit.
  5. Finally, the Service Provider will get back to the Customer to notify them that the requested service has been served. Some services might return the resulting information; here, you will get the result of the service. This resulting information is used by the Customer based on his/her specifications (depending on the service).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset