B2B Account Summaries

The account summaries feature allows you to review general information about a B2B organizational unit, including balances and aging summary of invoices. Here, you can also browse through a list of financial documents for the unit.

For more information, see Account Summaries.

Requirements

Account summaries requires the following:

  • Composable storefront libraries version 5.1, or higher. Account summaries require the @spartacus/organization library, in particular, the @spartacus/organization/administration library, and the @spartacus/organization/account-summary library.

    For more information, see Installing Additional Composable Storefront Libraries.

  • SAP Commerce Cloud version 2211 or higher.

  • The installation of the B2B Accelerator Module.

CMS Components

Account summaries is CMS-driven and consists of the following CMS components:

  • ManageAccountSummaryListComponent

  • AccountSummaryHeaderComponent

  • AccountSummaryDocumentComponent

You can configure account summaries by using SmartEdit to display the account summaries components in the composable storefront, or you can manually add them to content slots using ImpEx.

If you are using the Spartacus Sample Data Extension, the account summaries component(s) are already enabled. However, if you decide not to use the spartacussampledata extension, you can enable the account summaries responsive content and CMS components through ImpEx.

Adding CMS Components Manually

You can add the various account summaries CMS components to the composable storefront using ImpEx.

Context

$contentCatalog=powertools-spaContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]

Procedure

  1. You can define the Account Summaries tile with the following ImpEx:
    INSERT_UPDATE BannerComponent;$contentCV[unique=true];uid[unique=true];name;urlLink;&componentRef;
    ;;AccountSummaryHomeLink;AccountSummary Home Link;/organization/account-summary;AccountSummaryHomeLink
  2. You can add the Account Summaries tile to Start of the navigation pathMy Account Next navigation step End of the navigation pathMy Company page's content slot:
    INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;cmsComponents(uid, $contentCV)
    ;;BodyContentSlot-MyCompany;My Company Slot;UnitsHomeLink,UsersHomeLink,CostCentersHomeLink,BudgetsHomeLink,PurchaseLimitsHomeLink,UserGroupsHomeLink,AccountSummaryHomeLink
  3. You can add the Account Summaries unit summary page with the following ImpEx.
    1. Create a Manage Account Summary List CMS component.
      INSERT_UPDATE CMSFlexComponent;$contentCV[unique=true];uid[unique=true];name;flexType
      ;;ManageAccountSummaryListComponent;Manage Account Summary List Component;ManageAccountSummaryListComponent
      
    2. Create a new Manage Account Summary page.
      INSERT_UPDATE ContentPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);label;defaultPage[default='true'];approvalStatus(code)[default='approved'];homepage[default='false']
      ;;ManageAccountSummary;Manage Account Summary Page;CompanyPageTemplate;/organization/account-summary
      
    3. Create a new Manage Account Summary slot.
      INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;cmsComponents(uid, $contentCV)
      ;;BodyContentSlot-ManageAccountSummary;Manage Account Summary Slot;ManageAccountSummaryListComponent
      
    4. Add the Manage Account Summary slot to the Manage Account Summary page.
      INSERT_UPDATE ContentSlotForPage;$contentCV[unique=true];uid[unique=true];position[unique=true];page(uid,$contentCV)[unique=true];contentSlot(uid,$contentCV)[unique=true]
      ;;BodyContent-ManageAccountSummary;BodyContent;ManageAccountSummary;BodyContentSlot-ManageAccountSummary
  4. You can add the Account Summary Details page with the following ImpEx.
    1. Create an AccountSummary Header and an AccountSummary Documents CMS components.
      INSERT_UPDATE CMSFlexComponent;$contentCV[unique=true];uid[unique=true];name;flexType
        ;;AccountSummaryHeaderComponent;AccountSummary Header;AccountSummaryHeaderComponent
        ;;AccountSummaryDocumentComponent;AccountSummary Documents;AccountSummaryDocumentComponent
    2. Create a new Account Summary Details page.
      INSERT_UPDATE ContentPage;$contentCV[unique=true];uid[unique=true];name;masterTemplate(uid,$contentCV);label;defaultPage[default='true'];approvalStatus(code)[default='approved'];homepage[default='false']
        ;;AccountSummaryDetails;Account Summmary Details Page;CompanyPageTemplate;/organization/account-summary/details
    3. Create a new Account Summary Details slot.
      INSERT_UPDATE ContentSlot;$contentCV[unique=true];uid[unique=true];name;cmsComponents(uid, $contentCV)
        ;;BodyContentSlot-AccountSummaryDetails;Account SummaryDetails Slot;AccountSummaryHeaderComponent,AccountSummaryDocumentComponent
    4. Add the Account Summary Details slot to the Account Summary Details page.
      INSERT_UPDATE ContentSlotForPage;$contentCV[unique=true];uid[unique=true];position[unique=true];page(uid,$contentCV)[unique=true];contentSlot(uid,$contentCV)[unique=true]
        ;;BodyContent-AccountSummaryDetails;BodyContent;AccountSummaryDetails;BodyContentSlot-AccountSummaryDetails

