Skip to main content
Question

How can I search for a Marketing Campaign based on an attribute?


Forum|alt.badge.img

I’m working on importing leads using a webhook. I can get all the lead data to insert into acumatica but we have a requirement to set the Source Campaign of the lead depending on which one of our websites the lead comes from.  I’ve added an attribute on the Marketing Campaigns called LEADWEBSIT.  I want to use the website address to search for the correct Marketing Campaign based on the value in the LEADWEBSIT attribute.  For example the website the lead comes from could be 

https://ourmainsite.com/contact-us/ or it could be https://ourmainsite.com/demo-survey/

The LEADWEBSIT value would just be ourmainsite.  We want to find the Marketing Campaign where the attribute value in LEADWEBSIT is in the address the lead came in from.

I know how to do a search like this:

				var campaignGraph = PXGraph.CreateInstance<CampaignMaint>();
				CRCampaign campaign = campaignGraph.Campaign.Search<CRCampaign.campaignID>("1");

But I’m not sure how to search on an attribute and how to search using a like query instead of an equals query.

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings