New Hawksearch Integrations

Contact Hawksearch for the Hawksearch API Key, Database No, EngineName, Tracking Key and BaseUrl

A. Create Named Credentials:
Go to Setup → Named Credentials → New Named Credential and create a Named Credential with below details:

1

 Label 

 HawksearchSearchAPI

2

 Name 

 HawksearchSearchAPI

3

 URL 

 URL for Hawksearch Search API

4

 Identity Type 

 Named Principle

5

 Authentication Protocol 

 Password Authentication

6

 Username 

 'username'

7

 Password 

 {Your Hawksearch Search API Key}

8

 Generate Authorization Header 

 False

9

 Allow Merge Fields in HTTP Header 

 true

10

 Allow Merge Fields in HTTP Body 

 true

 

B. Create Custom Metadata records:

Go to Setup → Custom Metadata Type → New Custom Metadata Type
Create a new Custom Metadata Type with Label Hawksearch Credential

Following are its fields:

  • DatabaseNo Number(18, 0) (Required)

  • EngineName Text(255) (Required)

  • TrackingKey Text(255) (Required)

  • BaseImageUrl URL (Required) - This is the base URL for product images

  • After adding the fields click 'Manage Hawksearch Credentials' and create a new record with the appropriate values


C. Add Static Resources:

Go to Setup -> Static Resources -> New

  • Name: HawksearchResources

  • File: Choose a .zip with a static resource (there should be now base folder - directly /img /js etc.)

  • Cache-Control: Public

D. User permissions and adding the Customer Community Plus License:

Setting up Buyer User:

There are a couple of steps that need to be taken in order for products to be properly viewed by the user.

Create Account. The user that creates the Account should have a Role specified that has the proper permissions. Create Contact. Use the created account for the contact you are about to create. Go to the contact you created on the right dropdown arrow select 'Enable Customer User' Select User License -> 'Customer Community Plus'. Profile => 'HWSBuyerUserProfile'

Now that we have set up the user we need to adjust some configurations in the B2B Commerce.

Go to Commerce -> Buyer Groups from the top dropdown Create a new Buyer Group In 'Related' Tab of the Buyer Group under Buyer Group Members assign the Account you created Under Stores - assign your B2B Commerce Store

At this point the user will be able to login to the store but he won't be having access to view any of the products. We need to create now Commerce Entitlement Policy. The Entitlement Policies configure which products can be accessed by a specific Buyer Group.

In Commerce in the dropdown select 'Entitlement Policies' Create new Entitlement Policy Go to your newly created Entitlement Policy and click on 'Related Tab' Add the Buyer Group you have just created under Buyer Groups and all the products that you want this buyer group to have access to under 'Products'

Â