Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to filter leads by field_data or id? #279

Open
phillipmohr opened this issue Mar 20, 2024 · 0 comments
Open

How to filter leads by field_data or id? #279

phillipmohr opened this issue Mar 20, 2024 · 0 comments

Comments

@phillipmohr
Copy link

Which SDK version are you using?

19

What's the issue?

I want to filter leads by id or field_data but I'm getting An unknown error has occurred.

Steps/Sample code to reproduce the issue

const params = {
  // trying to filter a specific lead id
  'filtering' : [{'field':'id','operator':'EQUAL','value':'123456'}],
};
const leadgenFormLeads = await (new LeadgenForm(form.id)).getLeads([
                Lead.Fields.campaign_name,
                Lead.Fields.created_time,
                Lead.Fields.field_data,
                Lead.Fields.form_id
            ], params).then((result) => result.map((lead) => lead._data))

Expected Results:

  • What did you expect to happen?
    getting lead with ID 123456
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant