Functions (beta)
Papercups now allows you to write custom scripts to be executed on our webhook events.
#
ExamplesBelow 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 messagesIf 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 pageIf a user sends a message that includes the string pricing?
, reply with a link to the pricing page.
#
Assign agents based on contextIf a user sends a message that includes the string sales
, automatically assign the conversation to the salesperson on the team.
#
Coming sooncaution
Some of the methods below are currently in alpha, but will be publicly available soon!
#
Send alerts triggered by messages from premium usersWhen 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 sentIf no one from your team is able to respond to a new message within 2 minutes, send an away message.