Sticky For Query Operators

It needs to be an array of ID Numbers, you have them enclosed in double quotes.

Try the following:

$results = Infusionsoft_DataService::query( new Infusionsoft_Contact(), array(‘Id’ => array(39136, 38977) ), 1000,0, array(‘Id’,‘FirstName’,‘LastName’) );

Right, as stated, surrounding the array in quotes is a type violation

This is correct. The NovakSolutions SDK takes an array of ID integers for the IN statement and builds the request correctly from that.

That great guys, I just had to do an integer cast when adding the ids to the array like this:

$infusionsoft_ids = (int)$booking[“infusionsoft_id”];

and then, using the array as Pav said:

$results = Infusionsoft_DataService::query( new Infusionsoft_Contact(), array(‘Id’ => $infusionsoft_ids ) );

It works now, thank you all.

Hey guys!

I am having a lot of trouble with the exact topic you are talking about. Basically I have a list of tag id’s, and I want to find which ones out of that list a contact has, this was the query that I am using, simple in postman(The application I am creating is a Jira Service Desk Plugin.)

<methodCall>
   <methodName>DataService.query</methodName>
   <params>
     <param>
       <value><string>xxxxxxxxxxxxxxxx</string></value>
     </param>
     <param>
       <value><string>ContactGroupAssign</string></value>
     </param>
     <param>
       <value><int>1000</int></value>
     </param>
     <param>
       <value><int>0</int></value>
     </param>
     <param>
       <value><struct>
         <member><name>GroupID</name>
           <value><string>[165,301,167,109]</string></value>
           
         </member>
         
         <member><name>contactID</name>
           <value><string>9391</string></value>
         </member>
       </struct></value>
     </param>
     <param>
       <value><array>
         <data>
           <value><string>ContactGroup</string></value>
           <value><string>GroupID</string></value>
          
         </data>
       </array></value>
     </param>
    
   </params>
 </methodCall>

The in method would accomplish that correct? But whenever I try to send that request, it always comes back with nothing… Unless I am doing this wrong. I can do it by sending 60 calls, but that is very expensive(every single time someone views an issue, it would be firing off ~70(the full list of valid tag ID’s) calls, which is not the most efficient thing…

Any ideas?

Hi @Jacob_Turley,

While there a some tables that both letters in Id are caps, this is not one of them. Change GroupID to GroupId and contactID to ContactId (cap first letter as well).

Still no go in postman.

After saying just screw it and trying it in java, it worked(passing a list into a map). So not sure how to do it in postman, but my end-game isn’t postman. So yeah. Got it to work in java.

I changed those things and still no-go in postman

yeah, you had to cap contact as well…i only now changed it. the api would not have returned anything either way then.

Hey @Jacob_Turley the examples are in php however the xml would be formatted like this (Also changed the GroupID to GroupId as talked about earlier):

<methodCall>
   <methodName>DataService.query</methodName>
   <params>
     <param>
       <value><string>xxxxxxxxxxxxxxxx</string></value>
     </param>
     <param>
       <value><string>ContactGroupAssign</string></value>
     </param>
     <param>
       <value><int>1000</int></value>
     </param>
     <param>
       <value><int>0</int></value>
     </param>
     <param>
       <value><struct>
         <member><name>GroupId</name>
    	<value><array><data>
      		<value><int>165</int></value>
    		<value><int>301</int></value>
    		<value><int>167</int></value>
    		<value><int>109</int></value>
    	</data></array></value>                
         </member>             
         <member><name>contactID</name>
           <value><string>9391</string></value>
         </member>
       </struct></value>
     </param>
     <param>
       <value><array>
         <data>
           <value><string>ContactGroup</string></value>
           <value><string>GroupID</string></value>              
         </data>
       </array></value>
     </param>        
   </params>
 </methodCall>

Is there an operator for “NOT LIKE” search? I am looking for “not equal to” with wildcard support.

I tried “~<>~ %abc” but didn’t work.