1

If I want to use Salesforce's REST API to return campaigns who have recently had members added to them, what is the easiest way to do so? I am trying to do this externally, using authentication information to pull data from Salesforce in a different application. Is using Campaign.SystemModstamp the best way to achieve this?

2 Answers 2

1

Not necessarily. This flag can be updated for any of a number of reasons (e.g. a user edited a field). Instead, a query might help:

SELECT Id FROM Campaign WHERE Id IN 
  (SELECT CampaignId FROM CampaignMember WHERE CreatedDate = TODAY)

(Replace TODAY with any other date literal or a specific date range).

1
  • This accomplishes what I'm looking for with a well-designed query. It wasn't immediately obvious to me how to access this data using the correct filter. Many thanks!
    – bearoplane
    May 23, 2020 at 2:38
0

No code needed for this. Go to Workflow Rules -> add a new Worklflow rule when a member is added to a campaign. In the rule criteria put NOT(ISBLANK( ContactId ))​ Send email Alert that includes the member name see screen snap enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .