# Marketing Platform Action

Use this action to add, update or delete a contact in a given Marketing Platform list.&#x20;

<figure><img src="https://3974284760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtZEstFBYh3uMutlup6ku%2Fuploads%2Fi1YCSFyczq4J7x4wTXRQ%2Fimage.png?alt=media&#x26;token=d5cae1d4-5d09-487c-beec-d7c50fe86576" alt=""><figcaption></figcaption></figure>

### Settings

The action uses the following settings:

| Setting           | Description                                                                                                                            | [Parsed](https://docs.mylinkconnect.com/actions-and-operations/dynamic-parsing) |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Mode              | The mode that will be used by the action.                                                                                              | :no\_entry:                                                                     |
| Force Resubscribe | If the email has been added and then deleted previously from the Marketing Platform list, The resubscribe will fail without this flag. | :no\_entry:                                                                     |
| API Username      | The API Username you can retrieve from your Marketing Platform account.                                                                | :white\_check\_mark:                                                            |
| API Token         | The API Token  you can retrieve from your Marketing Platform account.                                                                  | :white\_check\_mark:                                                            |
| List Name         | The name of the list where the contact will be added.                                                                                  | :white\_check\_mark:                                                            |
| Email Address     | The email address of the contact that will be added to the list.                                                                       | :white\_check\_mark:                                                            |
| Merge Fields      | The fields you would like to fill for the contact.                                                                                     | :white\_check\_mark:                                                            |

### Remarks

&#x20;You can retrieve your Marketing Platform API Username and API Token from your Marketing platform account details: From the left main menu, click on 'INTEGRATION', then select 'MANAGE API KEY' in the flyout menu. Your API Key information will be listed in the table labeled 'Created API Accesses'.&#x20;

The List Name must be a valid name from your Marketing Platform defined profiles list. If the list is not found, the action will not be completed.

The action will automatically look in the selected list for an existing contact with the specified email. If the contact is found, merge fields will be updated according to the data you set. If not found, the contact will be added.&#x20;

Merge fields should be specified in a NAME=VALUE notation, with one field on each line, similarly to the picture below:

<figure><img src="https://3974284760-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtZEstFBYh3uMutlup6ku%2Fuploads%2Fi1YCSFyczq4J7x4wTXRQ%2Fimage.png?alt=media&#x26;token=d5cae1d4-5d09-487c-beec-d7c50fe86576" alt=""><figcaption></figcaption></figure>

As in all other Connect fields, [dynamic parsing](https://docs.mylinkconnect.com/actions-and-operations/dynamic-parsing) is fully supported. If a merge field is not found, the action will ignore it and continue with other merge fields.

### Trigger

This action has no triggers.

### Variables

This action produces the following variables:

| Name                         | Description                                               |
| ---------------------------- | --------------------------------------------------------- |
| marketing\_platform\_result  | This variable contains the execution result of the action |
| marketingplatform\_profileid | This variable contains the Marketing Platform profile id  |

The possible values of the variable 'marketingplatform\_result' are the following:

| Value                      | Description                                                                                                   |
| -------------------------- | ------------------------------------------------------------------------------------------------------------- |
| email\_empty               | The email field is null or empty                                                                              |
| operation\_failed          | There was a generic error while executing the actioniable contains the Marketing Platform profile id          |
| getlist\_failed            | There was an error while getting the Marketing Platform list informations                                     |
| deleteprofile\_failed      | There was an error while deleting the Marketing Platform profile                                              |
| resubscribeprofile\_needed | The Marketing Platform profile for the specified email is deleted and the 'force resubscribe' flag is not set |
| addprofile\_failed         | There was an error while adding the Marketing Platform profile                                                |
| updateprofile\_failed      | There was an error while updating the existing  Marketing Platform profile                                    |
| resubscribeprofile\_failed | There was an error while resubscribing the Marketing Platform profile to the list                             |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |
