> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Merchant

> Connect Alumio to Google Merchant.

## Extra information

System documentation:

## Connector package documentation

# Setting up HTTP Client [Google](https://google.com/) Merchant

## Steps

1. In Alumio Dashboard, go to Clients > HTTP Clients. Create a new HTTP Client and select [Google](https://google.com/) Merchant HTTP Client as the prototype of the HTTP Client.
2. Fill in the Base URI, Client ID, Client Secret, Code, and Scopes (optional).
3. Press “Grant access to [Google](https://google.com/) Merchant Center” and save.

# Subscribing to Entities from [Google](https://google.com/) Merchant

## Steps

1. Go to Connections → Incoming and create a new incoming configuration and select [Google](https://google.com/) Merchant Subscriber as the subscriber.
2. Select the entity you want to subscribe from [Google](https://google.com/) Merchant.
3. Add any request parameters needed to subscribe to the entity (optional).
4. You can optionally add a transformer to transform the request parameters into something you need.
5. Select the [Google](https://google.com/) Merchant HTTP Client to use.

## General Concept

We follow [Google](https://google.com/) Merchant documentation on building this connector so you can easily use the connector based on [Google](https://google.com/) Merchant API Reference.

**Entity**
It’s the entity you want to subscribe from [Google](https://google.com/) Merchant. Please refer to the entities in Management APIs from the [Google](https://google.com/) Merchant API Reference page.

**Request Parameters**
These are the parameters you can provide to get the needed entity based on [Google](https://google.com/) Merchant API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing to accounts.get entity.

<img src="https://mintcdn.com/alumio/uG1gp13i6A-hR0sB/images/connectors/google-merchant-01.png?fit=max&auto=format&n=uG1gp13i6A-hR0sB&q=85&s=65f777c5756e2972380357149042cee4" alt="Google Merchant connector screenshot 1" width="690" height="395" data-path="images/connectors/google-merchant-01.png" />

<img src="https://mintcdn.com/alumio/uG1gp13i6A-hR0sB/images/connectors/google-merchant-02.png?fit=max&auto=format&n=uG1gp13i6A-hR0sB&q=85&s=7ea97eb1bcf181693ba1d18d9ef38e27" alt="Google Merchant connector screenshot 2" width="690" height="166" data-path="images/connectors/google-merchant-02.png" />

That’s why we need to define **merchantId and accountId** properties inside the **path** property in the Request Parameters field. The properties inside **query** parameters will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field on accounts.get entity.

/content/v2.1/1/accounts/1

**Input Transformer**
Any transformers set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access [Google](https://google.com/) Merchant.

# Publishing Entity to [Google](https://google.com/) Merchant

## Steps

1. Go to Connections → Outgoing, create a new outgoing configuration, and select [Google](https://google.com/) Merchant Publisher as the publisher.
2. Select the action that you want the publisher to do with the data.
3. Select the [Google](https://google.com/) Merchant entity you want the data to be published.
4. Select the HTTP Client to use.

<img src="https://mintcdn.com/alumio/uG1gp13i6A-hR0sB/images/connectors/google-merchant-03.png?fit=max&auto=format&n=uG1gp13i6A-hR0sB&q=85&s=117e3ab56172f20e4ead871ac9710264" alt="Google Merchant connector screenshot 3" width="690" height="218" data-path="images/connectors/google-merchant-03.png" />

## General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration).

**Action**
Currently, we support Create (HTTP POST method), Put (HTTP PUT method),Patch (HTTP PATCH method), and Delete (HTTP DELETE method).

**Entity**
We support publishing to most [Google](https://google.com/) Merchant endpoints. Please refer to the entities in Management APIs from the [Google](https://google.com/) Merchant API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require an object as the request payload, please look at the example below. For example, we want to Create a Accounts. Please select “Create” as the action and “accounts. insert” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/uG1gp13i6A-hR0sB/images/connectors/google-merchant-04.png?fit=max&auto=format&n=uG1gp13i6A-hR0sB&q=85&s=03d4ea4a52cd6f295e790462cea1a6ad" alt="Google Merchant connector screenshot 4" width="690" height="216" data-path="images/connectors/google-merchant-04.png" />

<img src="https://mintcdn.com/alumio/uG1gp13i6A-hR0sB/images/connectors/google-merchant-05.png?fit=max&auto=format&n=uG1gp13i6A-hR0sB&q=85&s=1bcf505e44519eb5690a726307cbfa69" alt="Google Merchant connector screenshot 5" width="690" height="159" data-path="images/connectors/google-merchant-05.png" />

You can put the payload you want to send to [Google](https://google.com/) Merchant into the payload property in the data.

Alumio will send an API request to [Google](https://google.com/) Merchant with URL /content/v2.1/1/accounts

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access [Google](https://google.com/) Merchant.

# Important Notes

**Documentation Mistake**

* Product insert: the parameter “offerId” is needed and this is not mentioned in the documentation. Also the documentation mentions that we should insert the parameters in this format for example: “image\_link” but it should be “imageLink” and for example the as per the documentation it says “is\_bundle” but the parameter should be “isBundle”. This goes for all parameters.
* Create Region: The payload should have the following parameters unlike the documentation

```
{
  "displayname": "TestRegion_Alumio",
  "postalCodeArea": {
    "regionCode": "US",
    "postalCodes": [
      {
        "end": "98112",
        "begin": "98064"
      }
    ]
  },
  "shippingEligible" : true,
  "regionalInventoryEligible" : true
}
```
