APIs & Integrations

pawanarora
メンバー

Issue in creating Dynamic Contact List by using filterFamily

Hi Community,

I am trying to create a dynamic contact list by passing the following:

$registered_input = array(
"name" => "Testing Event - Registered",
"dynamic" => true,
"portalId" => $this->portal,
"filters" => array(
array(
array(
"operator" => "INTEGRATIONS_TIMELINE_EVENT",
"filterFamily" => "IntegrationsTimeline",
"integrationsTimelineFilter" => array(
            "eventTypeId" => $this->timeline_registration_event,
            "filterLines" => array(

                      array(
                                "filter" => array(
                                          "operator" => "EQ",
                                          "strValue" => $event_id,
                                          "property" => "event_id",
                                          "type" => "string",
                                          "filterFamily" => "IntegrationsTimeline"
                                )
                      ),
                      array(
                                "filter" => array(
                                "operator" => "EQ",
                                "strValue" => "Registered",
                                "property" => "event_registration_status",
                                "type" => "string",
                                "filterFamily" => "IntegrationsTimeline"
                      )
            )
)
)
)
)
)
);

Also, this is in array format but passed as JSON string as follows:

"contacts/v1/lists?hapikey=". $this->hapikey, $registered_input_in_json

 

It is creating a contact list but by filtering with event id only and it is not filtering with event_registration_status property. These both properties belong to Timeline.

 

Please advise me to fix it.

 

Thanks and regards,

Pawan Arora

 

 

 

0 いいね!
3件の返信
Teun
名誉エキスパート | Diamond Partner
名誉エキスパート | Diamond Partner

Issue in creating Dynamic Contact List by using filterFamily

Instead of passing it multiple filters, try passing it multiple filtergroups as described in the docs.

 

When multiple filters are provided within a filterGroup, they will be combined using a logical AND operator. When multiple filterGroups are provided, they will be combined using a logical OR operator. The system supports a maximum of three filterGroups with up to three filters each.

 

So in your case, passing it multiple filterlines instead of filtergroups might be the fix?



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


Teun
名誉エキスパート | Diamond Partner
名誉エキスパート | Diamond Partner

Issue in creating Dynamic Contact List by using filterFamily

Hi @pawanarora ,

 

Do you have a link to the docs regarding this API? I checked the V1 Lists API but I do not see the right operator that you are using.
I do know that when you are passing multiple filters, you need to define how they should behave, if they should be used as OR or AND.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


pawanarora
メンバー

Issue in creating Dynamic Contact List by using filterFamily

Hi @Teun 

 

Sorry for late reply.

I have already gone through V1 Lists API but I did not see there how to filter the contact list by using property (token) used in timeline event template. That is - 

"filterLines" => array(

                      array(
                                "filter" => array(
                                          "operator" => "EQ",
                                          "strValue" => $event_id,
                                          "property" => "event_id",
                                          "type" => "string",
                                          "filterFamily" => "IntegrationsTimeline"
                                )
                      ),
                      array(
                                "filter" => array(
                                "operator" => "EQ",
                                "strValue" => "Registered",
                                "property" => "event_registration_status",
                                "type" => "string",
                                "filterFamily" => "IntegrationsTimeline"
                      )
            )

Here, both event_id and event_registration_status are properties used in timeline event template.

 

So, please advise me how I can fix this issue.

 

Thanks and regards,

Pawan Arora 

 

0 いいね!