Miva Integration

Introduction

This document guides you through integrating Miva with Zinrelo. You will gain a detailed understanding of installing the Miva plugin, enabling you to quickly get started with the Zinrelo rewards program. This integration utilizes version 2 of Zinrelo, built on version 2 APIs and JavaScript.

📘

This is the latest version of the Miva Integration. If you are still using the older version, click here.

Plugin-integrated features

integration features

The detailed view is mentioned here.

Installation Steps

Step 1: The Zinrelo Loyalty Rewards module can be downloaded from the link.

Step 2: Go to Home > Modules and click the Add Module button [ + ] to upload the module

Step 3: Click the UPLOAD button and select zinrelo.mvc.

Step 4: Click the [ + Add ] button.

Step 5: To make it live, the module needs to be installed in the store. Under Utility Settings > Add/Remove Modules, click [+] Install on the Zinrelo module

Note: The module automatically injects the necessary scripts to enable Zinrelo in your Miva store. You do not need to add any additional code manually.

Admin Configuration

  1. Log in to your Miva admin panel to complete the configuration.
  2. Navigate to: Settings >> Utilities >> More >> Zinrelo Settings.
Miva Zinrelo Integration Miva Zinrelo Integration

Feature Configuration

Enable/ Disable Zinrelo Integration

  • Toggle the Enable button to:
    • Enabled: Displays the Reward Program widget on the website.
    • Disabled: Hides the widget.
Miva Zinrelo Integration

Authenticating Zinrelo Account with Miva

To authenticate your Zinrelo account, you'll need the API key, key identifier, and partner ID.

Obtain these details from the Zinrelo admin console. For more details, refer to this document.

  • Partner ID: Enter the obtained partner ID.
  • API Key: Enter the store API key.
  • API Key Identifier: Enter the API key identifier.
Miva Zinrelo Integration

Showing Potential Points and Text on Product Page

To display potential points to customers on the product page, select “Yes” for “Enable Reward Points Text on Product Pages” dropdown.

Miva Zinrelo Integration

Configure the reward text in the “Reward points text on product pages” text box.

Miva Zinrelo Integration

Note: Include {{EARN_POINTS}} in the text to fetch and display potential points.

Miva Zinrelo Integration

Showing Rewards in the Cart Page

To show rewards in the cart page, select “yes” for the “In-cart redemption” dropdown.

Miva Zinrelo Integration

Configure the reward text displayed with available points in the cart page in the “In-cart redemption text” text box.

Miva Zinrelo Integration

Note: Include {{AVAILABLE_POINTS}} in the text to fetch and display available points to customers.

Miva Zinrelo Integration

Labeling Free Shipping Rewards

Define the label for "Free Shipping Rewards" that appears when customers redeem them. You can customize this label.

Miva Zinrelo Integration

Once you save the configuration, the free shipping rewards will be visible to the end user in the rewards dropdown on the website. For details, please refer to the screenshot below:

Miva Zinrelo Integration

Map User Details

You can add user details in the Config box that you wish to sync between Zinrelo and Miva.

You can also update the values already passed in the Config box or include additional custom attributes to sync.

Miva Zinrelo Integration

Please Note, for phone number field:

  • If you use the phone_number field as a custom attribute, formatting it as +91 is not mandatory. The system will accept the phone number as passed on the website.
  • However, if it is not a custom attribute and you intend to use the Zinrelo phone number field, then the phone number of the loyalty member should be stored in the format: <+COUNTRY CODE - PHONE NUMBER>. For example: +1-7203332525. The COUNTRY CODE defaults to +1.

Preferred Language Mapping

Miva doesn’t support multiple languages. But to use this feature, you can create a sub-store (separate instance) for a separate language & in all sub stores Zinrelo setting pages, we need to add the same Zinrelo backend store details.
One Zinrelo store can be mapped with multiple different language stores of Miva.
Steps to setup multiple languages configuration in Miva:

  • Create a sub-store for each language.
  • Update the language settings in the language (locale) box for each sub-store. Make sure, your Zinrelo store is multi-language enabled & the same language is selected in the Zinrelo store.
Miva Zinrelo Integration

How to create sub-store in Miva

