This page is a dedicated deep-dive walkthrough for how to create a new license key.

https://www.notion.so/sourcegraph/Customer-License-Key-Management-f44f84e295f84f2482ee9e15a038c987?pvs=4#40ca738e40b94e1ca2985f919c15e15f

[](data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib2N0aWNvbiBvY3RpY29uLWluZm8gbXItMiIgdmlld2JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgYXJpYS1oaWRkZW49InRydWUiPjxwYXRoIGQ9Ik0wIDhhOCA4IDAgMSAxIDE2IDBBOCA4IDAgMCAxIDAgOFptOC02LjVhNi41IDYuNSAwIDEgMCAwIDEzIDYuNSA2LjUgMCAwIDAgMC0xM1pNNi41IDcuNzVBLjc1Ljc1IDAgMCAxIDcuMjUgN2gxYS43NS43NSAwIDAgMSAuNzUuNzV2Mi43NWguMjVhLjc1Ljc1IDAgMCAxIDAgMS41aC0yYS43NS43NSAwIDAgMSAwLTEuNWguMjV2LTJoLS4yNWEuNzUuNzUgMCAwIDEtLjc1LS43NVpNOCA2YTEgMSAwIDEgMSAwLTIgMSAxIDAgMCAxIDAgMloiIC8+PC9zdmc+)

CEs should always consult with Sales before creating license keys for prospects (i.e., companies that have not yet officially become customers).

[](data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib2N0aWNvbiBvY3RpY29uLWluZm8gbXItMiIgdmlld2JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgYXJpYS1oaWRkZW49InRydWUiPjxwYXRoIGQ9Ik0wIDhhOCA4IDAgMSAxIDE2IDBBOCA4IDAgMCAxIDAgOFptOC02LjVhNi41IDYuNSAwIDEgMCAwIDEzIDYuNSA2LjUgMCAwIDAgMC0xM1pNNi41IDcuNzVBLjc1Ljc1IDAgMCAxIDcuMjUgN2gxYS43NS43NSAwIDAgMSAuNzUuNzV2Mi43NWguMjVhLjc1Ljc1IDAgMCAxIDAgMS41aC0yYS43NS43NSAwIDAgMSAwLTEuNWguMjV2LTJoLS4yNWEuNzUuNzUgMCAwIDEtLjc1LS43NVpNOCA2YTEgMSAwIDEgMSAwLTIgMSAxIDAgMCAxIDAgMloiIC8+PC9zdmc+)

Starting with Sourcegraph 5.1+, we require each customer instance to have a unique site_id and license key pair. Each instance should also have it's own subscription created. See internal licensing FAQ for more details.

Note that each Enterprise subscription represents a subscription for exactly one Sourcegraph instance. There should never be licenses for multiple instances within a single Enterprise subscription. For more details, please see https://www.notion.so/sourcegraph/Enterprise-Subscription-modelling-in-Enterprise-Portal-6599f1ae3c8347b28fb04b2a0d9ca70e?pvs=4.

[](data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ib2N0aWNvbiBvY3RpY29uLWluZm8gbXItMiIgdmlld2JveD0iMCAwIDE2IDE2IiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgYXJpYS1oaWRkZW49InRydWUiPjxwYXRoIGQ9Ik0wIDhhOCA4IDAgMSAxIDE2IDBBOCA4IDAgMCAxIDAgOFptOC02LjVhNi41IDYuNSAwIDEgMCAwIDEzIDYuNSA2LjUgMCAwIDAgMC0xM1pNNi41IDcuNzVBLjc1Ljc1IDAgMCAxIDcuMjUgN2gxYS43NS43NSAwIDAgMSAuNzUuNzV2Mi43NWguMjVhLjc1Ljc1IDAgMCAxIDAgMS41aC0yYS43NS43NSAwIDAgMSAwLTEuNWguMjV2LTJoLS4yNWEuNzUuNzUgMCAwIDEtLjc1LS43NVpNOCA2YTEgMSAwIDEgMSAwLTIgMSAxIDAgMCAxIDAgMloiIC8+PC9zdmc+)

The Subscription ID and Opportunity ID used below are not the same as the Subscription or Opportunity number. The correct data can be found in the Opportunity under Important Technical Details -> License IDs. It can also be pulled from the URL of the corresponding Subscription or Opportunity page.

The prospect/customer requires a Sourcegraph.com user account. If an account does not already exist, the CE should create one first. The username of the account should have the following format CompanyName-UniqueId. This format is described below. The email of the account should be left blank. Once the account is available, follow the steps below.

  1. Sign in to Customer License Key Management.

  2. Assuming this is the first time creating a license for this account you must first create a user by navigating to the users page and create new user account.

  3. Creating a new user: we no longer create user-level accounts, instead we create a user for the Account itself. The username of the new user should utilize the following naming convention: Company_Name-SFDC_Unique_Account_ID.

  4. Once the user account is created nNavigate to the Enterprise subscriptions page.

  5. Click Create Enterprise subscriptions.

    <aside> 💡 For customers that need multiple instances, please follow the guidance in Multiple Customer Instances

    </aside>

    1. Search for the user account that was created above in step 3 and click Create new subscription. Fill out all the fields as indicated. For example, enter a human-readable, globally unique "Display name" representing the customer instance subscription. Set the "Instance Type" as appropriate for the instance - note that all non-Internal instances are required to have a Salesforce subscription ID provided.
  6. From the Enterprise Subscription page for that user account, click Generate new license manually.

  7. Fill out the license details:

    1. The customer name auto-populates from the subscription display nameuser account. The Salesforce subscription ID is also inherited from the subscription.
    2. Enter the Salesforce Subscription ID if relevant; new trials will not have a subscription ID.
      1. This is important for automated billing.
      2. Verify if a subscription ID is available from the License IDs field on the Salesforce Opportunity
    3. Fill out the Salesforce Opportunity ID from the License IDs field on the Salesforce Opportunity.
      1. NOTE: Every single license should be associated to an Opportunity ID.
      2. NOTE: This is NOT the Opportunity Number!
    4. Select the license subscription plan from the dropdown. See the Customer License Key Management section for more.
    5. Add additional tags as required
      1. For example: add tags to denote the instance type: eg instance:test
      2. You may also need to add MAU or true-up if a soft cap scenario. See the Customer License Key Management section for more.
    6. Select the number of licensed users.
      1. NOTE: if you added the true-up tag, the customer will be able to exceed this count (soft cap), but administrators will see a warning.
      2. NOTE: If this is a license key for a lower-level environment the user count should not exceed 20.
  8. Select the license expiration date. For production keys, this needs to match the end date of the contract itself.

    1. NOTE: Licenses expire at midnight of the date selected based on the timezone of the browser where the license is being generated from. It is important to consider this as depending on the teammate location and the customer location you may need to actually set the expiration date to lag by a day.
  9. Click Generate license.

  10. If the customer should have Cody Access (either the Cody Enterprise or the Code Intelligence Platform plan) once you generate an active license, from the Enterprise Subscriptions screen, you must toggle on Access to hosted Cody Services. Click Enable when the warning shows.

    1. Everything should fill in for you; however if you need to modify the rate limit of chat requests per day or code completions per day, or change the allowable model configuration, you can do so by clicking on the pencil icon.
  11. Follow our Customer License Key Management for sharing this license key with your prospect or customer. You can link them to the following docs for instructions on where to add the key: Updating your license key

  12. Finally, if this is a new customer, you must map the license key to the Salesforce instance for usage data tracking following these directions.