It offers a wide assortment of groceries, fruits and vegetables, cosmetics, electronics, bakery items, flowers and much more.
My current team is ‘Consumer’ . It is associated with providing resources for all consumer (Customer) based requirements. My project is required by for automated integration of freebies in the customer cart based on a Rule engine. A rule engine is a software component that allows non-programmers to add or change business logic …show more content…
Rules engines does the job of serving as pluggable software components that a business rules approach has externalised or separated from application code. This externalisation or separation allows business users to modify the rules without the need for IT intervention. The system as a whole becomes more easily adaptable with such external business rules. Grofers has till now been functioning without the help of rule engine, which the people working find it quite difficult to manage and perform the operations in an easy and comfortable way. With the development of Rule Engine the company would be benefitted. The freebie service will give the ability to share internal information across the whole of the staff often does away with the need to constantly send internal memos and emails.
1.2 Current Scenario Currently the consumer ecosystem does not have a rule engine to decide upon the promotion to be included in the final cart that is checked out. The operations team has to intervene to perform a check upon the cart to include the offered free product.
Cart
Final Cart
Operations team adds a tag
Cart
Final …show more content…
( Elaborated further in section 3.3).
• Web API View: It is RESTful API which contains the entire business flow of the service. It contains calls to various controller methods according to which data view is modified. It defines operations based on method of request received. The received request can be in the form of : • POST request: This type of request is received when the cart is initialised for the first time. • PUT request: This type of request is received when the cart in modified. Other types of Handled request includes GET request and DELETE request.
• Controller: It handles how the view is to modified, in other words it handles the behaviour of the view. • __int__: This method receives a cart and form a cart object that can now be operated upon by other member methods or modules. Other module present can call this object by behaving as a service • writer: After the rules are evaluated, a new cart has to be prepared which is the final cart with all promotions applied and freebies added. The writer method does the job of creating a new cart by adding promoted items into the cart