To develop a component for Virtual Agent, add specific properties and actions to interact with the Virtual Agent client interface. The properties required depend on the type of component you are creating.

Before you begin

Procedure

  1. In your component code, add the Virtual Agent properties to interact with the Virtual Agent client interface.
    Table 1. Virtual Agent component properties
    Property Description
    controlData Initial data that the Virtual Agent server sends to your component as the topic runs.

    Data type: JSON Object

    responseValue Data sent to the component from the user's response, either from the client directly, or from the server if there is a refresh. Only use in components that require user input.

    Data type: JSON Object

    forceCloseControl Flag that indicates whether the component can accept input. When true, the control closes and the user cannot interact with it. Monitor changes on the client to update this value. Only use in components that require user input.

    Data type: Boolean

  2. If creating an input component, use the VA_CONTROL#VALUE_SENT action to send user values to the server.
    Table 2. Virtual Agent component actions
    Action Description
    VA_CONTROL#VALUE_SENT Response data from the client to send to the server. Only use in components that require user input.

    Data type: JSON Object

What to do next

Test a component for Virtual Agent and Deploy a component to an instance.