In this Article
Using Shopify Snap Pack To Apply Discount On A Customer Order
Discounts are an integral part of a sales operation that benefit both business and customers. Once a marketing team designs promotional strategies around discounts, the onus is on the sales team to implement these strategies to increase sales and customer satisfaction. Customers are now accustomed to discounts year round—so there has to be a mechanism in place to push discounts automatically based on certain preconditions and business rules. For example, when the sale is more than $5000 we get a 10% discount or when your sale order is $9000 you can claim a gift on additional $1000 purchase and so on. This use case demonstrates how we can use the Shopify Snap Pack to apply discounts on customer sale orders.
In a real business case scenario, creating orders and applying discounts based on the overall sales order is a manual and time-consuming operation. To automate the process of applying discounts, we can design a Pipeline using the Shopify Snap Pack to fasten the process, which helps retain customers and avoid human error.
Using the Shopify Snap Pack, we can automate the workflow of discount application on sales orders based on discount codes. This Pipeline demonstrates how we can accomplish this task efficiently with a simple Pipeline.
Understanding the Pipeline
- Create an app and store in your Shopify application.
- Set the required scopes for the app. In this use case, we set the scopes to perform the following actions:
- Add read customers, read orders, and read products.
- Add write orders.
Send Customer Data
First, we configure the JSON Generator Snap to send the required customer and discount data to the downstream Mapper Snap.
Use Customer Data to apply Discount
Next, we configure the Mapper Snap to apply discount on the overall order amount based on the code and type. In this Use Case, we use the code SUMMERND20 and type percentage on an overall order amounting to 100000.
The following mapping table provides a detailed view of the billing information, with discount codes highlighted.
Upon validation, we see the customer details and discount details in the output preview of the Snap.
Create a Discounted Order
Finally, we create an order based on the discount using the Create Order Snap.
Upon validation, we see the order is created after applying the discount. In this case, a discount of 20000 is applied on an overall order of 100000, wherein the customer needs to pay only 80000 for the purchase.
You can build similar Pipelines for applying a variety of discounts on orders by transforming your customer, sales, and discount data using the Mapper Snap, and then create discounted orders using the Create Order Snap.