Skip to content

Add "Source" cases to "Dialogflow" connector #3953

@M-Shorouk

Description

@M-Shorouk

Is your feature request related to a problem? Please describe.

Currently, Dialogflow as a connector is only reading from "Airy Chat Plugin". As an Airy user, i need to enable Dialogflow when installed on all my "Active" connected sources connected to Airy.

Describe the solution you'd like

  1. Add the following case switch to read different sources Metadata ondialogflow-connector:

if (text != "") {
final ObjectNode node = getNode();
switch (source) {
case "google": {
final ObjectNode representative = getNode();
representative.put("representativeType", "BOT");
node.set("representative", representative);
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "viber": {
node.put("text", text);
node.put("type", "text");
return mapper.writeValueAsString(node);
}
case "chatplugin":
case "instagram":
case "facebook": {
node.put("text", text);
return mapper.writeValueAsString(node);
}
case "twilio.sms":
case "twilio.whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
case "whatsapp": {
node.put("Body", text);
return mapper.writeValueAsString(node);
}
default: {
return null;
}
}
}


## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions