Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

Code Block
themeEclipse
languagejs
titleCalling a Custom Activity from JavaScript
linenumberstrue
<!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>

...

Activities Logged on Prospect Profiles

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. 

Managing Custom Activities

To manage your Custom Activities navigate to Admin > App Setup > Custom Activities

Triggering Actions from Custom Activities

...