# Offer Products for Customers to Order  

Use the communication channels on the Infobip API to offer your products and services for customers to order.
  
This tutorial explains how to use [Product](https://www.infobip.com/docs/whatsapp/message-types-and-templates/free-form-messages#product-message-interactive-messages) and [Multi-product](https://www.infobip.com/docs/whatsapp/message-types-and-templates/free-form-messages#multi-product-message-interactive-messages) messages in [WhatsApp](https://www.infobip.com/docs/whatsapp) to offer products that are present in your catalog. Customers can ask questions about the product, add the product to the cart, and submit the cart without leaving WhatsApp.
  
## Process Workflow  

## Before Getting Started  

You must have the following:
  
- Infobip account to use the communication channels. [Log on](https://portal.infobip.com/login/) or [register](https://www.infobip.com/docs/essentials/getting-started/create-an-account) for an account
- Registered WhatsApp sender
- Facebook page for your business
- WhatsApp Business Manager account with [administrator access](https://www.facebook.com/help/442345745885606)
- Template, which is approved by WhatsApp, for the campaign

## Implementation Steps  

You can implement this tutorial by using the [WhatsApp Business Solution](https://www.infobip.com/docs/whatsapp#whatsapp-business-solution-technical-specifications) API.

| Notification with promotional message from brand | Reply buttons | Menu that contains the selected product type | Product details page |
| --- | --- | --- | --- |
|  |  |  |  |

### Create Catalog [#create-catalog-implementation-steps]
 Note
If you want to use your existing Meta catalog, ignore this step.

To create a new catalog, follow these steps:

1. Go to Facebook [Commerce Manager](https://business.facebook.com/commerce_manager/get_started/).
2. Click **Create a catalog**.

3. Choose your catalog type from the options.

4. Assign a business portfolio as a catalog owner. A business portfolio offers more functionality to use catalogs and enables you to assign permission to other people to update the catalog.

    Note
You must use the same business portfolio that is connected to your WhatsApp sender.

5. Name your catalog.

Your catalog is now created.

For more information, refer to the [Create a Catalog](https://www.facebook.com/business/help/1275400645914358?id=725943027795860) documentation.
  
### Add Infobip as Partner [#add-infobip-as-partner-implementation-steps]

1. In the Facebook Business Manager account, go to **Business Settings** and select your business.
2. Select **Data Sources**.
3. Select **Catalogs** and select the name of your catalog.
4. Select **Assign Partner**.
5. Select **Business ID** and enter Infobip's Facebook Business Manager ID: 1654519411336220.
6. Select **Manage catalog**.

### Connect Catalog to WhatsApp Business Account [#connect-catalog-to-whatsapp-business-account-implementation-steps]

To connect your WhatsApp sender or your WhatsApp Business Account to your Meta catalog, contact your Infobip Account Manager or use the Infobip Contact Form (https://www.infobip.com/contact) and contact the Support team. Share the sender number, catalog name, and catalog ID.
  
You can find the name and catalog ID in the [Commerce Manager](https://business.facebook.com/commerce_manager/get_started/) >> **Catalogs** section >> **Settings** option.

### Add Items to Catalog [#add-items-to-catalog-implementation-steps]

You can add items to your catalog in one of the following ways:

- Use a manual form
- Upload a spreadsheet file to add items in bulk
- Use Facebook pixel

This tutorial shows how to add items by using the manual form. For information about the other options, refer to the [Facebook documentation](https://www.facebook.com/business/help/384041892421495).

1. In the [Commerce Manager](https://business.facebook.com/commerce_manager/get_started/), select your catalog on the left.

2. Select **Add items**.
3. In the **Add items** section, choose **Manual**.

4. Add the following information about your item:

    - A 500px x 500px image
    - Title
    - Description
    - Address
    - Website link
    - Price  

You get a confirmation that the item was added to the catalog.

The item is now displayed in the **Catalog** section.
  
Click the item to view its details.

### Send a Product Message through API [#send-a-product-message-through-api-implementation-steps]

1. Log on to the Infobip API Resource hub and copy your BASE URL. The base URL is in the following format:
    https://{baseUrl}.api.infobip.com/
    For more information, refer to [Base URL](https://www.infobip.com/docs/essentials/api-essentials/base-url).
2. To send the product message, use an API development tool such as **Postman**, and choose the **POST** method.
3. Replace the **endpoint** with the following:
    https://{baseUrl}.api.infobip.com/whatsapp/1/message/interactive/product
4. Add the **Authorization header**.
    Example:
    Basic: Base64 encoded username and password
    For more information, refer to [Authentication](https://www.infobip.com/docs/api/section/Authentication).
5. Specify the following parameters:
    - From – your registered WhatsApp sender number in international format
    - To – destination phone number
    - Content > Action > catalogId (your catalog ID) and productRetailerId (ID of the item in the catalog)

 Note
productRetailerId is displayed as Content ID in the Facebook Commerce Manager.

#### Request Example [#request-example-implementation-steps]
```json showLineNumbers copy filename="json"  

    {
    
      "from": "441134960000",
    
      "to": "441134960001",
    
      "content": {
    
        "action": {
    
          "catalogId": "301165201902093",
    
          "productRetailerId": "7340212982663140"
    
        }
    
      }
    
    }
```

Additionally, you can add a body and a footer to your product message.
  
Example:
  
```json showLineNumbers copy filename="json"  

    {
    
      "from": "441134960000",
    
      "to": "441134960001",
    
      "content": {
    
        "action": {
    
          "catalogId": "1",
    
          "productRetailerId": "2"
    
        },
    
        "body": {
    
          "text": "Some text"
    
        },
    
        "footer": {
    
          "text": "Footer"
    
        }
    
      }
    
    }
```
  
### Receive WhatsApp Order Message [#receive-whatsapp-order-message-implementation-steps]

1. Log on to the Infobip API Resource hub and copy your BASE URL. The base URL is in the following format:
    https://{baseUrl}.api.infobip.com/
    For more information, refer to [Base URL](https://www.infobip.com/docs/essentials/api-essentials/base-url).
2. To receive the order message, use an API development tool such as **Postman**, and choose the **POST** method.
3. Replace the **endpoint** with the following:
    https://{yourDomain}/your/received/message/path
4. Add the **Authorization header**.
    Example:
    Basic: Base64 encoded username and password
    For more information, refer to [Authentication](https://www.infobip.com/docs/api/section/Authentication).

#### Response Example [#response-example-implementation-steps]
```json showLineNumbers copy filename="json"  

    {
    
      "results": [
    
        {
    
          "from": "447860064555",
    
          "to": "41793026731",
    
          "integrationType": "WHATSAPP",
    
          "receivedAt": "2018-09-10T12:10:18.379+0000",
    
          "messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
    
          "message": {
    
            "type": "ORDER",
    
            "catalogId": "1",
    
            "text": "Some text",
    
            "productItems": [
    
              {
    
                "currency": "EUR",
    
                "itemPrice": 12.5,
    
                "productRetailerId": "2",
    
                "quantity": 1
    
              },
    
              {
    
                "currency": "EUR",
    
                "itemPrice": 20.52,
    
                "productRetailerId": "3",
    
                "quantity": 2
    
              }
    
            ]
    
          },
    
          "price": {
    
            "pricePerMessage": 0,
    
            "currency": "EUR"
    
          }
    
        }
    
      ],
    
      "messageCount": 1,
    
      "pendingMessageCount": 0
    
    }
```
