The Sales Doc Share sample app features a servlet application deployed to Oracle JCS - SaaS Extension and integrated with Oracle Sales Cloud. Oracle Sales Cloud calls this servlet, passing an object-type (Opportunity, Contacts, or Account), an object ID, and a JWT. When called, the servlet first checks if the JWT-identified user has access to the object associated with the object ID through a REST call to the Oracle Sales Cloud object resource. It throws an exception if the authenticated user is not authorized to access the object. If access to the object is permitted, the servlet checks if a folder for the object exists in Oracle Documents Cloud Service and then creates an AppLink to the folder and responds to the call to render the Oracle Documents Cloud Service UI within Oracle Sales Cloud as an IFrame. If the folder does not exist, the servlet creates a new folder and then generates the AppLink. AppLinks are created with the "contributor" role and a user will have complete access to the folder and can create, update, and delete documents regardless of the user's specific role on the object.