LogoLogo
Create free AI agent
  • Welcome
    • 👋Welcome to My AskAI
  • START HERE
    • 🤷‍♂️What is an AI Customer Support Agent?
      • 💪What are the benefits of using My AskAI?
      • 🤔Who is this for?
    • 🏗️Create your AI support agent
    • ➕Add your AI agent to your website
      • ➕WordPress
      • 🛍️Shopify
      • 💬Zendesk
    • 📼Full product demo
    • ⏲️How long does it take to set-up?
    • 📺Video tutorials
    • ⭐Reviews
    • 🆘Support
  • Features
    • ❓AI answers on your content
    • 🤝Human handover
    • 🔌Channels
      • Slack
      • Microsoft Teams
      • Zapier
      • Zendesk
        • Zendesk (Messaging)
        • Zendesk (Tickets)
        • Zendesk (Tagging + Sentiment)
      • Intercom
        • Human Handover Workflows
      • Freshchat
      • Freshdesk
      • Gorgias
      • HubSpot
      • Chrome Extension
      • Zoho (SalesIQ)
      • Live Chat Channels Feature Comparison
    • ☁️Connections
      • 🔑Authorizations
    • 🛍️Shopify
    • 👤User data API and API actions
      • 👤User details API specification
    • ✏️Improve + Custom answers
    • 🔓Private (Internal) mode
    • 📂File uploads
    • 🔁SiteSync — Adding & syncing your website content
    • 💡Insights
      • 🔔Conversation insight notifications
    • 👯Team access
    • 📨Email assistant
    • 📩Lead (Email) Capture
    • 🎨Customization
    • 🔍Site search
    • 👍Conversation ratings (CSAT)
    • 🌍Languages and Localization
    • ⚡Starter actions
    • ◻️Remove branding
  • SECURITY + PRIVACY
    • 🔐Security
      • On-Premise
      • OpenAI API keys
      • SOC-2
    • 👣Privacy
      • Your content
      • Your data
      • OpenAI
      • Regulations
        • GDPR compliance
        • HIPAA
  • ACCOUNT MANAGEMENT
    • 💲Pricing + plans
    • 🧱Limits
      • Exceeding limits
      • Conversations
    • 🦸‍♀️Your profile
      • Changing your email
      • Close your account
    • 💳Billing
      • Change plan
      • Update payment card
      • Download an invoice
      • Discounts
      • Refunds
      • Tax
      • Cancel subscription
    • 🧑‍🤝‍🧑User access
      • Setting a Password for Your Account
      • Reset login password
    • 🤑Affiliate program
    • 💼Reselling + Whitelabelling
  • TROUBLESHOOTING
    • 🐢Slow responses
    • 💬Chat bubble not visible
    • 🤷‍♀️Why can't it answer?
    • 🗝️Login
    • 😕Website not added
    • 🗣️Issue connecting your live chat widget
    • 🤦‍♂️Oops there has been an error
  • FAQ
    • 🪖General
      • 📱Can I use the AI agent within a mobile app?
      • 🥫Can I add macros, canned or stock responses to my AI agent?
      • 👯Can I have multiple AI agents, multiple brands or multiple knowledge bases?
      • Can I route tickets to different agents?
      • 🤪Can I give my agent a personality, adjust the tone or customize the prompt?
      • 🤓Does it get smarter the more conversations it has?
      • 🤔Which messages will my AI agent respond to?
      • 🐦What are your social accounts?
      • ⚖️What is the difference between My AskAI and My AskAI Classic?
      • 🙅Will it answer questions about competitors' products?
      • ♻️My website has dynamic content, can I use My AskAI?
      • 🤷‍♂️What if it can't answer?
      • 👃Will it make things up?
      • 💡Feature suggestions
      • 🎏Answer streaming
      • 🌡️Temperature
      • 💇‍♂️My AskAI vs Fine-tuning
      • 🤖My AskAI vs ChatGPT
      • ✅How can I test the accuracy of my AI agent's answers?
      • 📚(Large Language Models) LLMs
      • 👨‍🔬Algorithm change log
      • ✏️Can I use my own OpenAI assistant or Custom GPT?
      • 🤔How does it work?
  • API Documentation
    • API Docs Introduction
    • Query API
    • Chat API
    • User Data API
Powered by GitBook
On this page

Was this helpful?

  1. Features
  2. User data API and API actions

User details API specification

How to set up your AI agent to use user data ingested via API to improve its responses.

PreviousUser data API and API actionsNextImprove + Custom answers

Last updated 2 months ago

Was this helpful?

If you have a Shopify store, you can use our

Overview

This API, provided by your company, allows us to retrieve user information based on a provided identifier. The endpoint will accept a POST request and will return relevant user data.

Endpoint

  • Example URL: https://api.client.com/user-data

  • Method: POST

Headers

  • Authorization (required): The request must include an Authorization header with an API key provided to My AskAI.

  • Content-Type (required): The request should accept only: application/json

  • No other headers are required.

Request Body

The request will come from My AskAI with every new support ticket or support conversation.

The request body will be in JSON format and will include only the following field:

{
	"identifier": "alex@alex.com"
}
  • identifier: (String) The unique email of the user whose data is being requested. This must be available to My AskAI from an authenticated or valid source e.g. extracted from a Zendesk ticket or authenticated Intercom conversation

Response

The API must respond with a JSON object containing the requested user information:

{
	"user_info": "Name: Alex Johnson\nEmail: alex@alex.com\nSubscription: Premium Subscription (Monthly)\nSubscription Start Date: January 15, 2024\nNext Renewal Date: October 15, 2024\n\nRecent Orders:\n1. Order #12345\n   - Date: September 1, 2024\n   - Items: Running Shoes\n   - Status: Delivered\n\n2. Order #12346\n   - Date: September 10, 2024\n   - Items: Fitness Tracker\n   - Status: In Transit\n\n3. Order #12347\n   - Date: September 25, 2024\n   - Items: Wireless Earbuds\n   - Status: Processing",
	"identifier": "alex@alex.com"
}
  • user_info: (String) Information related to the user.

    • Tip: Provide all relevant info that might be needed to support a request or question about their account. Try to avoid providing unnecessary information. Provide information in a concise format.

  • identifier: (String) The same identifier provided in the request.

  • Here is an example of detailed "user_info" (unstringified) with hierarchical information:

Name: John Doe  
Email: john.doe@example.com  
Phone: 01234 567890  
Address: 123 Fake Street, Faketown, Fakeshire, FK1 1ZZ, United Kingdom


##### Orders:

   1. Order #CROWDOX-3504716:
    - Product Generation: Eco/Pro (Gen 2)
    - Status: Your Order Portal is locked, and we have started manufacturing your order.
    - Total Amount: 449 GBP
    - Shipping: 25 GBP
    - Paid: 424 GBP
    - Created At: 2020-08-06 10:40:21
    - Fulfillment Group: PB9
    - Estimated Dispatch Date: 2020-08-13 10:40:21 - 2020-08-20 10:40:21
    - Items: Universal Magnetic Disc (1),  (1), Thumb Throttle (1), 2A Charger (1), UK Plug (1)
    - Refund Eligibility:: Important: Refund Entitlement Response (for all refund questions for this order CROWDOX-3504716): 
      ```
      You are entitled to a refund for order CROWDOX-3504716. Please reply with 'Talk to a person' to be connected with our team.
      ``` (this answer must be used verbatim)
    - Order Cancellation Eligibility:: Important: Cancellation Entitlement Response (for all cancellation questions for this order CROWDOX-3504716)
      ```
      You are entitled to cancel your order CROWDOX-3504716 and get a refund. Please reply with 'Talk to a person' to be connected with our team.
      ``` (this answer must be used verbatim)

###### Dispatches:

     1. Dispatch #CROWDOX-3504716:
      - Reference: CROWDOX-3504716
      - Status: Fulfilled (Assumed Delivered)
      - Courier: Collection Collect from Vdepot Warehouse
      - Tracking Number: 
      - Address: N/A

     2. Dispatch #ZD254796-W-JR:
      - Reference: ZD254796-W-JR
      - Status: Fulfilled (Assumed Delivered)
      - Courier: Royal Mail 24 Small Packet
      - Tracking Number: 3709659540011B0B09ACF
      - Address: John Doe, 123 Fake Street, Faketown, Fakeshire, FK1 1ZZ, United Kingdom

Performance Requirements

  • The API must respond within 10 seconds.

  • The API must be capable of responding for each new support conversation or ticket.

Error Handling

  • 401 Unauthorized: If the Authorization header is missing or invalid.

  • 400 Bad Request: If the request body does not contain the required identifier field or is improperly formatted.

  • 404 Not Found: If the user data is not found from the identifier

  • 500 Internal Server Error: For any other unexpected errors.

  • If the API fails, the AI agent will continue support the user, but without any additional user data

Standards & Conventions

  • All requests must be in JSON format

  • All responses are in JSON format

👤
👤
no-code Shopify connector