BUILDING BLOCKS SERVICE BOT Slack API • Oauth 2.0 • Events API • postMessage • Interactive Messages • chat Update AWS • Lambda • API Gateway • AWS IoT • Dynamo DB
BUILDING BLOCKS
SERVICE BOT
Slack API
• Oauth 2.0
• Events API
• postMessage
• Interactive Messages
• chat Update
AWS
• Lambda
• API Gateway
• AWS IoT
• Dynamo DB
HIGHLIGHTS
• Server less –Ease of deployment
• Event driven, Stateless – Highly scalable
• Real time User Experience – 3 seconds max
• Secure – Slack Auth + AWS IAM
GOALS
• Best Practices from Slack and AWS
• Robust to handle “Real world scenario”
STEP 1 :
SERVICE ALERT
MQTT Client
aws IoT Rule –Temperature > 33 0 C
Invoke action : Lambda
aws Lambda
Slack Web API postMessage
slack Team
Channel – site-engineers attachment
Enterprise
Software
Provision
aws DynamoDB
Register case AWS SDK DynamoDB
Real time, contextual data
STEP 2 :
VENDOR QUOTES
Site Engineer
responds
“Yes” in chat
Slack call back Events API
aws Lambda
Slack Events API
process Response postMessage
aws DynamoDB
Get session data AWS SDK DynamoDB
Enterprise
Software
Provision
slack Team
Channel – site-engineers attachment
message buttons
STEP 3 :
ENGINEER RECOMMENDS
Site Engineer
responds clicks
“Recommend”
on preferred
vendor
Slack calls via Interactive
Messages
aws Lambda
aws DynamoDB
Get session data AWS SDK DynamoDB
Enterprise
Software
Provision
slack Team
Channel – site-engineers attachment
• Remove message buttons
• Add text
postMessage
Async invoke
chat Update
(with handle of time
stamp)
First response
within 3 sec
slack Team
Channel – buyer attachment
• message buttons
STEP 4 :
BUYER RECOMMENDS
Buyer
• Reviews Engineering
preference
• Clicks “Recommend” on
his preferred vendor
Slack calls via Interactive
Messages
Enterprise
Software
Provision
slack Team
Channel –operations-managers attachment
message buttons
chat Update