Results 1 to 6 of 6
  1. #1

    Assigning Follow-up Sequences to Pre-Tagged Clients

    Hey Chaps,

    The included code (to my knowledge) defines a client and a tag, then applies the tag to the client. Then it defines a follow-up sequence and applies that follow up sequence to the client.

    How would I add a follow-up sequence to everyone already containing a certain tag?


    Variables used in the code:
    $cid = the client
    $groupId = the tag
    grpAssign = assigns tags to clients
    $campId = the follow-up sequence
    campAssign = assigns follow-up sequence to clients

    PHP Code:
    <?php
    require("isdk.php");  
    $app = new iSDK;echo "connected<br/>";$app->cfgCon("connectionName");    echo "app connected<br/>";
    $cid=36;
    $groupId =116;$result $app->grpAssign($cid$groupId);echo "tag added<br/>";
    $campId 83;$result $app->campAssign($cid$campId);echo "FUS added<br/>";?>

  2. #2

  3. #3
    Based on the code from the docs,
    "FirstName" works, but I'm not getting any results with "Tag", or "Tags" or "Group"

    How would I query a tag?

    $returnFields = array('Id','Tag');
    $query = array('Tag' => 'NewMember');
    $contacts = $app->dsQuery("Contact",10,0,$query,$returnFields);
    print_r($contacts);

  4. #4

    Join Date
    Jul 2011
    Location
    England, UK
    Posts
    928
    The "ContactGroupAssign" table contains a list of all the tags assigned to contacts.
    http://help.infusionsoft.com/develop...actgroupassign

    So to query which contacts are assigned Tag ID: 123, here is an example:

    $returnFields = array('ContactId','Contact.FirstName','Contact.Las tName');
    $query = array('GroupId' => 123);
    $contacts = $app->dsQuery("ContactGroupAssign",10,0,$query,$returnF ields);
    print_r($contacts);

    Just for reference, the "Contact" table "Groups" field contains a comma separated list of the assigned tags to the contact. But is more difficult to query.

    Hope that helps.

  5. #5

    Join Date
    May 2012
    Location
    A, A
    Posts
    28
    Thanks for this very useful information. This is much easier than working with the comma values in the Contact table. I do have a question. How do we echo out the Contact.Value? It does not seem to work in a foreach loop. print_r works fine so I know the query is working.

    Code:
    foreach($data as $item) {
        echo "<a href=mailto:" . $item[Contact.Email] . ">" . $item[Contact.Email] . "</a>\n";        
    }

  6. #6

    Join Date
    May 2012
    Location
    A, A
    Posts
    28
    figured it out. forgot quotes: $item['Contact.Email']

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •