LivePerson Functions' lambdas can be connected to LiveEngage events at the time of creation. Once those lambdas are deployed, they will be executed whenever these events are triggered. Each event comes with a set of connected templates that can be used as an initial scaffolding for the developing the lambda. Note that the amount of lambdas connected to a specific event is restricted and can be seen in the table below.

Currently the following events are supported:

Event Name Event Description Lambda Limit
Chat Post Survey E-Mail Transcript Triggered after a chat conversation is finished and CSAT survey has been submitted. 10
Messaging New Conversation Triggered for every new messaging conversation. 1
Messaging Participants Change Triggered on every participant change (joins/leaves) of a messaging conversation. 1
Messaging TTR Triggered when the consumer marks a response as an urgent response, unmarks a response as urgent, or the agent manually updates the response time 1
Messaging Conversation Idle Triggered when agent/consumer is not responsive or the conversation is in queue for over X secs/mins. Where Time X is configurable inside the LiveEngage UI, via the auto-messages feature. 1
Messaging Conversation Routing Triggered when the conversation is transferred to a different skill. 1
Messaging Line in Off-Hours Triggered when a consumer writes a message to a conversation that started in working hours, but is now in off-hours. 1
Messaging Conversation End Triggered when the conversation is closed by agent/consumer. 1
Messaging Survey Started Triggered when a messaging post survey started. 1
Messaging Survey Ended Triggered when a messaging post survey ended. 1

Each of these events also has an event specific input (payload) associated with it, that the triggering system will provide at runtime. When using the Invoke screen, this payload is shown on the left-hand side. During development, the event payload of the lambda is visible on the right-hand side at the sidebar-tab. See the Payload section for more information.

Additionally, Functions offers a number of templates that are not connected to events and can be used as a sample to kick-start the development of custom scenarios:

Template Name Template Description
Greeting Template A simple "Hello World" example
HTTP Template An example of how to execute a HTTP request.
Logging Template An example of how to write logs during lambda execution.
Salesforce Template An example of how to connect to Saleforce.
Secret Storage Template An example of how to use the Secret Storage.
Email Client Template An example of how to use SMTP client.