Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Go to Haptik Website
  • Contact Us
  • Home
  • Bot Building
  • Smart Skills
  • ECommerce

How to use Check Refund Status Smart Skill?

Written by Rasika Purohit

Updated on August 26th, 2022

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Build Deploy Analyse Manage Account Bot Deactivation
  • Bot Building
    Essentials Smart Skills Steps User Messages Bot Responses Entities Connections Customisations User feedback collection Testing Whatsapp Bots NLU Bot Maintenance
  • Smart Agent Chat
    Set up Admin Settings MyChats Section (Agent Inbox) Live Traffic Section Teams Section Archives Section Analytics Plans on Smart Agent Chat
  • Conversation Design
    Design Basics Design Guides Designing for Platforms Designing WhatsApp Bots
  • Developer Guides
    Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
  • Deployment
    Web SDK WhatsApp Facebook Instagram Sunshine Conversation LINE Google Business Messages Telegram MS Teams Bot as an API iOS SDK Android SDK
  • External Agent Tool Setup
    Zendesk Chat Salesforce Service Cloud Freshchat Zoho NICE CXOne Gorgias
  • Analytics & Reporting
    Intelligent Analytics
  • Notifications
    SMS Notifications Success Measurement
  • Commerce Plus
    Catalog Integration Bot Building Guide Channel Deployments Unified ML Pipeline Documentation
  • Troubleshooting Guides
    Error Messages FAQs
  • Release Notes
+ More

Table of Contents

Refund StatusRequirementsLimitationsHow to make changes to the skill?How to analyze your skill post go-live?

The E-commerce Smart Skills are eligible to fulfill critical customer support queries. Smart Skills are selected based on market research and user behavior of the retail vertical.

Refund Status

Name of the skill on Conversation Studio - check refund status

Purpose of the skill: To view the number of orders for a user along with their refund statuses.

  • The IVA will provide the list of orders for which a refund was initiated by the user.
  • The user will proceed by selecting the order for which they need to check the refund status.
  • The user will also be able to see other details related to their order such as the image of the order and its price.

What’s the design template going to look like?

 The skill is designed to keep in mind quick resolution & added value to the user. Reach out to the Conversation Designer for access to the design lucidchart or PDF.

Requirements

  1. The smart skill assumes the end-user is authenticated already. 
    1. If you wish to add an authentication flow within the bot, you can combine this with the OTP authentication Smart Skill.
    2. For users already logged into your platform (website, apps, etc), authentication can happen via custom signup.
  2. The client has 2 APIs already developed with them:
    1. Get_active_refund_orders via user_id
    2. Check refund status via order_id

Limitations

This is a no-code smart skill if the APIs are developed to match the API structure added in the skill. If the business has additional rules or logic to be implemented for this use case, you will need to make changes accordingly (read more in the changes section). If the client wants to add further APIs, they will need to add more steps to this smart skill.

How to make changes to the skill?

For UI-related or bot response changes, refer to them here.

API calls are made on 2 code steps in the skill.

API 1: Get the list of orders for which a refund was initiated by the user

Name of the step - get_active_refund_orders

Approach - In order to get the user orders a valid user must be returned from custom signup or authenticated user by OTP validation.

The sequence of events in the code and where to change them-

Section 1: Used to get entities and variables and send a final response to bot

  1. Creates an instance of the main class Haptik and calls the get orders API to fetch all the active orders mapped to a user.
  2. Creates final response to be sent to the bot by calling the get_final_response method from Haptik class.
  3. The response is sent to the output step.

Section 2:  Calls the get orders API and return corresponding response object or status

  1.  API configurations are to be made in this section (method, URL, timeout)
  2. Body used for calling the API extra parameters can be added here.
  3. Headers required for API currently mock headers are added which are mapped to mock response from Haptik postman account.
  4. Responsible for making requests to endpoint provided.
  5. Handles Timeout and API error cases also return API response object in case of a successful response.

Section 3: Creates final response which is sent to the bot by taking Haptik class object as input along with the order's response.

  1. Sets in initial values for carousel, quick_replies, and number_of_orders variables.
  2. Checks for timeout, API error, zero orders, and successful response and sets the status and number_of_order variables accordingly.
  3. If an order is successful additional parameter carousal is also filled which internally calls get_carousels function which returns carousel HSL to be displayed on the bot.
  4. final_response with required parameters is created and replied to the calling function.

Section 4: Random number generator which can be used for providing retry option.
Need to pass the length of random number and it creates random number to a specific length.

Section 5: Create buttons that can be sent if no orders are found (not implemented in current smart skill)

  1. Configure the message send and the button text to be sent.
  2. Created the button HSL.

Section 6: Creates carousel elements based on the list of orders passed to it additionally it takes a Haptik class object as an input parameter for implementing a carousel.

Loops over orders list passed to the function and created carousel elements by calling get_carousel_item method from the class object.

  1. Configures the variables passed to the carousel to be displayed.
  2. Appends the carousel element to the carousel list.

Section 7: The main class that implements all the functionality required.

  1. Initializes the instance variables used in the flow.
  2. Returns the entity value by filtering the entity_object with the enity_name passed as a parameter along with the type of entity it is.
  3. Creates a simplified entity dictionary that can be used for getting the values by searing the dictionary key. It does this by iterating over the entity object and implementing get_entity_value internally to fetch entity value.
  4. Used for creating QR items (Not implemented in the smart skill).
  5. Used for creating QR body (Not implemented in the smart skill).
  6. Generates carousel elements based on the details passed to it.
  7. Generates carousel body by adding the carousel elements in the body.
  8. Makes the calls to API endpoint with the details passed to it.
