Search Results for

    Show / Hide Table of Contents

    Class Application

    All of the information required to enroll a new associate. Can also be used to upgrade an associate from a retail customer to a distributor.

    Inheritance
    System.Object
    Application
    Namespace: DirectScale.Disco.Extension
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public class Application : Object
    Remarks

    This application is used to enroll and upgrade associate because there are certain things that only happen during enrolment, this also gives the opportunity to collect information required for distributors that wasn't required for retail customers (such as SSN).

    Constructors

    Application()

    Declaration
    public Application()

    Properties

    AcceptTerms

    Indicates that the associate has accepted the terms and conditions.

    Declaration
    public bool AcceptTerms { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Required if AssociateBaseType is 1.

    Exceptions
    Type Condition
    System.Exception

    If false.

    See Also
    AcceptTerms

    AffiliateId

    The associateId of the affiliate for the order in the application.

    Declaration
    public Nullable<int> AffiliateId { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    ApplicantAddress

    Associate's address.

    Declaration
    public Address ApplicantAddress { get; set; }
    Property Value
    Type Description
    Address
    Remarks

    Required.

    Exceptions
    Type Condition
    System.Exception

    If empty or missing information.

    See Also
    Address

    AssociateBaseType

    The associate's type. 1 for a distributor (reseller, rep, affliate, etc), 2 for a retail customer.

    Declaration
    public int AssociateBaseType { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    More types can be used if defined from the settings page.

    Exceptions
    Type Condition
    System.Exception

    Invalid type.

    See Also
    AssociateBaseType
    AssociateType

    AssociateCustom

    Custom values may be passed in with the request during enrollment. These values will be tied to the associate and available to use from custom code.

    Declaration
    public AssociateCustomFields AssociateCustom { get; set; }
    Property Value
    Type Description
    AssociateCustomFields
    Remarks

    These custom values will be written to CRM_CustomFields and will be the same as AssociateCustom. These are separate from other custom fields which can be tied to orders, autoships, and inventory items.

    See Also
    ExternalId
    AssociateCustom

    AssociateId

    Should be 0 if this is a new enrollment, or the associate's Id if it's an associate upgrade request.

    Declaration
    public int AssociateId { get; set; }
    Property Value
    Type Description
    System.Int32
    See Also
    IsAssociateUpgrade
    AssociateId

    Autoship

    All the order information needed to setup the enrollment autoship if there is one.

    Declaration
    public Autoship Autoship { get; set; }
    Property Value
    Type Description
    Autoship
    Remarks

    Optional

    See Also
    IAutoshipService

    BackOfficeId

    This is the id displayed to the users, and what they will think of as their id.

    Declaration
    public string BackOfficeId { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    In code AssociateId is used most of the time, but on the web pages BackOfficeId is most common.

    This value is fully customizable, but must be unique. Any custom value can be supplied here during enrollment, a setting can configure the pattern we use to generate new ones, or a hook can be implemented for custom code to be called to generate new ids.

    See Also
    BackOfficeId
    GetNewBackOfficeId

    BirthDate

    The associate's date of birth.

    Declaration
    public DateTime BirthDate { get; set; }
    Property Value
    Type Description
    System.DateTime
    Remarks

    Required if AssociateBaseType is 1.

    Exceptions
    Type Condition
    System.Exception

    If empty or too young.

    See Also
    ValidateEnrollerBirthDate(System.DateTime)
    BirthDate

    CompanyName

    If this associate represents a company or organization, that name can be provided here.

    Declaration
    public string CompanyName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. Uncommon.

    See Also
    CompanyName

    CouponCodes

    Coupon codes to apply to Order.

    Declaration
    public string[] CouponCodes { get; set; }
    Property Value
    Type Description
    System.String[]
    Remarks

    Optional.

    See Also
    Coupon
    ICouponService

    Custom

    Obsolete. Use AssociateCustom.

    Declaration
    public CustomFields Custom { get; set; }
    Property Value
    Type Description
    CustomFields

    EmailAddress

    The associate's email address.

    Declaration
    public string EmailAddress { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Required. Must be unique. This is used to uniquely identify associates.

    Exceptions
    Type Condition
    System.Exception

    If empty or used.

    See Also
    ValidateEmail(System.String)
    EmailAddress

    ExternalId

    This can be used to link another identifier to this associate. This is useful if there are additional systems outside of DirectScale which have a profile for this user, and custom syncing or aggregating is needed. This id has no uses by default, but will be available to access from custom code.

    Declaration
    public string ExternalId { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional.

    Should be unique.

    See Also
    AssociateCustom
    ExternalId

    FirstName

    Associate's prefered first name. This will be their display name and is used most often.

    Declaration
    public string FirstName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Required.

    Exceptions
    Type Condition
    System.Exception

    If null or empty.

    See Also
    LastName
    RomanizedFirstName
    LegalFirstName
    ShipToFirstName
    DisplayFirstName

    IsAssociateUpgrade

    Indicates if this application if to create a new associate (false) or to upgrade an existing retail customer (true).

    Declaration
    public bool IsAssociateUpgrade { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    If true, AssociateBaseType must be 2.

    See Also
    AssociateId

    LanguageCode

    The associate's perfered language as a 2 digit abbreviation.

    Declaration
    public string LanguageCode { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    See ISO 639-1 for list of codes. If empty it usually defaults to "en".

    Exceptions
    Type Condition
    System.Exception

    Code is more than 2 digits long.

    See Also
    LanguageCode

    LastName

    Associate's prefered last name. This will be their display name and is used most often.

    Declaration
    public string LastName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Required.

    Exceptions
    Type Condition
    System.Exception

    If null or empty.

    See Also
    FirstName
    ShipToLastName
    RomanizedFirstName
    LegalLastName
    DisplayLastName

    LegalFirstName

    The associate's legal name is used when exactness is required, such as making payments to the associate.

    Declaration
    public string LegalFirstName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. If empty, FirstName is used.

    See Also
    FirstName
    RomanizedFirstName
    ShipToFirstName
    LegalFirstName

    LegalLastName

    The associate's legal name is used when exactness is required, such as making payments to the associate.

    Declaration
    public string LegalLastName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. If empty, LastName is used.

    See Also
    RomanizedLastName
    LastName
    ShipToLastName
    LegalLastName

    LegName

    Unused. Use Placements instead.

    Declaration
    public string LegName { get; set; }
    Property Value
    Type Description
    System.String

    Order

    All the order information needed to process the enrollment order, if there is one.

    Declaration
    public ApplicationOrder Order { get; set; }
    Property Value
    Type Description
    ApplicationOrder
    Remarks

    Optional, but usually included. Example: Purchasing an enrollment kit.

    See Also
    IOrderService

    OrderSource

    The source of order being placed. When creating orders through the extension, the order source will default to OrderSource.CustomExtension

    Declaration
    public OrderSource OrderSource { get; set; }
    Property Value
    Type Description
    OrderSource
    See Also
    OrderSource

    PartyId

    Sets PartyId for the order created from Order.

    Declaration
    public int PartyId { get; set; }
    Property Value
    Type Description
    System.Int32

    Password

    This is the associate's password to log into their backoffice.

    Declaration
    public string Password { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Required for new enrollments. Must meet requirements set for password complexity. (Default: 1 number, 1 symbol, 1 capital letter, and 8+ characters long.)

    Exceptions
    Type Condition
    System.Exception

    Invalid password.

    See Also
    IUserService
    CheckPasswordRequirements(System.String)

    Placements

    Specific instructions on where to place the associate in each tree. Used to override default placement rules.

    Declaration
    public Placement[] Placements { get; set; }
    Property Value
    Type Description
    Placement[]
    Remarks

    Optional. Default placement rules exist and will be used to place the new associate under the SponsorId. See settings page for details.

    See Also
    ITreeService

    PrimaryPhone

    The associate's primary phone number.

    Declaration
    public string PrimaryPhone { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional.

    See Also
    PrimaryPhone

    ProductLine

    Unused. Do not use.

    Declaration
    public int ProductLine { get; set; }
    Property Value
    Type Description
    System.Int32

    RomanizedFirstName

    This is the associate's display name in cases when special unicode symbols cannot be used.

    Declaration
    public string RomanizedFirstName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. If empty, FirstName is used.

    See Also
    FirstName
    LegalFirstName
    ShipToFirstName
    RomanizedFirstName

    RomanizedLastName

    This is the associate's display name in cases when special unicode symbols cannot be used.

    Declaration
    public string RomanizedLastName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. If empty, LastName is used.

    See Also
    LegalLastName
    LastName
    ShipToLastName
    RomanizedLastName

    RoutingInfo

    Unused. Do not use.

    Declaration
    public Routing RoutingInfo { get; set; }
    Property Value
    Type Description
    Routing

    SecondaryPhone

    The associate's secondary phone number.

    Declaration
    public string SecondaryPhone { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional.

    See Also
    SecondaryPhone

    ShippingAddress

    Associate's shipping address.

    Declaration
    public Address ShippingAddress { get; set; }
    Property Value
    Type Description
    Address
    Remarks

    Required if AssociateBaseType is 1.

    Exceptions
    Type Condition
    System.Exception

    If empty or missing information.

    See Also
    ShipAddress

    ShipToFirstName

    Name that should appear on shipped packages.

    Declaration
    public string ShipToFirstName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. FirstName used if empty.

    See Also
    ShipAttention

    ShipToLastName

    Name that should appear on shipped packages.

    Declaration
    public string ShipToLastName { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. LastName used if empty.

    See Also
    ShipAttention

    SignupDate

    This is the date the associate signed up. Leave empty to use current time.

    Declaration
    public DateTime SignupDate { get; set; }
    Property Value
    Type Description
    System.DateTime
    Remarks

    Optional.

    May be set to a time in the past, for example, if migrating existing customers to DirectScale.

    See Also
    SignupDate

    SponsorId

    The associateId who recruited the new associate. This will be their enroller. See Placements to specify where to place the associate in each tree.

    Declaration
    public int SponsorId { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Required.

    Exceptions
    Type Condition
    System.Exception

    Sponsor does not exist.

    See Also
    ITreeService
    UplineId

    StatusId

    Associate's status. Defaults to 0 (Active).

    Declaration
    public int StatusId { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Optional. See "Configure Associate Statuses" admin page for options.

    See Also
    StatusId

    SubscribeToCorporateEmails

    Indicates if the associate wants to receive emails promotions.

    Declaration
    public bool SubscribeToCorporateEmails { get; set; }
    Property Value
    Type Description
    System.Boolean
    See Also
    IWebsiteService

    SubscribeToCorporateTexts

    Indicates if the associate wants to receive text promotions.

    Declaration
    public bool SubscribeToCorporateTexts { get; set; }
    Property Value
    Type Description
    System.Boolean
    See Also
    IWebsiteService

    TaxId

    This is the Social Security Number (SSN), Financial Identification Number (FIN), Tax Identificaion Number (TIN), or whatever government tax number is required for the associate's country.

    Declaration
    public string TaxId { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Must be unique.

    This is usually required for distributors, but not for retail customers. See settings to configure which instances it is required for specific associate type, country, and states.

    Exceptions
    Type Condition
    System.Exception

    If required and not present.

    See Also
    TaxId

    TextNumber

    The associate's cell phone number.

    Declaration
    public string TextNumber { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. Set to PrimaryPhone if empty.

    See Also
    TextNumber

    Username

    This the assocaite's user name to log into their backoffice.

    Declaration
    public string Username { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Required for new enrollments. Must be unique.

    Exceptions
    Type Condition
    System.Exception

    Invalid username.

    See Also
    IUserService

    WebPageItemId

    Unused. Do not use.

    Declaration
    public int WebPageItemId { get; set; }
    Property Value
    Type Description
    System.Int32

    WebPageURL

    This is the unique name for the associate's site. Usually this will be something like the associate's name.

    Declaration
    public string WebPageURL { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    Optional. Defaults to Username. Set to "None" if no website should be created.

    Associate with AssociateBaseType of 1 get their own back office site. The assocaite's site url will begin with WebPageURL then be proceeded by the rest of the corporate url.

    Exceptions
    Type Condition
    System.Exception

    Url is not unique, or includes illegal symbols.

    See Also
    ValidateURL(System.String)
    IWebsiteService

    See Also

    Associate
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX