Agillic integration

Send your campaign data to your Agillic account

Niklas Cuthbert Mehlsen avatar
Written by Niklas Cuthbert Mehlsen
Updated over a week ago

In this article we will talk about:

Adding an integration

In the Agillic integration, you need two kinds of information to connect to the API. It is called an integration in Playable, where it will be referred to as a connector in Agillic:

  • Developer Key

  • Secret

It is possible to see here how you add the integration on a campaign:

If you have problems finding this information in Agillic, you can find a short guide here. After inserting the developer key and secret, you will be able to go to the next step of the setup. If the system gives an invalid_client error message, then the values aren’t correct. Double-check and try again.

The integration will allow you to both:

  • Create a new recipient

  • Update a recipient

  • Trigger an Agillic event for a recipient

Playable will search for the recipient based on their email address. It is required that this field is marked as unique in Agillic. If the recipient doesn't already exist in the database, then it will always create a new recipient with the information gathered in the campaign.

However, if the recipient is already in Agillic, then Playable will only update the recipient’s information if the checkbox Update profile if it already exists is activated.

This means that new data will be added to empty fields and existing data will be overwritten by the new values gathered in the Playable campaign.

Event type

Under event type, there are two options:

  • Form fields

  • Advanced

Event type is the trigger that determines when the recipient information should be sent through the integration. The default setup is to use form fields. Then the integration will use one of the form fields as a trigger to send over the information. This is normally the checkbox where recipients accept terms and conditions. If the checkbox is optional, then the integration will only send over recipients who have ticked the checkbox.

The advanced setup should only be used if you want to create a flow that differs from the norm and doesn’t use form fields. This could be if you want the trigger to be some data from the game, which is called metric data, or if the recipient has chosen a specific value in a dropdown field.

Example:

A client has created a personality test and would like to create a special email flow for customers who end up with a certain result. They are only interested in one segment: people who are in Personality C. Therefore they use the advanced settings with metric data based on the personality type.

Mapping data fields

When it comes to mapping data fields, you need to decide which data fields should be transferred to Agillic via the integration. The default setup contains name, email, and terms and conditions, so you will map the Name field in Playable with the Agillic attribute by selecting it in the dropdown. In this case, Name is mapped to First Name and E-mail to E-mail.

You can also map the terms and conditions field, which by default is a value of 1 or 0 in Playable but in Agillic you need to use the value called true or false. You can change the value of this field by editing the registration form field. If you can’t find the right value in the dropdown, then make sure that the attribute is also available in the integration setup.

If you want to add more fields to the form so that you can map additional information in the integration, then look in our Academy under the course on registration forms.

Manually define:

The integration only shows default/standardized values in the dropdown, for example, First Name, Last Name, E-mail e.g. However, in Agillic it is possible to create your own data fields, so you may need to use the Manually define option from the drop-down. This gives you the opportunity to map the field to any attribute in Agillic, you just need to insert the correct attribute name below.

Example:

In this campaign, you wanted to map up the zip codes of each of the recipients. Therefore the registration form on the campaign contains a form field called Zip code. You want to transfer that value to Agillic. Therefore you create an attribute called Zip code and then insert the value in the field in Playable.

If you don’t know how to create a data field in Agillic then click here.

Testing

To test whether the integration setup works, there are two options.

The first option is the test button which can be found at the end of the integration setup. This will allow you to type in some recipient information and send it to Agillic. You will either see a green checkmark or a red cross, depending on whether the registration successfully went through or not.

The second option is to fill out and submit the registration form on the campaign’s demo URL. Then you can see the registration under the Activity tab, where there will either be gray text under the registration if it successfully went through or red text if there were errors.

When testing the integration it would be best practice to use the staging environment instead of the production environment. Therefore it is advised to use the credentials of a user that is listed Agillic API credentials, the reason for this is that you avoid mixing test data into the production environment.

It is possible you see where you find the right developer key and secret in here.

Troubleshooting

You get an error message when testing, you can see what information was sent via the integration and what the return response was. This might just look a bit confusing if you haven’t worked with integrations before, but if you scroll to the end of the response, you can see the error message. If you don’t understand the error message, you can either send it to us in the Playable support chat or send it directly to Agillic to get help solving the issue.

In this example, the registration was not successfully sent because the recipient already exists in the database, but the “update profile” checkbox was not activated.

One-to-Many

Something unique to the Agillic integration is One-to-Many data mapping. One-to-Many Data is different structurally from Person Data and may require some preparation work before you are completely comfortable using it. Below we share our best practice on how you can start off right when working with One-to-many Data.

First, choose the desired One to Many table. It is possible to map to multiple different tables if needed. Once you’ve chosen a table, the attributes from this table will be available in the dropdown menus, and you can map your data fields to them. Unlike with person data, you will not Manually define the attribute. You must select one of the available One to Many attributes from the dropdown.

Read more about how and why to use One to Many Data here. For more information, reach out to Agillic.

Event ID

Events in Agillic serve two primary purposes. You can track actions with Events and also trigger actions. Each Event has a starting value of 0 (for each recipient).

In order to use a specific event in Agillic based on a campaign from Playable, you will insert the event name in the Event ID field to trigger it. Then each registration will trigger the event, which can either create a specific email flow or create a form of tracking on the recipient.

Read more about Events in Agillic here. For more information reach out to Agillic.

Unique identifier

The unique identifier is the field that determines what the integration searches for when it needs to determine whether to create a new user or update the user. The norm and the default setting would be to search out a recipient by email. However, in some cases it could be more useful to use a mobile number or recipient ID based on the data structure in Agillic.

It is important that the unique identifier is mapped up in the integration.

Did this answer your question?