In part 1 of this blog post series, we introduced sentiment analysis and how we can use Integration Builder to extract the text from our data source, make a call to Amazon Comprehend natural language processing (NLP) service, through API Builder, to determine the sentiment and send a notification to the appropriate stakeholder in Microsoft Teams. In part 1, we looked at the Net Promoter Score (NPS) survey example. In this post, we’ll look at detecting the sentiment in a Note in a Salesforce.com Opportunity.

Setup

The diagram below illustrates the flow of data:

  • Data flowWe’ll configure an Integration Builder Salesforce connector for Webhook events, monitoring the Notes object
  • We’ll create a flow that is triggered on Events
  • We’ll use the API Builder Detect Sentiment connector we created in part 1 to detect the sentiment of the note
  • If the sentiment is determined to be negative or mixed, we’ll send a notification to Microsoft Teams, as shown below:

Microsoft Teams notificationNote that the information in the notification contains the sentiment, the contents of the note, the account name, and a link to the note.

Integration Builder Salesforce Sales Cloud Connector

Follow the instructions here to configure Webhooks in your Salesforce account.

When you’re done, instantiate a Salesforce Sales Cloud connector in Integration Builder and make sure you enable events and select Webhook (instead of polling) and enter Note in the Object to Monitor for Changes as shown below:

Connector configuration

Note that you don’t need to enter the Webhook URL. Integration Builder will populate that field automatically when you authenticate.

Integration Builder Flow

In this section, we’ll create our Integration Builder flow. You can download the flow here.

The resulting flow is shown below:

Integration builder flow

  • Create a new flow and select Event as the trigger type. I entered crm as the connector variable name during creation. Refer to this post if you don’t recall how to accomplish this.
  • Add two value variables to your flow template:
  • crmBaseAddress - this is the base address of your Salesforce instance
  • msTeamsWebhookURL - this is the URL of your MS Teams Webhook

#integration #salesforce #sentiment analysis #axway #data analysis

Axway Integration Builder in a Sentiment Analysis Application
1.35 GEEK