Updates the specified answer record.

Scopes

You will need authorization for at least one of the following scopes to make a valid call:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/dialogflow

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: dialogflow2-beta1 --scope <scope> projects answer-records-patch ...

Required Scalar Argument

  • <name> (string)
    • The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: projects//locations//answerRecords/.

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

GoogleCloudDialogflowV2beta1AnswerRecord:
  agent-assistant-record:
    article-suggestion-answer:
      answer-record: string
      metadata: { string: string }
      snippets: [string]
      title: string
      uri: string
    dialogflow-assist-answer:
      answer-record: string
      intent-suggestion:
        description: string
        display-name: string
        intent-v2: string
      query-result:
        action: string
        all-required-params-present: boolean
        cancels-slot-filling: boolean
        fulfillment-text: string
        intent:
          action: string
          default-response-platforms: [string]
          display-name: string
          end-interaction: boolean
          events: [string]
          input-context-names: [string]
          is-fallback: boolean
          live-agent-handoff: boolean
          ml-disabled: boolean
          ml-enabled: boolean
          name: string
          parent-followup-intent-name: string
          priority: integer
          reset-contexts: boolean
          root-followup-intent-name: string
          webhook-state: string
        intent-detection-confidence: number
        language-code: string
        query-text: string
        sentiment-analysis-result:
          query-text-sentiment:
            magnitude: number
            score: number
        speech-recognition-confidence: number
        webhook-source: string
    faq-answer:
      answer: string
      answer-record: string
      confidence: number
      metadata: { string: string }
      question: string
      source: string
  answer-feedback:
    agent-assistant-detail-feedback:
      answer-relevance: string
      document-correctness: string
      document-efficiency: string
      knowledge-search-feedback:
        answer-copied: boolean
        clicked-uris: [string]
      summarization-feedback:
        start-timestamp: string
        submit-timestamp: string
        summary-text: string
        text-sections: { string: string }
    click-time: string
    clicked: boolean
    correctness-level: string
    display-time: string
    displayed: boolean
  name: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r .agent-assistant-record.article-suggestion-answer answer-record=sea
    • The name of answer record, in the format of "projects//locations//answerRecords/"
  • metadata=key=ipsum
    • A map that contains metadata about the answer and the document from which it originates.
    • the value will be associated with the given key
  • snippets=stet
    • Output only. Article snippets.
    • Each invocation of this argument appends the given value to the array.
  • title=gubergren
    • The article title.
  • uri=ipsum

    • The article URI.
  • ..dialogflow-assist-answer answer-record=no

    • The name of answer record, in the format of "projects//locations//answerRecords/"
  • intent-suggestion description=sit
    • Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
  • display-name=kasd
    • The display name of the intent.
  • intent-v2=amet

    • The unique identifier of this intent. Format: projects//locations//agent/intents/.
  • ..query-result action=lorem

    • The action name from the matched intent.
  • all-required-params-present=false
    • This field is set to: - false if the matched intent has required parameters and not all of the required parameter values have been collected. - true if all required parameter values have been collected, or if the matched intent doesn't contain any required parameters.
  • cancels-slot-filling=false
  • fulfillment-text=nonumy
    • The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, fulfillment_messages should be preferred.
  • intent action=sea
    • Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.
  • default-response-platforms=ipsum
    • Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
    • Each invocation of this argument appends the given value to the array.
  • display-name=kasd
    • Required. The name of this intent.
  • end-interaction=false
    • Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
  • events=erat
    • Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.
    • Each invocation of this argument appends the given value to the array.
  • input-context-names=clita
    • Optional. The list of context names required for this intent to be triggered. Formats: - projects//agent/sessions/-/contexts/ - projects//locations//agent/sessions/-/contexts/
    • Each invocation of this argument appends the given value to the array.
  • is-fallback=false
    • Optional. Indicates whether this is a fallback intent.
  • live-agent-handoff=false
    • Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
  • ml-disabled=false
    • Optional. Indicates whether Machine Learning is disabled for the intent. Note: If ml_disabled setting is set to true, then this intent is not taken into account during inference in ML ONLY match mode. Also, auto-markup in the UI is turned off.
  • ml-enabled=false
    • Optional. Indicates whether Machine Learning is enabled for the intent. Note: If ml_enabled setting is set to false, then this intent is not taken into account during inference in ML ONLY match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use ml_disabled field instead. NOTE: If both ml_enabled and ml_disabled are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml_enabled = false / ml_disabled = true. - After April 15th, 2018 the default is: ml_enabled = true / ml_disabled = false.
  • name=erat
    • Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - projects//agent/intents/ - projects//locations//agent/intents/
  • parent-followup-intent-name=dolores
    • Optional. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: projects//agent/intents/.
  • priority=51
    • Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
  • reset-contexts=false
    • Optional. Indicates whether to delete all contexts in the current session when this intent is matched.
  • root-followup-intent-name=elitr
    • Output only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. Format: projects//agent/intents/.
  • webhook-state=consetetur

    • Optional. Indicates whether webhooks are enabled for the intent.
  • .. intent-detection-confidence=0.22742452234454613

    • The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are multiple knowledge_answers messages, this value is set to the greatest knowledgeAnswers.match_confidence value in the list.
  • language-code=sit
    • The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes.
  • query-text=takimata
    • The original conversational query text: - If natural language text was provided as input, query_text contains a copy of the input. - If natural language speech audio was provided as input, query_text contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If automatic spell correction is enabled, query_text will contain the corrected user input.
  • sentiment-analysis-result.query-text-sentiment magnitude=0.8515000086396851
    • A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
  • score=0.4616683384260818

    • Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
  • ... speech-recognition-confidence=0.7445623591108219

    • The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular this field isn't set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult.
  • webhook-source=diam

    • If the query was fulfilled by a webhook call, this field is set to the value of the source field returned in the webhook response.
  • ...faq-answer answer=diam

    • The piece of text from the source knowledge base document.
  • answer-record=sed
    • The name of answer record, in the format of "projects//locations//answerRecords/"
  • confidence=0.8482432711830777
    • The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
  • metadata=key=ea
    • A map that contains metadata about the answer and the document from which it originates.
    • the value will be associated with the given key
  • question=dolore
    • The corresponding FAQ question.
  • source=ipsum

    • Indicates which Knowledge Document this answer was extracted from. Format: projects//locations//agent/knowledgeBases//documents/.
  • ...answer-feedback.agent-assistant-detail-feedback answer-relevance=ea

    • Optional. Whether or not the suggested answer is relevant. For example: * Query: "Can I change my mailing address?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * answer_relevance: AnswerRelevance.IRRELEVANT
  • document-correctness=at
    • Optional. Whether or not the information in the document is correct. For example: * Query: "Can I return the package in 2 days once received?" * Suggested document says: "Items must be returned/exchanged within 60 days of the purchase date." * Ground truth: "No return or exchange is allowed." * [document_correctness]: INCORRECT
  • document-efficiency=sit
    • Optional. Whether or not the suggested document is efficient. For example, if the document is poorly written, hard to understand, hard to use or too long to find useful information, document_efficiency is DocumentEfficiency.INEFFICIENT.
  • knowledge-search-feedback answer-copied=false
    • Whether the answer was copied by the human agent or not. If the value is set to be true, AnswerFeedback.clicked will be updated to be true.
  • clicked-uris=lorem

    • The URIs clicked by the human agent. The value is appended for each UpdateAnswerRecordRequest. If the value is not empty, AnswerFeedback.clicked will be updated to be true.
    • Each invocation of this argument appends the given value to the array.
  • ..summarization-feedback start-timestamp=stet

    • Timestamp when composing of the summary starts.
  • submit-timestamp=duo
    • Timestamp when the summary was submitted.
  • summary-text=elitr
    • Text of actual submitted summary.
  • text-sections=key=aliquyam

    • Optional. Actual text sections of submitted summary.
    • the value will be associated with the given key
  • ... click-time=erat

    • Time when the answer/item was clicked.
  • clicked=false
    • Indicates whether the answer/item was clicked by the human agent or not. Default to false. For knowledge search, the answer record is considered to be clicked if the answer was copied or any URI was clicked.
  • correctness-level=et
    • The correctness level of the specific answer.
  • display-time=lorem
    • Time when the answer/item was displayed.
  • displayed=true

    • Indicates whether the answer/item was displayed to the human agent in the agent desktop UI. Default to false.
  • .. name=et

    • The unique identifier of this answer record. Required for AnswerRecords.UpdateAnswerRecord method. Format: projects//locations//answerRecords/.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p update-mask=string
    • Required. The mask to control which fields get updated.

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").