From version 8.14, Conducttr is able to analyse the sentiment of any text message.
To do this we send the message to Amazon Comprehend and return Amazon's analysis in an Inventory (array) attribute.
Consequently, to use this feature in Conducttr you'll need the Logic action "Sentiment Action" and then the Inventory trigger which will fire when the result is returned from Amazon.
During testing with low loading you'll find that the result is instantaneous but we adopted this two-stage approach for highly loaded projects that process many 1000s of messages.

Worked Example

This example has two scenes - the first parses a text message from an incoming email and sends the text for sentiment analysis; the second scene collects the results and sends to Slack.



1. create the the Sentiment Action

 





Note that an inventory attribute is always needed as you'll see that Amazon returns 5 data points per message.

2. create the trigger

The sentiment trigger is a like the Publish trigger in the sense that it is matched to a particular action.


3. publish the results


Note that the results are saved in a multi-dimensional array. There are 4 values that represent the confidence in the assessment: neutral, negative, positive, mixed and the 5th is assessment with the highest confidence which we've called sentiment.



d