---
schema_version: "1"
id: c46eb36539e8f0951d7e867f96b8a0de902ded744ec40e0848ce4b122064b6e1
title: Set up Partner Accounts and Contractor Users
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/energy_create_contractor_users_cp.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.energy_create_contractor_users_cp.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2be911f073a577f8758d0f96f127501a5a5207f3bb4d9ebe778b81c8549e66f9
description: Set up Partner Accounts and Contractor Users access to the Contractor Portal.
products:
  - Energy and Utilities
release: "264"
---
# Set up Partner Accounts and Contractor Users

Set up Partner Accounts and Contractor Users access to the Contractor Portal.

Set up a sample Account and Contact for a contractor. Setting up the Account and Contact sends an email to the sample contractor with the login details and account creation steps. This allows you to test the Contractor Portal login process before you publish the Portal.

1. Create an account.
    1. From the App Launcher, search for Accounts.
    2. On the Accounts page, click **New**.
    3. Enter an account name, and then save your changes.
        
        For example, enter Salesforce Contractors.
    4. In the new account, from the Actions dropdown, select **Enable As Partner**.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-energy_utilities-264-0-0-production-enus/520849e5-9b41-4bae-b97b-d269cc2fce83/images/icon_note.png)
        
        Note On the Account page of the new account, from the address bar of the browser, copy the alphanumeric code after lightning/r/Account/ to your notepad. This is the account ID for the contractor account.
        
        ![Account ID](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-energy_utilities-264-0-0-production-enus/520849e5-9b41-4bae-b97b-d269cc2fce83/energy_utilities/images/ene_cp_accountid.png)
2. Create a contact.
    1. From the App Launcher, search for Contacts.
    2. On the Contacts page, click **New**.
    3. Enter the details of the contract.
        
        For example, in **First Name**, enter Astro, and in **Last Name**, enter Nomical.
        
        The **Email** account receives steps to create a password and get started. For demo purposes, you can enter your own email.
    4. On the New Contact page, select the **Account Name** created in the previous step, then save your changes.
        
        For example, click **Salesforce Contractors**.
    5. In the newl contact, from the Actions dropdown, select **Enable As Partner**.
        
        The Users page opens.
    6. Click **New User**.
    7. Create a user with Partner Community license and Energy Utilities Contractor User profile.
        
        You can name it Energy Utilities Contractor User.
    8. In the Permission Set Assignments section, click **Edit Assignments**.
    9. Assign these permission sets:
        
        - Contractor Energy Utility Program
        - OmniStudio User
    10. Save your changes.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-energy_utilities-264-0-0-production-enus/520849e5-9b41-4bae-b97b-d269cc2fce83/images/icon_note.png)
        
        Note On the Contact page of the new contact, from the address bar of the browser, copy the alphanumeric code after lightning/r/Account/ to your notepad. This is the contact ID for the contractor contact.
        
        ![Contact ID](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-energy_utilities-264-0-0-production-enus/520849e5-9b41-4bae-b97b-d269cc2fce83/energy_utilities/images/ene_cp_contactid.png)
        
        The contractor receives an email with the steps to create a password and set up their new account. If you used your own email in Step 2.c, the email is sent to your inbox.
3. Add a role to the contact from Developer Console. See [Execute a SOQL Query or SOSL Search](https://help.salesforce.com/s/articleView?id=platform.code_dev_console_tab_query_editor_soql_sosl.htm&type=5&language=en_US).
    1. Open the Developer Console.
    2. Run this query:
        
        ```java
        select id, accountid, contactid, roles from AccountContactRelation where accountid = '<AccountID>' and contactid = '<ContactId>'
        ```
        
        <AccountID> is the alphanumeric code saved from Step 1.d, and <ContactID> is the alphanumeric code saved from Step 2.j.
    3. In the Roles column of the query result, enter Primary Contact, then click **Save Rows**.
4. Log in as the contractor user.
    1. From the App Launcher, search for Contacts.
    2. On the Contacts page, click the new contact.
        
        For example, click **Astro Nomical**.
    3. From the dropdown, select **Log in to Experience as User**.