Developer Platform
  • Home
  • Getting Started
    • General Information
    • Features Overview
    • Security
  • APPs
    • Public Apps
      • Shopify
      • Salesforce
      • Zendesk
      • Google Analytics
    • Build your App
      • Getting started
      • My Apps
      • App information
      • App Parameters
      • App Plugins
      • Add Webhooks
      • Submit your Apps
      • App security
      • Developer Policy
  • Use Cases
    • Copilots
      • Product Catalog sync through API
      • FAQ sync through API
    • Visitor experience
      • Integrating custom buttons into your site
      • Check availability before escalating to iAdvize
      • Authenticated Messaging
        • Introduction
        • Web client-side implementation
          • Authenticated Messaging overview
          • Brief timeline of the integration process
          • How to enable authenticated mode in the administration portal?
          • How to implement the customer authentication backend (token provider)?
          • How to authenticate with iAdvize in client's website?
          • How to deal with activation success or failure?
          • How to logout?
          • Compatibility with Mobile SDK
          • FAQ
        • Web backend implementation
          • Important information and recommendations
          • Signature and Encryption Detailed Process
          • Technical backend implementation
          • FAQ
      • Cross-domain Conversation Continuity
      • Customize replies with Markdown
    • Agent workspace
      • Custom App example and step-by-step tutorial
        • Get Started
        • Work with the Desk
        • Intent / Trigger
        • JWT
        • References
    • Administration
      • Users
        • SAML SSO Authentication - Implementation Guide
        • Create, update and delete users via API
        • Manage the availability of your users with the iAdvize API
        • Integrate the iAdvize conversation panel into an existing tool
    • Data & Analytics
      • Anonymize a conversation or visitor data
      • Create a custom dashboard
      • Find contact data using GraphQL
      • Retrieve conversations data
      • Retrieve messages exchanged within a conversation
  • Technologies
    • GraphQL API
      • Terminology
      • Reference
      • Authentication
      • Schema lifecycle
      • Error Management
      • Pagination
    • REST API (deprecated)
      • Statistic (deprecated)
      • Group (deprecated)
      • Call meeting (deprecated)
      • Operator (deprecated)
      • Skill (deprecated)
      • Transaction (deprecated)
      • Visitor (deprecated)
    • Webhooks
      • Reference
      • Guides
    • Desk events
      • Reference
    • Web & Mobile SDK
      • Javascript Web SDK
        • Reference
      • Javascript Callbacks
        • Reference
        • Guides
      • Mobile SDK
        • Fourme (latest)
        • Epoisses
        • Dauphin
        • Cantal
        • 🤝Support Policy
        • 🤔Frequently Asked Questions
    • Custom App
    • External Bot
      • Implementation
        • Configuration flow
        • Conversation flow
        • Conversation objects
      • Configuration
      • FAQ
      • Best practices
Powered by GitBook
On this page
  • Introduction
  • Step 1: Create a new KnowledgeSource
  • Step 2: Synchronize your FAQs with us
  • Create or update an FAQ item
  • Delete FAQ items

Was this helpful?

  1. Use Cases
  2. Copilots

FAQ sync through API

This page will describe how you can use our GraphQL API to synchronize FAQ AI Knowledge with your systems, with the aim to use this knowledge in your generative AI bots.

PreviousProduct Catalog sync through APINextVisitor experience

Last updated 8 months ago

Was this helpful?

This feature is under preview, this means we reserve the right to modify the behaviour of this part of the API without maintaining backward compatibility. To learn more about previews,

The Accept header to add to HTTP requests in order to gain access to this preview is application/vnd.iadvize.knowledge-preview+json

Introduction

This feature allows to keep knowledge about FAQs up to date, by allowing you to send updates, creations and deletion operations about the FAQ information your system holds. Upon receiving these events, we'll index the new knowledge such that your bot can use the very latest information to answer your visitors' questions.

To do so, we'll look into how you can create a knowledge source (your FAQ), and insert, update and delete knowledge items (your FAQ information).

Step 1: Create a new KnowledgeSource

This operation will only need to be done once, therefore there is no need to write any code for it.

It consists in using GraphQL to create a new KnowledgeSource, and taking note of the identifier that was attributed to it. This identifier will be used during step 3.

You can open the GraphQL mutation . You'll need to:

  • Be logged in as an administrator.

  • Replace the variables in the bottom panel with the identifier of your project, the name of the knowledge you're about to create ("API sync FAQ" for instance).

  • Execute the query by clicking the KnowledgeSourceCreate blue button.

  • Write down the identifier of the KnowledgeSource that will appear in the right panel.

Graphql Mutation
mutation KnowledgeSourceCreate(
  $knowledgeSourceCreateInput: KnowledgeSourceCreateInput!
) {
  knowledgeSourceCreate(knowledgeSourceCreateInput: $knowledgeSourceCreateInput) {
    knowledgeSource {
      id
      name
    }
  }
}
Variables
{
  "knowledgeSourceCreateInput": {
    "details": {
      "faqApiSync": {}
    },
    "name": "<name>",
    "projectId": <project-id>
  }
}

If you are requesting our GraphQL API directly, do not forget to first

Step 2: Synchronize your FAQs with us

Now you have a KnowledgeSource, you can add, update or delete items within that source. In order to do this, you'll need to react to events within your system and call our GraphQL API.

Create or update an FAQ item

You can use this mutation, bearing in mind you can submit up to 100 FAQs in a single mutation.

Mutation
mutation KnowledgeFAQsUpsert($input: KnowledgeFAQsUpsertInput!) {
  knowledgeFAQsUpsert(input: $input) {
    upsertedFAQs {
      faqId
      status
    }
  }
}
Variables
{
  "input": {
    "knowledgeSourceId": "<id from step 1>",
    "faqs": [
      {
        "id": "1",
        "question": "How to return a product?",
        "answer": "You must send it to <your address>"
      }
    ],
  }
}

Delete FAQ items

Mutation
mutation KnowledgeFAQsDelete($input: KnowledgeFAQsDeleteInput!) {
  knowledgeFAQsDelete(input: $input) {
    deletedFAQs {
      faqId
      status
    }
  }
}
Variables
{
  "input": {
    "knowledgeSourceId": "<id from step 1>",
    "faqIds": [
      "<FAQ item id from your system to delete>"
    ]
  }
}

by clicking on this link
get your GraphQL token
please follow this link.