Campaign Monitor v4.0.0 Release Notes

Release Date: 2014-02-06 // about 10 years ago
    • ⚡️ Updated to v3.1 API
    • ➕ Added support for new segments structure

      • Segment now includes a new RuleGroups member, instead of a Rules member.

        So for example, when you previously would have created a segment like so:

        $result = $wrap->create('Segments List ID', array(
            'Title' => 'Segment Title',
            'Rules' => array(
                array(
                    'Subject' => 'EmailAddress',
                    'Clauses' => array(
                        'CONTAINS example.com'
                    )
                ) ,
                array(
                    'Subject' => '[customfield]',
                    'Clauses' => array(
                        'PROVIDED',
                        'EQUALS 1'
                    )
                )
            )
        ));
        

        You would now do this:

        $result = $wrap->create('Segments List ID', array(
            'Title' => 'Segment Title',
            'RuleGroups' => array(
                array(
                    'Rules' => array(
                        array(
                            'RuleType' => 'EmailAddress',
                            'Clause' => 'CONTAINS example.com'
                        )
                    )
                ) ,
                array(
                    'Rules' => array(
                        array(
                            'RuleType' => '[customfield]',
                            'Clause' => 'PROVIDED'
                        ) ,
                        array(
                            'RuleType' => '[customfield]',
                            'Clause' => 'EQUALS 1'
                        )
                    )
                )
            )
        ));
        
    • The Add Rule call is now Add Rule Group, taking a ruleGroup argument instead of a rule argument.

      function CS_REST_Segments->add_rulegroup($rulegroup)
      

      So for example, when you previously would have added a rule like so:

      $wrap = new CS_REST_Segments('Segment ID', $auth);
      $result = $wrap->add_rule(array(
          'Subject' => 'EmailAddress',
          'Clauses' => array('CONTAINS example.com')
      ));
      

      You would now do this:

      $wrap = new CS_REST_Segments('Segment ID', $auth);
      $result = $wrap->add_rulegroup(array(
          'Rules' => array(
              array(
                  'RuleType' => 'EmailAddress',
                  'Clause' => 'CONTAINS example.com'
              )
          )
      ));
      
      • ✂ Removed the get_apikey method to promote usage of oAuth authentication