Api reference
components.growth.public.business_logic ¶
conversation_management ¶
hubspot ¶
lead_generation_resources ¶
self_serve_feedback ¶
create_self_serve_feedback ¶
Create a new self serve feedback form entry
Source code in components/growth/public/business_logic/self_serve_feedback.py
self_serve_flow ¶
create_self_serve_flow_progress ¶
create_self_serve_flow_progress(
country_code,
flow_type,
language,
alan_partner_code,
referring_user_token,
referring_partner,
user_ref,
commit=True,
)
Create the self-serve flow progress
Source code in components/growth/public/business_logic/self_serve_flow.py
get_multiple_self_serve_flow_progress ¶
Get multiple self-serve flow progress records by ID.
Source code in components/growth/public/business_logic/self_serve_flow.py
get_self_serve_flow_progress ¶
Get the self-serve flow progress
Source code in components/growth/public/business_logic/self_serve_flow.py
update_self_serve_flow_progress ¶
update_self_serve_flow_progress(
self_serve_flow_progress_id,
params=None,
proposal_ref=None,
user_ref=None,
commit=True,
)
Update the self-serve flow progress
Source code in components/growth/public/business_logic/self_serve_flow.py
settings ¶
slack_reporting ¶
components.growth.public.commands ¶
components.growth.public.dependencies ¶
GrowthDependency ¶
Bases: ABC
create_conversation_context
abstractmethod
¶
Implement create_conversation_context
get_company_quote_request_data
abstractmethod
¶
get_company_quote_request_data(
language,
phone_number,
firstname,
lastname,
company_name,
number_of_employees,
qualification,
)
Implement get_company_quote_request_event
Source code in components/growth/public/dependencies.py
get_extra_tags_for_country
abstractmethod
¶
get_inbound_sales_team
abstractmethod
¶
get_intercom_admin_id_from_user_id
abstractmethod
¶
get_prospects_emails_from_phone_number
abstractmethod
¶
get_self_serve_flow_id_from_qualification
abstractmethod
¶
Implement get_self_serve_flow_id_from_qualification
get_user
abstractmethod
¶
get_user_from_email
abstractmethod
¶
get_user_from_intercom_admin_id
abstractmethod
¶
is_admin_sales
abstractmethod
¶
is_request_likely_for_care
abstractmethod
¶
Implement is_request_likely_for_care it should return a tuple with: - a bool if the request is likely for care - a str with the reason if the request is likely for care
Source code in components/growth/public/dependencies.py
register_prospect
abstractmethod
¶
register_prospect(
email,
phone=None,
attribution_survey_source=None,
qualification_raw_company=None,
qualification_raw_individual=None,
qualification_raw_website=None,
)
Implement register_prospect
Source code in components/growth/public/dependencies.py
send_unauthenticated_user_async_message_to_intercom
abstractmethod
¶
Implement send_unauthenticated_user_async_message_to_intercom
get_app_dependency ¶
Get the growth dependency in the current app context
Source code in components/growth/public/dependencies.py
set_app_dependency ¶
Set the growth dependency in the current app context
Source code in components/growth/public/dependencies.py
components.growth.public.entities ¶
growth_setting ¶
inbound_sales_team ¶
InboundSalesTeam
dataclass
¶
InboundSalesTeam(
*,
crew_name,
crew_slack_channel,
won_contracts_slack_channel,
crew_lead_user,
back_up_emails
)
Bases: DataClassJsonMixin
Represents an inbound sales team / crew for a specific country
prospect_conversation ¶
ProspectConversation
dataclass
¶
ProspectConversation(
*,
conversation_id,
prospect_type,
prospect_request_type,
assigned_to,
segment
)
Bases: DataClassJsonMixin
Represents a conversation with a prospect in the growth component's assignment scope
quote_request_event ¶
QuoteRequestData
dataclass
¶
QuoteRequestData(
*,
customer_io_event_name,
customer_io_event_attributes,
should_be_sent_to_crm,
quote_details,
self_serve_flow_id
)
Bases: DataClassJsonMixin
components.growth.public.types ¶
codes_and_tags ¶
growth_settings ¶
GrowthSettingEnum ¶
Bases: AlanBaseEnum
Represents the names of all settings in the GrowthSetting table If you need to add a new setting, you should also create a migration script to to insert it into the table
PUBLIC_GROWTH_SETTINGS
module-attribute
¶
PUBLIC_GROWTH_SETTINGS = [
fr_enable_chat,
fr_warning_in_contact_modal,
fr_enable_callback_button_on_first_step,
]
hubspot ¶
last_origin_type ¶
prospect_request_type ¶
ProspectRequestType
module-attribute
¶
ProspectRequestType = Literal[
"meeting_request",
"callback",
"email",
"chat",
"account_creation_stuck",
"quote_request",
]