Skip to content

Contact

prescod edited this page Aug 10, 2020 · 6 revisions

A simple example of hard-coded Contact information:

- object: Contact
  nickname: gob
  fields:
    FirstName: GOB
    LastName: Bluth

And an example with the same fields randomized:

- object: Contact
  nickname: gob
  fields:
    FirstName:
        fake: first_name
    LastName:
        fake: last_name

Here is an example of a Contact with pretty much every field filled out (including some NPSP fields):

- object: Contact
  fields:
    AccountId:
      reference: Account # you need to have defined an Account elsewhere
    LastName:
      fake: first_name
    FirstName:
      fake: last_name
    Salutation:
      random_choice:
      - Mr.
      - Ms.
      - Mrs.
      - Dr.
      - Prof.
    OtherStreet:
      fake.text:
        max_nb_chars: 100
    OtherCity:
      fake: city
    OtherState:
      fake: state
    OtherPostalCode:
      fake: postalcode
    OtherCountry:
      fake: country
    OtherLatitude:
      fake: latitude
    OtherLongitude:
      fake: longitude
    OtherGeocodeAccuracy:
      random_choice:
      - Address
      - NearAddress
      - Block
      - Street
      - ExtendedZip
      - Zip
      - Neighborhood
      - City
      - County
      - State
      - Unknown
    MailingStreet:
      fake.text:
        max_nb_chars: 100
    MailingCity:
      fake: city
    MailingState:
      fake: state
    MailingPostalCode:
      fake: postalcode
    MailingCountry:
      fake: country
    MailingLatitude:
      fake: latitude
    MailingLongitude:
      fake: longitude
    MailingGeocodeAccuracy:
      random_choice:
      - Address
      - NearAddress
      - Block
      - Street
      - ExtendedZip
      - Zip
      - Neighborhood
      - City
      - County
      - State
      - Unknown
    Phone:
      fake: phone_number
    Fax:
      fake: phone_number
    MobilePhone:
      fake: phone_number
    HomePhone:
      fake: phone_number
    OtherPhone:
      fake: phone_number
    AssistantPhone:
      fake: phone_number
    ReportsToId: 
      reference: BossContact # you need to have defined an Account elsewhere
    Email:
      fake: email
    Title:
      fake.text:
        max_nb_chars: 100
    Department:
      fake.text:
        max_nb_chars: 80
    AssistantName:
      fake: name
    LeadSource:
      random_choice:
      - Web
      - Phone Inquiry
      - Partner Referral
      - Purchased List
      - Other
    Birthdate:
      date_between:
        start_date: -1y
        end_date: today
    Description:
      fake.text:
        max_nb_chars: 100
    EmailBouncedReason:
      fake.text:
        max_nb_chars: 100
    EmailBouncedDate: <<fake.date>>T<<fake.time>>Z
    CleanStatus:
      random_choice:
      - Matched
      - Different
      - Acknowledged
      - NotFound
      - Inactive
      - Pending
      - SelectMatch
      - Skipped
    Level__c:
      random_choice:
      - Secondary
      - Tertiary
      - Primary
    npe01__AlternateEmail__c:
      fake: email
    npe01__HomeEmail__c:
      fake: email
    npe01__Primary_Address_Type__c:
      random_choice:
      - Home
      - Work
      - Other
    npe01__Secondary_Address_Type__c:
      random_choice:
      - Home
      - Work
      - Other
    npe01__WorkEmail__c:
      fake: email
    npe01__WorkPhone__c:
      fake: phone_number
    npo02__Best_Gift_Year_Total__c:
      random_number:
        min: 1
        max: 100000
    npo02__Best_Gift_Year__c:
      fake: year
    npo02__FirstCloseDate__c:
      date_between:
        start_date: -1y
        end_date: today
    npo02__Household_Naming_Order__c:
      random_number:
        min: 1
        max: 100000
    npo02__Household__c:
        reference: Household # you need to have defined an Account with the nickname Household
    npo02__LastCloseDate__c:
      date_between:
        start_date: -1y
        end_date: today
    npo02__LastMembershipDate__c:
      date_between:
        start_date: -1y
        end_date: today
    npo02__LastMembershipLevel__c:
      fake.text:
        max_nb_chars: 100
    npo02__LastMembershipOrigin__c:
      fake.text:
        max_nb_chars: 100
    npo02__MembershipEndDate__c:
      date_between:
        start_date: -1y
        end_date: today
    npo02__MembershipJoinDate__c:
      date_between:
        start_date: -1y
        end_date: today
    npo02__Naming_Exclusions__c:
      random_choice:
      - Household__c.Name
      - Household__c.Formal_Greeting__c
      - Household__c.Informal_Greeting__c
    npo02__Soft_Credit_Last_Year__c:
      random_number:
        min: 1
        max: 100000
    npo02__Soft_Credit_This_Year__c:
      random_number:
        min: 1
        max: 100000
    npo02__Soft_Credit_Total__c:
      random_number:
        min: 1
        max: 100000
    npo02__Soft_Credit_Two_Years_Ago__c:
      random_number:
        min: 1
        max: 100000
    npo02__SystemHouseholdProcessor__c:
      random_choice:
      - All Individual Contacts
      - All New or Edited Contacts
      - No Contacts
    npsp__Current_Address__c:
      reference: Account
    npsp__First_Soft_Credit_Amount__c:
      random_number:
        min: 1
        max: 100000
    npsp__First_Soft_Credit_Date__c:
      date_between:
        start_date: -1y
        end_date: today
    npsp__Largest_Soft_Credit_Amount__c:
      random_number:
        min: 1
        max: 100000
    npsp__Largest_Soft_Credit_Date__c:
      date_between:
        start_date: -1y
        end_date: today
    npsp__Last_Soft_Credit_Amount__c:
      random_number:
        min: 1
        max: 100000
    npsp__Last_Soft_Credit_Date__c:
      date_between:
        start_date: -1y
        end_date: today
    npsp__Number_of_Soft_Credits_Last_N_Days__c:
      random_number:
        min: 1
        max: 100000
    npsp__Number_of_Soft_Credits_Last_Year__c:
      random_number:
        min: 1
        max: 100000
    npsp__Number_of_Soft_Credits_This_Year__c:
      random_number:
        min: 1
        max: 100000
    npsp__Number_of_Soft_Credits_Two_Years_Ago__c:
      random_number:
        min: 1
        max: 100000
    npsp__Number_of_Soft_Credits__c:
      random_number:
        min: 1
        max: 100000
    npsp__Primary_Affiliation__c:
      reference: Organization # you need to have defined an Account with the nickname Organization
Clone this wiki locally