Search Results for

    Show / Hide Table of Contents

    Class Associate

    This is all the basic information for an associate.

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

    Most values are set during enrolment (See Application and WriteApplication(Application, Boolean)) or UpdateAssociate(Associate).

    Constructors

    Associate()

    Declaration
    public Associate()

    Properties

    AcceptTerms

    Indicates if the associate has accepted the terms and conditions.

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

    Readonly. Ignored by UpdateAssociate(Associate). Usually this will always be true unless customizations have been done.

    Address

    Associate's address.

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

    AssociateBaseType

    This is the associate's base type that is read and written to the DB.

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

    Possible associate types is configured through a admin settings page.

    Usually AssociateType is used instead, but AssociateType will be ignored when UpdateAssociate(Associate) is called. Set this value to change an associate's persisted type. Note: If an associate is upgrading from a retail customer, WriteApplication(Application, Boolean) will ususally need to be called.

    See Also
    AssociateType

    AssociateCustom

    These custom fields are provided as a convenient way to store custom supplimentary data that belongs to this associate. This data is never used by base code, but can be read and written to from client code.

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

    The 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

    AssociateId

    This is the associate's main unique identifier to reference an associate in code.

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

    This will be the associate's recordnumber in the DB.

    See Also
    BackOfficeId

    AssociateType

    This if the associate's type that has been derived.

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

    In most cases this will be the same as AssociateBaseType unless advanced settings have been configured for types to be automatically derived based on autoships they've setup.

    Readonly. Ignored by UpdateAssociate(Associate), use AssociateBaseType to update type.

    AssociateTypeName

    Unused. Do not use. Use GetAssociateTypeName(Int32)

    Declaration
    public string AssociateTypeName { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    GetAssociateTypeName(System.Int32)

    BackOfficeId

    This is the associate's unique identifier that is displayed to the user through the UI.

    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 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
    GetNewBackOfficeId
    AssociateId

    BirthDate

    The associate's date of birth.

    Declaration
    public DateTime BirthDate { get; set; }
    Property Value
    Type Description
    System.DateTime
    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

    Custom

    Obsolete. Use AssociateCustom.

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

    DisplayFirstName

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

    Declaration
    public string DisplayFirstName { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    DisplayLastName
    RomanizedFirstName
    LegalFirstName

    DisplayLastName

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

    Declaration
    public string DisplayLastName { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    DisplayFirstName
    RomanizedFirstName
    LegalLastName

    DormantDate

    Unused. Do not use.

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

    EmailAddress

    The associate's email address.

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

    Should be unique. This is used to uniquely identify associates.

    See Also
    ValidateEmail(System.String)

    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

    Should be unique.

    See Also
    AssociateCustom

    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".

    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
    See Also
    DisplayFirstName
    RomanizedFirstName
    LegalLastName

    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
    See Also
    DisplayLastName
    RomanizedLastName
    LegalFirstName

    Name

    DisplayFirstName + DisplayLastName.

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

    PriceGroup

    This is used to determine the price this associate pays for any product they purchase.

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

    Readonly. Ignored by UpdateAssociate(Associate). This will always be equal to AssociateType, unless custom code is changing it.

    See Also
    Discounts
    PriceGroups

    PrimaryPhone

    The associate's primary phone number.

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

    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
    See Also
    DisplayFirstName
    LegalFirstName
    RomanizedLastName

    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
    See Also
    DisplayLastName
    LegalLastName
    RomanizedFirstName

    SecondaryPhone

    The associate's secondary phone number.

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

    ShipAddress

    Associate's shipping address.

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

    ShipAttention

    Unused. Do not use.

    Declaration
    public string ShipAttention { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    Name

    ShipPhone

    Unused. Do not use.

    Declaration
    public string ShipPhone { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    PrimaryPhone
    SecondaryPhone
    TextNumber

    SignupDate

    The date the associate enrolled.

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

    Readonly. Ignored by UpdateAssociate(Associate).

    SignupMethod

    Unused. Do not use.

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

    StatusId

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

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

    See "Configure Associate Statuses" admin page for details.

    TaxExempt

    Indicates that this associate doesn't have to pay taxes.

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

    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

    TaxResaleNo

    If the associate is TaxExempt, they should have a TaxResaleNo

    Declaration
    public string TaxResaleNo { get; set; }
    Property Value
    Type Description
    System.String
    See Also
    TaxExempt

    TeamId

    Idetifies a team this associate belongs to.

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

    Updates this value in the DB, but might not be used anywhere.

    TextNumber

    The associate's cell phone number.

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

    UpgradeDate

    Date of most recent change to AssociateBaseType.

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

    Readonly. Ignored by UpdateAssociate(Associate).

    Void

    If this is true, this associate is essentially deleted, and will be ignored by most processes.

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

    Readonly. Ignored by UpdateAssociate(Associate).

    See Also

    IAssociateService
    IOrderService
    IAutoshipService
    ITreeService
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX