This method is used to request message translation from Jacada's Natural Language Processing (NLP) engine. The method passes message data associated with a specified NLP Domain and language and returns the analyzed NLP response.

Jacada Interact integrates the API.AI platform for NLP services. For detailed information on using API.AI platform APIs, see API.AI's API Reference Guide.

Invoking the Method Using REST

URL Syntax and Example

http(s)://[host:port/internalPath]/interact/version/[version]/account/[accountID]/nlp/[domain]/[language code]/message

https://gointeract.io/interact/version/2/account/12345678/nlp/Transportation/en/message

Specific URI Fields

URI Field Data Type Description
domain string Exact name of the NLP Domain
language code string NLP translation language code

HTTP Method
POST

HTTP Headers

SessionId: <NLP session ID>
Content-Type: application/json
Tenant-Id: <account>
Application-Key: <Public API Service application key>
User-Id: <Base 64 encode of username>
User-Password: <Base 64 encode of user password>

The SessionId variable is a unique alphanumeric value required by the NLP engine in order to group together as a continuum all requests and responses that occur during a single user conversation.

When working in a Multi Environment configuration, the Header must include the name of the current environment:

Environment-Name: <environment-name>

HTTP Body

{ "message":"I want to fly to Paris next week" }
URI Field Data Type Description
message string User text to be analyzed

Sample Request

POST /interact/version/2/account/12345678/nlp/Transportation/en/message HTTP/1.1
Host: localhost:8080
SessionID: {sessionID}
Content-Type: application/json
Tenant-Id: {tenantId}
Application-Key: 53736e07e4b05772e6475c2d
User-Id: YWRtaW4=
User-Password: cGFzc3dvcmQ=
{ "message":"I want to fly to Paris next week" }

Expected Responses

Response Scenario Status Code/Header Example Message
Success 200  
No message content 204 No content
Invalid security headers 401
"Unauthenticated-Reason" Header
{
"code":"0x7000000",
"message": "Request is unauthorized, missing or wrong credentials",
"moreInfoUrl":"http://www.jacada.com/support",
}
Bad Request 409 Bad Request
Invalid Vendor Key 422 Invalid Vendor Key
General error (internal error from the Interact server) 500 exception

Invoking the Method Using SOAP

WSDL URL
https:/gointeract.io/interact/version/2/agent/soap/agent.wsdl

Headers

Tenant-Id: <account>
Application-Key: <Public API Service application key>
User-Id: YWRtaW4=
User-Password: cGFzc3dvcmQ=

Input Parameters

The sessionId variable is a unique alphanumeric value required by the NLP engine in order to group together as a continuum all requests and responses that occur during a single user conversation.

Parameter Type Description
language code string NLP analysis language code
domain string Exact name of the NLP Domain
sessionId string NLP user session
message string User text to be analyzed

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://com/jacada/interact/agent/soap">
<soapenv:Header/>
<soapenv:Body>
<soap:GetMessageMeaning>
<soap:version>2</soap:version>
<soap:accountid>12345678</soap:accountid>
<soap:lang>en</soap:lang>
<soap:domain>Transportation</soap:domain>
<soap:sessionId>jp3457</soap:sessionId>
<soap:messageDetails>
<soap:message>"I want to fly to Paris next week"</soap:message>
</soap:messageDetails>
</soap:GetMessageMeaning>
</soapenv:Body>
</soapenv:Envelope>

Expected Responses

Response Scenario Example Message
Success <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns2:GetMessageMeaning xmlns:ns2="http://com/jacada/interact/agent/soap">
            <ns2:message>message: Success</ns2:message>
         </ns2:GetMessageMeaning>
     </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
No content <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
        <ns2:GetMessageMeaning xmlns:ns2="http://com/jacada/interact/agent/soap">
            <ns2:uniqueId>No content <parameter></ns2:uniqueId>
        </ns2:GetMessageMeaning>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Invalid security headers <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
     <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>0x7000000</faultcode>
            <faultstring>Request is unauthorized, missing or wrong credentials</faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
General error (internal error from the Interact server) exception (in XML format)

Revision:

Comments