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:
    $app = new iSDK;echo "connected<br/>";$app->cfgCon("connectionName");    echo "app connected<br/>";
    $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);

  4. #4
    The "ContactGroupAssign" table contains a list of all the tags assigned to contacts.

    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);

    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
    bobbydc's Avatar
    Join Date
    May 2012
    St Augustine, FL
    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.

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

  6. #6
    bobbydc's Avatar
    Join Date
    May 2012
    St Augustine, FL
    figured it out. forgot quotes: $item['Contact.Email']


Posting Permissions

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