function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris Collier 6Chris Collier 6 

Where do I run this Apex to make an HTTP Request?

General beginner question:  We're using Campaign Monitor for mass/transactional emails and want to hook up with the API for transactional emails.  It's easy enough to hook up to their system using process builder or an Apex trigger.  However, these transactional emails go out to the client and it's important that we get a chance to review them first, so I don't want them to send on Insert/Update.  Ideally, I'd like the user to be able to click one button and have a draft sent to them and another button sends to the clients.  This isn't difficult in Apex, I just can't figure out where to call it from.  It's my understanding that buttons can't trigger Apex.  Where would be the best place to call it from?  I thought of hitting their API using an onclick Javascript button but that violates same origin policy and I Campaign Monitor doesn't appear to support JSONP.