Extending Custom Business Mappings

Phone Connect works without any custom business mapping as it is integrated with the Business Central Customers, Vendors, and Contacts tables.

However, if you want to use custom business mapping, you can do so by extending Phone Connect and your own objects, allowing you to use Phone Connect for your specific business needs.

To use custom business mapping, you need to add the necessary fields to the source table on which the business mapping is based.

The following example shows which fields need to be in the source table to use custom business mapping:

AL
table 500000 "Custom Table Example"
{

    Caption = 'Custom Table Example';

    fields
    {
        field(1; No; Code[20])
        {
            DataClassification = EndUserIdentifiableInformation;
            Caption = 'No.';
        }

        field(2; Name; Text[10])
        {
            DataClassification = CustomerContent;
        }

        field(3; Email; Text[80])
        {
            DataClassification = CustomerContent;
        }

        field(4; "Company No"; Text[30])
        {
            DataClassification = CustomerContent;
        }

        field(5; "Company Name"; Text[30])
        {
            DataClassification = CustomerContent;
        }

        field(6; "Company City"; Text[30])
        {
            DataClassification = CustomerContent;
        }

        field(7; "Company Post Code"; Text[30])
        {
            DataClassification = CustomerContent;
        }

        field(8; "Company Street"; Text[30])
        {
            DataClassification = CustomerContent;
        }

        field(10; "Phone No"; Text[30])
        {
            DataClassification = CustomerContent;

            trigger OnValidate()
            var
                LocalCodeunitSIMCTIManagement: Codeunit "SIM_CTI Management";
            begin
                "SIM_CTI PhoneNo Trimmed" := LocalCodeunitSIMCTIManagement.Trim("Phone No.");
            end;
        }

        field(11; "Mobile Phone No"; Text[30])
        {
            DataClassification = CustomerContent;

            trigger OnValidate()
            var
                LocalCodeunitSIMCTIManagement: Codeunit "SIM_CTI Management";
            begin
                "SIM_CTI MobilePhoneNo Trimmed" := LocalCodeunitSIMCTIManagement.Trim("Mobile Phone No");
            end;
        }

        field(5227422; "SIM_CTI PhoneNo Trimmed"; Text[250])
        {
            DataClassification = CustomerContent;
        }
        field(5227423; "SIM_CTI MobilePhoneNo Trimmed"; Text[250])
        {
            DataClassification = CustomerContent;
        }
        field(5227424; "SIM_CTI Microsoft Teams Name"; Text[250])
        {
            DataClassification = CustomerContent;
        }
    }
}

If your table already has an equivalent field to the ones listed above, you can use the existing field instead of adding a new one.

Once you have extended the source table with the necessary fields, you need to extend Phone Connect.

For Phone Connect to know which Call Out card to use, you need to extend the Phone Connect user table with a new field that references the Call Out card that you want to use for the custom business mapping.

AL
tableextension 500000 "Example SIM_CTI User" extends "SIM_CTI User"
{
    fields
    {
        field(500000; "Incoming Custom Call PageID"; Integer)
        {
            DataClassification = CustomerContent;
            Caption = 'Incoming Custom call page';
            TableRelation = "SIM_CTI Defined Call Pages"."Page ID";
        }
    }
}

After you have extended the Phone Connect User Table, you need to extend the Phone Connect User Card page to add the new field to the page.

AL
pageextension 500000 "Example SIM_CTI User Setup" extends "SIM_CTI User Setup"
{
    layout
    {
        addafter("Incoming Vendor Call PageID")
        {
            field("Incoming Custom Call PageID"; Rec."Incoming Custom Call PageID")
            {
                ApplicationArea = All;
                ToolTip = 'Specifies the page that opens when an incoming call from a Custom business partner is received. The page can be selected using the drilldown function.';
            }
        }
    }
}

The final step is to create a business map for the custom business partner and define the call-out card to be used for the custom business partner.

The following steps show how to create a business mapping for the custom business partner:

  1. Navigate to the Phone Connect - Administrator role center.
  2. Click on Mapping in the ribbon bar and execute the action Business Mapping to open the Phone Connect - Business Mapping page.
  3. Click on New to create a new business mapping.
  4. Enter a code and a description for the business mapping.
  5. Select the source table and the source fields defined in the example above.
  6. Enter the Phone Connect Call Page Field and enter the field that was added to from the above example.

After the custom business mapping is created, you can define the call-out card to be used for the users.

The following steps show how to define the call-out card to be used for the custom business partner:

  1. Navigate to the Phone Connect - Administrator role center.
  2. Click on Setup in the ribbon bar and execute the action Phone Connect User to open the Phone Connect - User list.
  3. Click on the Phone Connect User field to open the User card.
  4. Select the Incoming Custom Call PageID field and choose the Call Out card that should be used for the custom business partner.