---
schema_version: "1"
id: c61355a5478571207f5fef5f5b20259f19b204615b4aedd52e2b00f48b2ec63d
title: Define Company Logo on User Cockpit
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_task_admin_company_logo_custom_contract_sample_definition.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_task_admin_company_logo_custom_contract_sample_definition.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8e4af3cbb7cc06544439f52456c05eace54bf52a0b5709bd012105f6f120ff7e
description: Customize the UI, lookup, datasource, and process contracts in Visual Studio (VS) Code based Modeler. Build the contracts and review the customization in the simulator app.
products:
  - Consumer Goods
release: "264"
---
# Define Company Logo on User Cockpit

Customize the UI, lookup, datasource, and process contracts in Visual Studio (VS) Code based Modeler. Build the contracts and review the customization in the simulator app.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Enterprise</strong> and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

1. To load the sales organization, in VS Code based Modeler, open the Application\_CockpitProcess.processflow.xml contract and add this code.
    
    ```
    <Action name="CardUserWelcome_loadData" actionType="LOAD" type="LuCallCountByDate">
              <Parameters>
                    <Input name="cardDate" value="ProcessContext::CardDate" />
              </Parameters>
              <Return name="ProcessContext::LuCallCount"/>
              <TransitionTo action="LoadSalesOrg" />
        </Action>
        <Action name="LoadSalesOrg" actionType="LOAD" type="LuSalesOrg">
              <Return name="ProcessContext::SalesOrg" />
              <TransitionTo action="LoadTodoCount" />
        </Action>
        <Action name="LoadTodoCount" actionType="LOAD" type="LuTodoCountByDate"/>
    ```
2. Save your changes.
3. To bind the `companyLogo` and `companyLogoFileType` targets, add this code to the `UserWelcome` section in the Application\_CockpitUI.userinterface.xml contract.
    
    ```
    <UserWelcome name="UserWelcomeCardUiPlugin">
          <Bindings> 
    <Binding target="userImage" type="Blob" binding="ApplicationContext::User.profilePicture" />
    <Binding target="companyLogo" type="Blob" binding="ProcessContext::SalesOrg.mediaPath" />
    <Binding target="companyLogoFileType" type="Text" binding="ProcessContext::SalesOrg.fileType" />
    <Binding target="userName" type="Text" binding="ApplicationContext::User name" bindingMode="ONE_WAY" />
    ```
4. Save your changes.
5. To define the simple properties for `mediaPath` and `fileType`, add this code to the LuSalesOrg.lookupobject.xml contract.
    
    ```
    <SimpleProperty name="legalInformation" type="DomLongDescription" dataSourceProperty="legalInformation"
          <SimpleProperty name="currency" type="DomCurrency" dataSourceProperty="currency" />
          <SimpleProperty name="mediaPath" type="DomBlob" dataSourceProperty="mediaPath" />
          <SimpleProperty name="fileType" type="DomFileType" dataSourceProperty="fileType" />
      </SimpleProperties>
    ```
6. Save your changes.
7. To link the `Sales_Organization`, `SF_FileLink`, and `SF_File` entities to each other through joins and conditions, add this code to the DsLuSalesOrg\_sf.datasource.xml contract.
    
    ```
    <Attribute name="accountNumber" table="Sales_Organization__c" column="Account_Number__c" />
        <Attribute name="legalInformation" table="Sales_Organization__c" column="Legal_Information__c" />
        <Attribute name="currency" table="Sales_Organization__c" column="Currency__c" />
        <DerivedAttribute name="mediaPath" value="CASE SF_File.Usage__c WHEN 'Icon' THEN SF_File.VersionData ELSE ' ' END" />
        <DerivedAttribute name="fileType" value="replace(SF_File.PathOnClient, rtrim(SF_File.PathOnClient, replace(SF_File.PathOnClient, '•', ")), ")"/>
    </Attributes>
    <Entities>
         	<Entity name="Sales_Organization alias="" idAttribute="Id" />
    <Entity name="SF_FileLink" alias="">
             <Join Type="left outer">
                 <SimpleJoin>
                      <Condition leftSideValue="SF_FileLink.ParentId"comparator="eq" rightSideType="Attribute" rightSideValue="Sales_Organization__c.Id" />
                 </SimpleJoin>
             </Join>
        </Entity>
        <Entity name="SF_File" alias='>
             <Join Type="left outer">
                 <SimpleJoin>
                      <Condition leftSideValue="SF_FileLink.FileId" comparator="eq" rightSideType="Attribute" rightSideValue="SF_File.Id" />
                 </SimpleJoin>
            </ Join>
        </Entity>
    </Entities>
    ```
8. Save your changes.
9. To retrieve the IDs of files from either sales folder or sales organization and to label sales organization file IDs as parent ID, add these snippets in the DsBoSfReplicationCallbacks\_sf.datasource.xml contract.
    
    Add this SQL query statement at the highlighted position in the `AllMandatoryAttachmentsForSync` section.
    
    ```
    sqlStmt      += "UNION ";
    sqlStmt      += "SELECT SF_File.Id FROM SF_File ";
    sqlStmt      += "INNER JOIN SF_FileLink ON SF_FileLink.FileId = SF_File.Id ";
    sqlStmt      += "INNER JOIN Sales_Organization__c ON SF_FileLink.ParentId = Sales_Organization__c.Id ";
    ```
    
    ![Placement position of the SQL query snippet in the AllMandatoryAttachmentsForSync section.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/consumer_goods_retail_admin/images/cg_company_logo_sample_setup_sql_snippet.png)
    
    Add this snippet before the `Visit` section in the `AllAttachments` section.
    
    ```
    
    //######################################################
    //## Sales Org ##
    //######################################################
    sqlStmt      += "SELECT Id as parentId FROM Sales_Organization__c ";
    sqlStmt      += "UNION ";
    //#####################################################
    //############
    //## Visit  ##
    //############
    ```
10. Save your changes.
11. To check for validation errors, build the modified contracts by running this command in VS Code based Modeler: `sf modeler workspace build`