When a Lead Assignment Rule contains criteria based on Campaign fields (for example, Campaign: Type equals Advertisement), the rule is not triggered when a Lead is created through Lightning Experience, REST API, Apex, or the Data Import Wizard. This is expected behavior due to the architecture of the Lead-Campaign relationship in Salesforce.
Campaign is not a native field on the Lead object. Campaign membership is stored in CampaignMember records, which represent a many-to-many relationship between Leads and Campaigns. Lead Assignment Rules evaluate only fields available directly on the Lead record at rule execution time.
For Leads created via UI, REST API, or Apex, Campaign cannot be set on the Lead during creation. Subsequent rule re-evaluations also lack Campaign context because there is no CampaignId lookup field on the Lead object.
The only supported path that passes Campaign context at create time is the SOAP API, which includes a Campaign_Id parameter, or Leads created through Web-to-Lead.
Other ways that Leads can be assigned by Campaign association:
005386895

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.