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
  • Deployment
  • Bot as an API

How to send feedback to Haptik using API?

Written by Medha Anand

Updated on August 23rd, 2021

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

Log Feedback to Haptik via REST APIURLHeadersPostResponseError ResponseSample CURL command

Log Feedback to Haptik via REST API

The Log Feedback API allows you to send feedback via a POST request to the Haptik Platform. The URL for logging feedback is generated on the Haptik Platform Dashboard.

URL

https://<BASE_URL>/v1.0/log_feedback_from_user/

Headers

Authorization: Bearer <TOKEN>
client-id: <CLIENT_ID>
Content-Type: application/json
  • Authorization - The Authorization header of each HTTP request should be “Bearer” followed by your token which will be provided by Haptik
  • client-id - The client id for your account which will be provided by Haptik
  • Content-Type - application/json

Post

{
 "auth_id": "<AUTH_ID>",
 "business_id": <BUSINESS_ID>,
 "query_resolved": true,
 "query_rating": 5,
 "feedback": "The conversation was very human like"
}
  • auth_id (required) - This is an alphanumeric User identifier from your system
  • business_id (required) - This is a numeric identifier for channel/queue that you wish to register the feedback on.
  • query_resolved (required) - This is a boolean indicator of whether the user's query was resolved or not. This helps us bucket conversations into positive or negative categories.
  • query_rating (required) - This is a numeric indicator on the scale of 1 - 5, to tell how satisfied the user was with the conversation.
  • feedback (optional) - This is a string field, allowing user to provide written feedback pointing to specifics of their experience.

Response

A successful request to the log feedback API will return a 201 status code with a JSON response object. It will contains a boolean indicating successful submission of feedback.

{
 "success": true
}

Error Response

To have a fair judgement of a conversation or an agent, a user is allowed to submit feedback only once in 1 hour. If the user tries to submit the feedback again within 1 hour, an error will be raised

{
 "error_message": "duplicate feedback"
}

If user tries to send a feedback without initiating a conversation, then the API will return a 404

{
 "error_message": "Failed to submit feedback, please make sure there is an active conversation with the agent"
}

If the user with auth_id is not registered, then the API will return a 403 status code.

{
 "error_message": "Invalid_User"
}

If the Authorization header is missing or invalid, then the API will return a 401 status code.

{
 "error_message": "invalid authorization details"
}

Sample CURL command

curl -X POST 'https://<BASE_URL>/v1.0/log_feedback_from_user/' \
-H 'Authorization: Bearer <TOKEN>' \
-H 'client-id: <CLIENT_ID>' \
-H 'Content-Type: application/json' \
-H '{
 "auth_id": "<AUTH_ID>",
 "business_id": <BUSINESS_ID>,
 "query_resolved": true,
 "query_rating": 5,
 "feedback": "My query was resolved pertty smoothly"
}'

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • How to send message to Haptik using API?
  • What is Bot as an API?
  • Which information is sent as Webhook Payload?
  • How to ensure API security?

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