Exemplo n.º 1
0
 def _ensure_segment_info(self):
     self._registered_criterium_guid = Criterium.ensure_existence (
         guid = self._registered_criterium_guid,
         hub_id = self.account.hub_id,
         field_id = 1,
         label = self.registered_this_form_label,
         field_keys_json = '["%s"]' % self.registered_this_form_key,
         field_values_json = '["Yes"]' )
     self._registered_saved_search_id = SavedSearch.ensure_existence(
         hub_id = self.account.hub_id,
         saved_search_id = self._registered_saved_search_id,
         name = 'Webinar Registrants For (%s) "%s"' % (self.starts_at.strftime("%m/%d/%y"), self.title),
         criterium_guid = self.registered_criterium_guid,
         value = 'Yes' )
     self._attended_criterium_guid = Criterium.ensure_existence (
         guid = self._attended_criterium_guid,
         hub_id = self.account.hub_id,
         field_id = 1,
         label = self.attended_this_form_label,
         field_keys_json = '["%s"]' % self.attended_this_form_key,
         field_values_json = '["Yes","No"]' )
     self._attended_saved_search_id = SavedSearch.ensure_existence(
         hub_id = self.account.hub_id,
         saved_search_id = self._attended_saved_search_id,
         name = 'Webinar Attendees For (%s) "%s"' % (self.starts_at.strftime("%m/%d/%y"), self.title),
         criterium_guid = self.attended_criterium_guid,
         value = 'Yes' )
     self._noshow_saved_search_id = SavedSearch.ensure_existence(
         hub_id = self.account.hub_id,
         saved_search_id = self._noshow_saved_search_id,
         name = 'Webinar Noshows For (%s) "%s"' % (self.starts_at.strftime("%m/%d/%y"), self.title),
         criterium_guid = self.attended_criterium_guid,
         value = 'No' )
     self.save()
Exemplo n.º 2
0
    def _ensure_segment_info(self):
        self._registered_any_criterium_guid = Criterium.ensure_existence(
            guid = self._registered_any_criterium_guid,
            hub_id = self.id,
            field_id = 1,
            label = self.registered_any_form_label,
            field_keys_json = '["%s"]' % self.registered_any_form_key,
            field_values_json = '["Yes"]' )

        self._attended_any_criterium_guid = Criterium.ensure_existence(
            guid = self._attended_any_criterium_guid,
            hub_id = self.id,
            field_id = 1,
            label = self.attended_any_form_label,
            field_keys_json = '["%s"]' % self.attended_any_form_key,
            field_values_json = '["Yes"]' )

        self._registered_any_saved_search_id = SavedSearch.ensure_existence(
            hub_id = self.id,
            saved_search_id = self._registered_any_saved_search_id,
            name = 'Webinar Registrants For All Time',
            criterium_guid = self.registered_any_criterium_guid,
            value = 'Yes' )

        self._attended_any_saved_search_id = SavedSearch.ensure_existence(
            hub_id = self.id,
            saved_search_id = self._attended_any_saved_search_id,
            name = 'Webinar Attendees For All Time',
            criterium_guid = self.attended_any_criterium_guid,
            value = 'Yes' )
        self.save()