Updating Responsive Content Manually

You can update the various user interface texts and images that provide navigation to the account summaries CMS components.

Context

When you perform a fresh installation and an initialization of SAP Commerce Cloud with the composable storefront as described under Setting Up SAP Commerce Cloud for use with Composable Storefront, the spartacussampledata extension includes the responsive content required for the account summaries feature.

However, if you would like to update the responsive content of your existing installation, without reinitializing, you can perform the steps outlined in this procedure. The instructions below use the spartacussampledata root folder as an example, you can adapt the steps based on your existing project setup.

Procedure

  1. Download the spartacussampledata.zip file as described in Spartacus Sample Data Extension, and extract the contents to your system.
  2. Copy the account-summary.svg image used for the Account Summaries tile on the My Company homepage from spartacussampledata/resources/spartacussampledata/import/contentCatalogs/powertoolsContentCatalog/images/organization-home/ to the corresponding location in your existing project.
  3. In your existing project, update the spartacussampledata/resources-lang/spartacussampledata/import/contentCatalogs/powertoolsContentCatalog/cms-responsive-content_en.properties as follows:
    1. Specify the default page titles.
      ContentPage.ManageAccountSummary.title=Account Summaries
      ContentPage.AccountSummaryDetails.title=Account Summary Details
    2. Specify the title and the text of the Account Summaries tile on the My Company homepage.
      BannerComponent.AccountSummaryHomeLink.headline=Account Summaries
      BannerComponent.AccountSummaryHomeLink.content=Account summaries allow you to review general information about a unit, including balances and aging summary of invoices. Here, you can also browse through a list of transaction documents for a unit.
      BannerComponent.AccountSummaryHomeLink.media=AccountSummaryHomeLinkImageEn
    3. Update the image information and alternative text.
      Media.AccountSummaryHomeLinkImageEn.path=$siteResource/images/organization-home/account-summary.svg
      Media.AccountSummaryHomeLinkImageEn.realfilename=account-summary.svg
      Media.AccountSummaryHomeLinkImageEn.altText=Account Summaries
  4. Provide any required translations in the properties files for any additionally supported languages.
  5. Ensure that . ./setantenv.sh has already been executed under the platform folder.
  6. Go to the spartacussampledata root folder and perform a build:
    % cd spartacussampledata
    % ant build
  7. Locate the ImpEx file generated in the spartacussampledata/resources/spartacussampledata/import/contentCatalogs/powertoolsContentCatalog folder after executing the build.
    For example, for the English content, this is the cms-responsive-content_en.impex file.
  8. Open the Hybris Administration Console for your local SAP Commerce Cloud, in a web browser at the following address:
    https://localhost:9002
  9. Point to the Console tab, then click ImpEx Import.
  10. Copy-paste the contents of the file into the Import content field.

    Alternatively, choose Start of the navigation pathImport script Next navigation step Choose fileEnd of the navigation path to select and import the generated file.

    Perform this step for any additionally supported languages.

    The responsive content updates are imported into the staged catalog version. To use this data productively, you must synchronize the staged catalog version with the online catalog version.

Using Account Summaries

The following sections describe how to use the account summaries feature in the composable storefront.

Procedure

  1. Access account summaries.
    1. Access account summaries from My Company homepage, which, similarly to other B2B organization pages, is available under Start of the navigation pathMy Account Next navigation step My CompanyEnd of the navigation path, as shown in the following example:
    2. From the My Company homepage, access account summaries by clicking Account Summaries.
    3. Select a unit for which you want to display the account summary. Only the units assigned to you are displayed for selection.
  2. Review account summary details.

    Once you have chosen a unit under Start of the navigation pathMy Account Next navigation step My Company Next navigation step Account SummariesEnd of the navigation path, the Account Summary Details page for the unit is displayed. This page includes the following:

    • Account summary header, containing information about the unit and its outstanding balances. For information on the balance calculations, see Account Summaries.

    • List of transactional documents for the chosen unit.

    • When available, document attachments.

    You can update the list of displayed documents using the available filters and sorting options.

    When a document has an attachment, you can download the attachment as a PDF (to be confirmed) by clicking the (Download) icon.