Skip to main content

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.

Be the first to reply!

Reply