To create sub-store in Miva follow the given steps:

  1. Navigate to the Development Store>> Create a New Store.
Miva Zinrelo Integration
  1. Fill in the necessary details:
    • License: Add a purchased license number here.
    • Manager: Add a manager. Click on “Look Up” to have a quick view of all administrators in Miva.
    • Store Code: Store code can be string without space. E.g. code can be Z or ZIN or even ZINRELO.
    • Store Name: Store Name can be a website name. E.g. If the site is Zinrelo, the store name will be Zinrelo.
    • Owner: Fill in all owner details.
Miva Zinrelo Integration

Once you are done with these settings, click on the “Add” button.

  1. Select the newly created store from “Development Store.”
  2. Go to Settings> Modules.
  3. Install “Zinrelo.”
  4. To update the language for this store navigate to Settings >> Utilities >> More >> Zinrelo Settings. For settings, refer to this part of the document.

Configuring Webhook

There is no need to specify the Webhook URL manually; it will be automatically generated once the configuration is complete.

Miva Zinrelo Integration

📘

Note: After saving the configuration, make sure that the Webhook URL is auto-populated. If not, please contact Zinrelo support at support@zinrelo.com.

Once you are done with configuration, click on "Save Config."

Create Zinrelo Authentication for Order Workflow

In Zinrelo, these workflows award points to customers when the specified actions are executed, and the set rules are satisfied. We can award points, deduct points based on the triggered Order workflow. Order workflows need to be created by the client as per their requirement.

Step 1: Authenticate Order Workflow

To authenticate the order workflow, you must create authentication credentials to authorize the process.

  1. Navigate to: Settings >> Utilities >> More >> Order Workflow Authentication Credentials.
Miva Zinrelo Integration
  1. Add Authentication Credentials:
  • Click on “Add Authentication Credentials.”
Miva Zinrelo Integration
  1. Fill in the details:
    • Description: Enter "Zinrelo Authentication" for easy identification.
    • Authentication Type: Select Basic Authentication.
    • Username: Enter "Zinrelo".
    • Password: Use the API Key obtained during Authenticating Zinrelo Account with Miva.

Miva Zinrelo Integration

  1. Save the credentials.

Step 2: Create Order Workflow

Workflows for Awarding Points for purchases:

  • Order Create: Award points when a new order is created.
  • Order Paid: Award points when payment is completed.
  • Order Shipped: Award points when the order is shipped.

Workflows for returns:

  • Order Cancel: Deduct points when an order is canceled.
  • Order Fully Returned: Deduct points for full order returns.
  • Order Partially Returned: Deduct points for partial order returns.

📘

Please Note:

Only one workflow should be created for awarding points. However, for point deduction, workflows can be created for order cancellations or returns.

For a detailed understanding on how to create workflows, please refer to this document.

Recommendation to setup order workflow

For clients supporting Online payment or Cash on Delivery (COD), we recommend the following configuration:

  1. Award points on Order Shipped event
  2. Return points on Order Cancelled
  3. Return points on Order Returned(Full & partial) event.

Cart session timeout

Basket Timeout (Minutes): Enter the time in minutes that will be considered to reject pending reward points. Rewards applied to the cart will be removed after this time if the user does not proceed with placing the order.

Navigate to Settings>> Store setting>> store details>> Settings.

Miva Zinrelo Integration

Integrated plugin features

RequirementDescriptionAvailability
Member identifier customizationIs it possible to customize a member's email address with another member identifier, such as 'Customer ID,' 'GUID,' 'Phone Number,' or similar options?No
Customize member data captured through the integrationWith custom member attributes, you can define unique attributes of the member that perfectly match your business requirements. To know more, click here.Yes
Purchase TrackingThe Purchase tracking passes the data for each purchase to Zinrelo. This enables Zinrelo to award points for purchases. Yes
Purchase Tracking on -
Order Create/ Processing/Shipped
This is when points are awarded to members—when the order is created, processed or shipped.Yes
Return TrackingThe Return tracking passes the data for each return to Zinrelo. These returns are correlated against an earlier corresponding purchase. This Returns Tracking enables Zinrelo to deduct points for returned purchases.Yes
In-cart RewardThe member available rewards shown in the cart page. Yes
Showing available points on the product pageThe available points shown on the product page can be used by members for redemption, if applicable.Yes

📘

Please Note:

These features are integrated through plugins. If you want to incorporate additional features into your cart beyond these, please reach out to your account manager.

Create Custom Attribute

To ensure a smooth flow of information between Miva and Zinrelo, the creation of four mandatory custom attributes is required. These attributes are:

  1. Zinrelo Available Points
  2. Zinrelo Loyalty Tier
  3. Zinrelo Member ID
  4. Zinrelo User Identifier

These attributes must be created in Miva to enable proper synchronization of data.

To create attributes, navigate to Settings>> Utilities>> Custom Fields>> New Custom Field.

Miva Zinrelo Integration
  • Type: Select “Product Field.”
  • Code: Give a unique code to your attribute.
  • Name: Name the attribute.
  • Access: Select Public.
  • Field Type: Select Text Field.
  • Group: Assign a group. If no group is selected, the attribute will automatically be assigned to the default group.
  • Additional Information: Optionally, include any additional details about the attribute.

Create API Key

The API key is required for Zinrelo-Miva integration. For this navigate to Settings>> User Management>> API Tokens>> Click on Add API Token button.

Please share the generated access token with your account manager at support@zinrelo.com.

Generating Coupons in Miva

To create coupons in Miva, you need to define a price group and then add coupons. Follow the steps below for a smooth process.

Step 1: Define a Price Group

  1. Navigate to Marketing >> Add Price Group in the Miva admin panel.
  2. Configure the following details:
    • Name: Enter a name for the price group.
    • Eligibility: Select “Coupon Only” from the dropdown.
    • Type: Choose the type of price group.
    • Discount Settings: Set the desired discount options.
Miva Zinrelo Integration
  1. Once the configuration is complete, click Add to save the price group.

Step 2: Add Coupons

Navigate to Marketing >> Coupons to create coupons. Miva allows you to create coupons in two ways:

  • Single Coupon: Useful for creating individual coupons or gift cards.
  • Multiple Coupons: Useful for generating several unique coupon codes simultaneously.

Creating a Single Coupon (Gift Cards)

  1. Click on “Add Coupon.”
  2. Configure the following details:
    • Code: Enter a unique name for your reward.
    • Description: Provide a brief description.
    • Eligibility: Define who can use the coupon.
    • Discount to Apply: Select the price group created earlier.
    • Not Valid Before: Set the start date for the coupon's validity.
    • Not Valid After: Set the expiry date for the coupon.
    • Max Use (Total): Define the total number of times this coupon can be used.
    • Max Use (Per Shopper): Specify how many times a single shopper can use this coupon.
  3. Click Add to create the coupon.
Miva Zinrelo Integration

Creating Multiple Coupons

  1. Click on “Generate.”
  2. Configure the following details:
    • Code: Enter a prefix for the coupon codes; unique codes will be generated automatically.
    • Description: Provide a brief description.
    • Eligibility: Define who can use the coupons.
    • # of Coupons: Specify the number of coupon codes to generate.
    • Discount to Apply: Select the price group created earlier.
    • Max Use (Total): Define the total number of uses allowed for each coupon.
    • Max Use (Per Shopper): Specify the maximum uses per shopper for each coupon.
      Click Generate to create multiple coupons.
  3. Click Generate to create multiple coupons.
Miva Zinrelo Integration

Step 3: Copy Multiple Coupon Codes to Zinrelo

  1. After generating multiple coupon codes:
    • Search for the created coupon codes in Miva.
    • You will see a list of all the codes.
Miva Zinrelo Integration
  1. Export Coupons to a CSV File:
    • Select all coupon codes.
    • Convert the list into a CSV file.
Miva Zinrelo Integration
  1. Extract and Prepare the Codes:
    • Open the CSV file and select only the Code column.
  2. Upload Codes to Zinrelo:
    • Log in to your Zinrelo instance.
    • Navigate to Rewards >> Manage Codes.
    • Paste the selected coupon codes from the CSV file into the provided field.
Miva Zinrelo Integration
  1. Click Save.