Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this Article

Table of Contents
maxLevel2
absoluteUrltrue

Use Case 2: Using Shopify Snap Pack To Apply Discount On A Customer Order To Boot Sales

Discounts are an integral part of a sales operation that benefit benefits both your business and customers. Once the marketing team designs discount promotional strategies, the onus is on the sales team to implement these strategies to increase the sales and customer satisfaction. Customers are now accustomed to discounts round the year that year—so there has to be a mechanism in place to push them discounts automatically based on certain conditionspreconditions, such as when the sale is more than $5000 you get a 10% discount or when you 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.

Problem

In a real business case scenario, creating invoice 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.

Solution

Using the Shopify Snap Pack, we can automate the workflow of a discount application on sales orders. This Pipeline demonstrates how we can accomplish this task efficiently with a single Pipeline.


Download this solution. 


Understanding the Solution

This Pipeline involves the following key steps:

  1. Sen Send Customer Data
  2. Use Customer Data to apply Discount
  3. Create a Discounted Order

Prerequisites

  • 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 customer data to the downstream Mapper Snap.

Image Modified

Cfm tooltip
textConfiguration of customer details in the 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 case, we use the code SUMMERND20 and type

...

percentage on an overall order amounting

...

to 100000.
Image Modified

Here's a glimpse of the detailed view of the mapping table.

Image Modified

Upon validation, the Snap generates the customer details and discount details in its output.
Image Added

Create a Discounted Order

Finally, we create an order based on the discount using the Create Order Snap.
Image Modified

Upon validation, we see the order is created after applying the discount. In this case, a discount of

...

20000 is applied on on overall order of

...

100000, wherein the customer needs to pay only

...

80000 for the purchase.
Image Modified

We can use similar Pipelines for applying a variety of discounts on orders by transforming the data in the Mapper Snap.

Downloads

Attachments
patterns*.slp, *.zip