How to add "Marketo Send Email" Mass Action to a Skuid Table?

edited September 10, 2017 in Questions
I use a 3rd party app, Marketo, to send mass emails to my Contacts and Leads. This app includes an On-Click JavaScript List Button called "Send Marketo Email" that shows up on standard Salesforce List Views, that lets me choose records to send emails to, and then, when I click the button, it runs the On-Click JavaScript, which takes the Contact/Lead Ids, puts them into a String, and sends this string into the URL of a Marketo Visualforce Page. How do I replicate this with Skuid, as a Mass Action in a Skuid Table on Contacts (or Leads)?


  • edited March 2, 2017
    Here is how to replicate this with a Skuid Mass Action. 1. Add a new JavaScript Resource of type "Inline (Snippet)" to your Skuid Page. For Snippet Name put "sendMarketoEmail". For Snippet Body, copy in this code:
        // Get the Ids of the selected items as an Array  var idsArray = skuid.$.map(arguments[0].list.getSelectedItems(),function(item){      return item.row.Id;   });  // Convert this array to a comma-separated String  var idsString = idsArray.join(',');  // Encode the string  var encodedIdsString = encodeURIComponent(idsString);    // Redirect to the Marketo Send Email to Contacts page,  // passing in the Contact Ids string = "/apex/mkto_si__Send_Marketo_Email?contactType=Contact&contactIds=" + encodedIdsString +"&retUrl=" + encodeURIComponent(document.location.href);      
    2. Add a Mass Action, of type "Custom", to your Skuid Contacts Table. For Label: "Send Marketo Email" (or whatever you want) For Icon, I recommend "ui-silk-email-go" For Snippet Name: "sendMarketoEmail" 3. Save your page, Preview, and you're done!
  • edited July 28, 2015
    Hi Zach,

    Here we have Similar  problem, 
    List button  from managed package( mailchimp), it navigate like screens below

    S1: After selecting multiple records, when we click on Mailchimp button it redirect to screen2.

    S2: after subscription, when we click on "back to list" then it will redirect to screen1 (tab).

    Here is the page Url:

    What type of parameters can i pass here(above url)?

    How can I achieve this functionality?

    Please help me out!

  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    It looks to me as though your page URL is not complete.  This may be becauise you did not select any records,  or only selected one that had an email address. I say that because the "Lists" section of the export does not have any names populated.   If you select a series of valid records (ones that have email addresses)  is the page different,  do you get a comma separated array in the URL?  
  • edited July 28, 2015
    Hi Rob,

    Thanks for you reply, It give same URL :(






    VF Page from Managed packaging 

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!