Question

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

  • 6 October 2021
  • 0 replies
  • 20 views

Userlevel 2
Badge

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


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved