Functions (beta)
Papercups now allows you to write custom scripts to be executed on our webhook events.
Examples#
Below are some examples of common use cases for taking advantage of Papercups Functions.
The code below will just include the handleMessageCreated logic, and omit the boilerplate:
Respond to test messages#
If a user sends a message that starts with the string test (e.g. Test, testing, test test test), respond with Success!.
Direct users to your pricing page#
If a user sends a message that includes the string pricing?, reply with a link to the pricing page.
Assign agents based on context#
If a user sends a message that includes the string sales, automatically assign the conversation to the salesperson on the team.
Coming soon#
caution
Some of the methods below are currently in alpha, but will be publicly available soon!
Send alerts triggered by messages from premium users#
When your team receives messages from premium customers, you can trigger alerts to Slack/SMS/email so that someone can respond right away.
Schedule an away message to be sent#
If no one from your team is able to respond to a new message within 2 minutes, send an away message.