def setup_intelligent_segments
      segments = Octo.get_config(:intelligent_segments)
      if segments
        segments.each do |seg|
          args = {
            enterprise_id: self._id,
            name: seg[:name],
            type: seg[:type].constantize,
            dimensions: seg[:dimensions].collect(&:constantize),
            operators: seg[:operators].collect(&:constantize),
            values: seg[:values].collect(&:constantize),
            active: true,
            intelligence: true,
          }
          Octo::Segment.new(args).save!
        end
        Octo.logger.info "Created segents for Enterprise: #{ self.name }"
      end
    end
def setup_intelligent_segments
      segments = Octo.get_config(:intelligent_segments)
      if segments
        segments.each do |seg|
          args = {
            enterprise_id: self._id,
            name: seg[:name],
            type: seg[:type].constantize,
            dimensions: seg[:dimensions].collect(&:constantize),
            operators: seg[:operators].collect(&:constantize),
            values: seg[:values].collect(&:constantize),
            active: true,
            intelligence: true,
          }
          Octo::Segment.new(args).save!
        end
        Octo.logger.info "Created segents for Enterprise: #{ self.name }"
      end
    end
Setup the intelligent segments for the enterprise