Interacting with Drift Chat
With Drift's Conversation API, you can directly interact with Drift's messaging system. This allows you to send messages to either the site visitor who is interacting with Drift, or the agent inside of Drift. The options are endless, but here are a few possibilities:
Calculate an auto quote for a site visitor in real time
Scenario
A site visitor comes onto your website and interacts with the Drift bot. The bot grabs their information, calculates an auto insurance quote, and messages it back to the visitor.
How to build it
Drift's playbook asks the users the following questions and maps the responses to attributes on the Drift contact.
- model of their vehicle
- year of their vehicle
- state of registration
- age of individual
When the playbook has collected this information, it reaches the playbook goal quote_reached
.
The Drift integration has a registered webhook for the playbook_goal_met
event. The app receives that the quote_reached
playbook goal was reached.
The app then queries the contact involved in the conversation using the contacts API, and retrieves the saved answers to the above questions.
After doing the secret-sauce quote calculation with the given information, the app then sends a message to the site visitor with the quote information.
Sales Reps enroll prospects into your product immediately
Scenario
Your company wants to onboard customers as fast as possible. When a prospect decides to signup with your product, your sales rep needs to start them with an account with no friction involved.
How to build it
When a prospect tells your sales rep (who is in Drift) that they want to start with an account, your Sales rep types a simple /signup trial
, /signup monthly
, or /signup annual
.
The Drift integration has a registered webhook that listens to all new messages on your Drift instance. When it recognizes that one of your agents just typed a message containing /signup
, it starts processing.
The app then queries the contact involved in the conversation to get the email address. If the email address is not present, then the app posts a private message back to the agent saying that the email address must be collected.
If the email is present, the app creates a new account for the site visitor, emails them a login for the platform, and then posts a message back to both the agent and the site visitor that the new account has been created.
Updated about 5 years ago