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

# Playable

Playable's gamification system allows marketers to create, tailor and deploy marketing gamification campaigns and competitions to deliver results at every touch-point. Here you can learn about the Playable integration with Voyado Engage.

The integration offers the following features:

* **Signing up Playable customers to Engage**\
  Once a customer enter a competition and sign up for it, Playable will check if the customer already exists as a contact in Engage. If not, Playable creates them there. If the customer already exists in Engage, Playable will just update the contact with data from the competition.

* **Enriching a customer's profile from Playable**\
  You can ask customers for custom attributes such as interests, favorites and so on in Playable and send this data to Engage to be saved for the contact there.

* **Using custom triggers in Engage**\
  You can trigger automation flows in Engage from Playable, including with personalization, once a customer has completed a campaign / competition. An Engage custom trigger will need to be created for each one (or you can even have several triggers each one). The trigger IDs used needs to be communicated to Playable.

* **Automations for game outcomes via interactions**\
  You can build automation flows around certain specific games or outcomes of a game you have enrolled in, or maybe award customers with points dependent on how many games they have played.

Custom triggers can set up in the Config Hub:

<Card title="See custom trigger setup in Config Hub" href="https://help.engage.voyado.com/hc/en-gb/articles/23407506807068-Custom-triggers" icon="https://mintcdn.com/voyado-partners/0IxEIB2Y6a--gNYY/icons/help-center-link.png?fit=max&auto=format&n=0IxEIB2Y6a--gNYY&q=85&s=4e7f518f776580d7cdae461a964ea2dc" horizontal width="128" height="128" data-path="icons/help-center-link.png" />

## 1 - Create contact if needed

If the customer does not exist in Engage, they can first be created using this endpoint:

```http theme={null}
POST /api/v2/contacts
```

Using a payload like this:

```json theme={null}
{
  "firstName": "John",
  "email": "john.doe@voyado.com",
  "mobilePhone": "4237",
  "campaignSource": "Playable",
  "country": "Danmark",
  "source": "Playable",
  "storeExternalId": "1",
  "contactType": "Member",
  "preferences": {
    "acceptsEmail": true,
    "acceptsSms": true
  }
```

This request will return the `contactId` value that uniquely identifies this contact.

Read more about `contactId` and how to work with it here:

<Card title="Learn about working with contactId" href="https://legacy.developer.voyado.com/en/contacts/identify-contact/find-contact.html" icon="https://mintcdn.com/voyado-partners/0IxEIB2Y6a--gNYY/icons/developer-link.png?fit=max&auto=format&n=0IxEIB2Y6a--gNYY&q=85&s=36f1df27b0269657d842f3301d440083" horizontal width="128" height="128" data-path="icons/developer-link.png" />

<Warning>
  This integration uses v2 of the Engage API.
</Warning>

## 2 - Update the contact

An update to the contacts information (enrichment) can now be made to Engage like this:

```http theme={null}
POST /api/v2/contacts/{contactId}
```

With this kind of payload:

```json theme={null}
{
  "firstName": "John",
  "email": "john.doe@voyado.com",
  "mobilePhone": "345",
  "acceptsEmail": true,
  "acceptsSms": true,
  "campaignSource": "Playable",
  "country": "Danmark",
  "source": "Playable",
  "storeExternalId": "1"
}
```

<Tip>
  Note the difference in how preferences such as `acceptsEmail` and `acceptsSms` are handled in the update payload compared to creation payload shown above.
</Tip>

The Custom trigger (called "proPlayable" in this case) used when the competition is completed for a particular contact is triggered like this:

```http theme={null}
POST api/v2/automation/customTriggers/proPlayable/triggerByContactId/{{contactId}}
```

No payload body is needed in this request.

## Playable's documentation

Read more about the Engage integration with Playable on their site.

<Card title="See Playable's documentation on this integration" href="https://help.playable.com/en/articles/9202774-voyado-integration" icon="right" horizontal />
