Administrator

Admin Portal

SQL CRM configuration

Note

The CRM Connector needs assigned by AnywhereNow. It is important to note that only one CRM Connector can be active per tenant at a time.

In order to load your SQL information into the AnywhereNow WebAgent, you'll need to configure the connection.

Before we can begin the configuration process, we need to prepare SQL. Follow these steps:

Dependencies

  • A SQL Server environment

  • A SQL database

  • A SQL user with the necessary permissions to connect to the database and select data

Create tables in SQL Database

Because the CRM connection uses a default configuration to retrieve information from the SQL database, because of this you first need to deploy tables.

  1. Open Microsoft SQL Server Management Studio (SSMS) (Download SQL Server Management Studio (SSMS))

    or

    Azure Data Studio (Download and install Azure Data Studio - Azure Data Studio)

  2. Connect to Server / Instance where the SQL Database is located.

  3. Navigate to the SQL Database

  4. Right Click Database

  5. Select New Query

  6. Paste the following SQL code:

    Copy
    SQL
    IF OBJECT_ID(N'dbo.Case', N'U') IS NULL

    CREATE TABLE [dbo].[Case](

    [Id] [nvarchar](max) NOT NULL,

    [ContactId] [nvarchar](max) NOT NULL,

    [Description] [nvarchar](max) NULL

    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    GO

     

    IF OBJECT_ID(N'dbo.[Contact]', N'U') IS NULL

    CREATE TABLE [dbo].[Contact](

    [Id] [nvarchar](max) NOT NULL,

    [Firstname] [nvarchar](max) NULL,

    [Lastname] [nvarchar](max) NULL,

    [Skill] [nvarchar](max) NULL,

    [Birthdate] [datetime] NULL,

    [Location] [nvarchar](max) NULL,

    [PhoneNumber] [nvarchar](max) NULL,

    [Email] [nvarchar](max) NULL

    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    GO
  7. Execute the Query (F5 or Run)

  8. Validate the outcome. By checking the Messages tab you can see if query was executed successfully.

Configure CRM Connection in the Admin Portal

Follow these steps to configure the CRM connection in the admin portal:

  1. Navigate to the CRM Configuration tab.

  2. Enter the following information in the corresponding fields:

    • In the "Connection string" field, enter the connection string to connect to SQL.

      Copy
      Example connectionstring
      Server=tcp:<server>.database.windows.net,1433;Initial Catalog=<database-name>;User ID=<username>;Password=<password>
  3. Once all the field have been populated, click "Save" to save your SQL connector configuration.