> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.facebookbusiness.marketing.AddMemberToAudience

- Component: `appmixer.facebookbusiness.marketing.AddMemberToAudience`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.facebookbusiness 3.1.3](https://connectors.appmixer.com/connector/appmixer.facebookbusiness/3.1.3.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.facebookbusiness/3.1.3/component/appmixer.facebookbusiness.marketing.AddMemberToAudience>

Add a single customer to a custom audience.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Account ID (`accountId`) | select | Enter your Ad Account ID. |
| Custom Audience ID (`audienceId`) | select | Enter your Custom Audience ID. |
| Email address (`EMAIL`) | text | - |
| Phone number (`PHONE`) | text | - |
| Gender (`GEN`) | select | - |
| Birth year (`DOBY`) | text | Use the YYYY format: 1900 to the current year. |
| Birth month (`DOBM`) | text | Use the MM format: 01 to 12. |
| Birth day (`DOBD`) | text | Use the DD format: 01 to 31. |
| First Name (`FN`) | text | - |
| Last Name (`LN`) | text | - |
| First Name Initial (`FI`) | text | - |
| City (`CT`) | text | - |
| US State (`ST`) | text | Use the 2-character ANSI abbreviation code, lowercase. |
| ZIP Code (`ZIP`) | text | Use lowercase, and no white space. For the US, use only the first 5 digits. For the UK, use the Area/District/Sector format. |
| Country (`COUNTRY`) | text | Use lowercase, 2-letter country codes in ISO 3166-1 alpha-2. |
| Mobile Advertiser ID (`MADID`) | text | Use all lowercase, and keep hyphens. |
| External ID (`EXTERN_ID`) | text | This can be any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Audience ID (`audience_id`) | string | - |
| Session ID (`session_id`) | string | - |
| Number of Received Users (`num_received`) | integer | - |
| Number of Invalid Entries (`num_invalid_entries`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.facebookbusiness.marketing.AddMemberToAudience",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Add a single customer to a custom audience.",
  "auth": {
    "service": "appmixer:facebookbusiness",
    "scope": [
      "ads_management"
    ]
  },
  "quota": {
    "manager": "appmixer:facebookbusiness",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "audienceId": {
            "type": "string"
          },
          "EMAIL": {
            "type": "string"
          },
          "PHONE": {
            "type": "string"
          },
          "GEN": {
            "type": "string"
          },
          "DOBY": {
            "type": "string"
          },
          "DOBM": {
            "type": "string"
          },
          "DOBD": {
            "type": "string"
          },
          "FN": {
            "type": "string"
          },
          "LN": {
            "type": "string"
          },
          "FI": {
            "type": "string"
          },
          "CT": {
            "type": "string"
          },
          "ST": {
            "type": "string"
          },
          "ZIP": {
            "type": "string"
          },
          "COUNTRY": {
            "type": "string"
          },
          "MADID": {
            "type": "string"
          },
          "EXTERN_ID": {
            "type": "string"
          }
        },
        "required": [
          "audienceId"
        ]
      },
      "inspector": {
        "inputs": {
          "accountId": {
            "type": "select",
            "label": "Account ID",
            "index": 1,
            "tooltip": "Enter your Ad Account ID.",
            "source": {
              "url": "/component/appmixer/facebookbusiness/marketing/GetAdAccounts?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "transform": "./GetAdAccounts#toSelectArray"
              }
            }
          },
          "audienceId": {
            "type": "select",
            "label": "Custom Audience ID",
            "index": 2,
            "tooltip": "Enter your Custom Audience ID.",
            "source": {
              "url": "/component/appmixer/facebookbusiness/marketing/GetCustomAudiences?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "transform": "./GetCustomAudiences#toSelectArray",
                "messages": {
                  "in/accountId": "inputs/in/accountId"
                }
              }
            }
          },
          "EMAIL": {
            "type": "text",
            "index": 3,
            "label": "Email address"
          },
          "PHONE": {
            "type": "text",
            "index": 4,
            "label": "Phone number"
          },
          "GEN": {
            "type": "select",
            "index": 5,
            "label": "Gender",
            "options": [
              {
                "value": "f",
                "label": "f"
              },
              {
                "value": "m",
                "label": "m"
              }
            ]
          },
          "DOBY": {
            "type": "text",
            "index": 6,
            "label": "Birth year",
            "tooltip": "Use the YYYY format: 1900 to the current year."
          },
          "DOBM": {
            "type": "text",
            "index": 7,
            "label": "Birth month",
            "tooltip": "Use the MM format: 01 to 12."
          },
          "DOBD": {
            "type": "text",
            "index": 8,
            "label": "Birth day",
            "tooltip": "Use the DD format: 01 to 31."
          },
          "FN": {
            "type": "text",
            "index": 9,
            "label": "First Name"
          },
          "LN": {
            "type": "text",
            "index": 10,
            "label": "Last Name"
          },
          "FI": {
            "type": "text",
            "index": 11,
            "label": "First Name Initial"
          },
          "CT": {
            "type": "text",
            "index": 12,
            "label": "City"
          },
          "ST": {
            "type": "text",
            "index": 12,
            "label": "US State",
            "tooltip": "Use the 2-character ANSI abbreviation code, lowercase."
          },
          "ZIP": {
            "type": "text",
            "index": 12,
            "label": "ZIP Code",
            "tooltip": "Use lowercase, and no white space. For the US, use only the first 5 digits. For the UK, use the Area/District/Sector format."
          },
          "COUNTRY": {
            "type": "text",
            "index": 12,
            "label": "Country",
            "tooltip": "Use lowercase, 2-letter country codes in ISO 3166-1 alpha-2."
          },
          "MADID": {
            "type": "text",
            "index": 12,
            "label": "Mobile Advertiser ID",
            "tooltip": "Use all lowercase, and keep hyphens."
          },
          "EXTERN_ID": {
            "type": "text",
            "index": 13,
            "label": "External ID",
            "tooltip": "This can be any unique ID from the advertiser, such as loyalty membership IDs, user IDs, and external cookie IDs."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "value": "audience_id",
          "label": "Audience ID",
          "schema": {
            "type": "string",
            "example": "23851234567890123"
          }
        },
        {
          "value": "session_id",
          "label": "Session ID",
          "schema": {
            "type": "string",
            "example": "12345678"
          }
        },
        {
          "value": "num_received",
          "label": "Number of Received Users",
          "schema": {
            "type": "integer",
            "example": 1
          }
        },
        {
          "value": "num_invalid_entries",
          "label": "Number of Invalid Entries",
          "schema": {
            "type": "integer",
            "example": 0
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
