Overview
Custom Activities track any type of activity imaginable, and can be triggered from JavaScript or from the API. Examples of Custom Activities could be:
- Logging unique activity (phone calls, pizza orders, etc.)
- Logging preferences/interests
- Logging website engagement (button clicks, link clicks, etc.)
Creating a Custom Activity
To create a Custom Activity do the following:
- Navigate to Admin > App Setup > Custom Activities
- Click the New button
- Fill out the form
- Name = Name of your custom activity
- Identifier = Value used for the API or in JavaScript
- Description = Description of your custom activity
- Icon = Icon you'd like to use to associate with your custom activity. The icon will appear on pages such as the Prospect Profile page. You can keep your icon in the Media Manager.
- Type = Inbound/Outbound. Used to log the activity as an inbound activity or outbound activity. Activities are explained in more detail here.
- Add Custom Activity Fields
- Name = Name of the field
- Identifier = Value used to identify the field
- Field Type = Data type of the field (date, string, etc.). Note, multi-picklist data types are not currently supported.
- Required = Is the field required when the activity is called/logged?
- Add Custom Activity Fields
- In the example below, we're logging details of a customer's pizza order. When they order their pizza, the details of their order (price, size, delivery date, etc.) would be logged on their profile. We could easily add additional data points, such as Delivery Type (Takeout, Delivery), Crust (Thin, Deep Dish) in the activity by adding more Custom Activity Fields.
Triggering Actions from Custom Activities
Trigger any combination of activities using Fulfillment Actions when a Custom Activity is called. Simply click Actions under the Actions menu to invoke a Fulfillment Action and set it up.
Calling Custom Activity via JavaScript
The code example below is JavaScript that could be added to a page to invoke a custom activity. In this example, we're logging a custom activity when a pizza is ordered. The activity is logged when a button is clicked on the web page. Your activity could be logged in multiple ways (scroll, input, etc.). Work with your web programmer to invoke your custom activity.
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="description" content="%%description%%" /> <title>%%title%%</title> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script> //The activity is logged on button click. $(document).ready(function(){ $('#my_activity_button').on ('click', function (){ //START: This is the code to log the custom activity ll_api.log_prospect_activity ({ activity_identifier: 'ordered_pizza__c', activity_info: 'Ordered one stuffed crust pizza with extra cheese', activity_fields: { price__c: '13.5', size__c: 'Large', delivery_date__c: '2016-11-20' } }, function (response){ console.log (response) //{success: 1, message: "Success"} }); //END: This is the code to log the custom activity }) }) </script> </head> <body> %%content%% </body> </html>
Viewing Custom Activities
Custom activities along with their details get logged into a Prospect's Profile. In the example below, we can see the pizza order that was logged when the prospect clicked a button on the web page.
Using Custom Activity Data as Criteria
Lead Liaison makes it easy to use Custom Activity data in automations, segmentations, etc. as criteria. Last Custom Activity Date and Assigned Custom Activity are two criteria that can be used in the system. Note, this criteria is available for Prospects clicking Tracking URLs created after November 20th, 2016.