Step Name Nature of Changes API Name & Contract
get_active_refund_orders
Phone_number entity is used as the user_id to get details. It can be replaced by user_id shared in custom_signup data or another API to fetch user_id based on phone number can also be implemented based on the requirements.

You can also change the carousel details displayed per order

Request:

 {
    "user_id": user_id
 }

Response:

{
  "status": "success",
  "user": {
    "first_name": "John",
    "last_name": "Doe"
  },
  "active_refund_orders": 
 [
   {
    "order_id": "5398613",
    "product_name": product_name,
    "price": "345.00",
    “number_of_items”: 2,
"description":product_description,
    "image_url": image_path,
    "purchase-date": "26-05-2021"
    },
  ]
}

API 2- Check refund status for an order id

Name of step - check_refund_status

Approach- User must select the order for the list displayed to him/her to capture the order_id and make API requests accordingly.

The sequence of events in the code and where to change them- 

Section 1: Used to get entities and variables and send a final response to the bot.

  1. Creates an instance of the main class Haptik and calls the get orders API to fetch all the active orders mapped to a user.
  2. Creates final response to be sent to the bot by calling the get_final_response method from Haptik class.
  3. The response is sent to the output step.

Section 2:  Calls the get orders API and returns the corresponding response object or status.

  1.  API configurations are to be made in this section (method, URL, timeout).
  2. Mock cases for displaying data as per the mock response. Remove this while integrating the smart skill with IVA.
  3. Body used for calling the API extra parameters can be added here.
  4. Headers required for API currently mock headers are added which are mapped to mock response from Haptik postman account.
  5. Remove the header “x-mock-response-name” while integrating the smart skill with the current IVA as this header is used for displaying the correct mock cases.
  6.  Responsible for making requests to endpoint provided.
  7.  Handles Timeout and API error cases also return API response object in case of a successful response.

Section 3: Creates final response which is sent to the bot by taking Haptik class object as input along with the order's response.

  1. Sets in initial values for carousel, quick_replies, and number_of_orders variables.
  2. Checks for timeout, API error, zero orders, and successful response and sets the status and number_of_order variables accordingly.
  3. If an order is successful additional parameter carousal is also filled which internally calls get_carousels function which returns carousel HSL to be displayed on the bot.
  4. final_response with required parameters is created and replied to the calling function.

Section 4: Random number generator which can be used for providing retry option.

Need to pass the length of random number and it creates random number to a specific length.

Section 5: The main class that implements all the functionality required.

  1. Initializes the instance variables used in the flow.
  2. Returns the entity value by filtering the entity_object with the enity_name passed as a parameter along with the type of entity it is.
  3. Creates a simplified entity dictionary that can be used for getting the values by searing the dictionary key. It does this by iterating over the entity object and implementing get_entity_value internally to fetch entity value.
  4. Used for creating QR item (Not implemented in the smart skill)
  5. Used for creating QR body (Not implemented in the smart skill)
  6. Generates carousel elements based on the details passed to it.
  7. Generates carousel body by adding the carousel elements in the body.
  8. Makes the calls to API endpoint with the details passed to it.
Step Name Name of Changes API Name & Contract

check_refund_status

Change the carousel details.

Request:
 Order_id in the request endpoint

Response:

{
  "status": "success",
  "refund_details": 
 [
   {
    "refund_status": status,
    "refund_initiated_date": date,
    "refund_amount": amount,
    "payment_mode": payment_mode,
    "refund_process_id": transaction_id,
    }
  ]
}

check_refund_status

Current outputs configured are processing, processed, and paid. More statuses can be configured as per business

-

How to analyse your skill post go-live?

Create smart funnels on our Intelligent Analytics to analyse how many users are able to reach the end of the chat flow and get their invoice copy.

Smart funnel suggestion: How many users were able to view their invoice copy successfully

  1. Start point: active_refund_orders.
  2. Endpoints:
    1. cant _find_order
    2. no_orders
    3. Processing
    4. Processed<7days
    5. Processed>7days
    6. Paid_out

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • How to use Track my order Smart Skill?
  • How to use Cancel my order Smart Skill?
  • How to use Get Invoice Smart Skill?
  • How to use Return/Replacement Smart Skill?

Platform

  • Conversation Studio
  • Smart Skills
  • Advanced NLU
  • Intelligent Analytics
  • Omnichannel
  • Smart Agent Chat
  • Enterprise Security
  • Integrations

Solutions

  • Conversational Commerce
  • Lead Generation
  • Customer Care
  • WhatsApp
  • Conversational IVR
  • Google Business Messages

Industries

  • Retail/ E-Commerce
  • Financial Services
  • Travel & Hospitality
  • Telecom

Knowledge

  • ROI Calculator
  • Reports & Research
  • Case Studies
  • Webinars
  • ISAT
  • Tech Blog
  • Business Blog
  • Resources
  • Haptik v/s Yellow
  • Haptik v/s Liveperson
  • Haptik v/s IBM Watson
  • Haptik v/s Verloop
  • Conversations on AI

Company

  • Why Haptik
  • About Us
  • Careers
  • News & Media
  • Awards & Recognition
  • Contact Us
  • Partnerships
  • Investor Relations

Subscribe

Sign up to recieve the latest updates

Find us on

  • Twitter-footer
  • Linkedin-footer
  • YT-footer
  • Insta-footer
  • G2-footer
  • Facebook-footer

Knowledge Base Software powered by Helpjuice

Copyright © jio Haptik Technology Limited 2021 | Data Security & Privacy Policy | GDPR

North America | Asia Pacific | Africa | enterprise@haptik.ai

Definition by Author

0
0