The HTTP connector allows you to retrieve images from Unsplash based on any parameter stored in Contact Profile (for example, name of the city, musical instrument, dog breed, etc.). You can use those images to bring your email personalization to the next level.

This article only shows one of countless possible scenarios. Build your own creative nurture paths with the HTTP connector in Mapp Engage!

Scenario

You are offering pet products and want to personalize welcome messages to new contacts with their specific dog breed image, rather than just a random image.

Prerequisites

To follow the scenario, Mapp Engage  has to be activated and configured.

"Dogbreed" has to be set up as custom attribute.

A) Set up connection with Unsplash API

  1. Go to unsplash.com/developers and register as a developer. Then create an App.
  2. The Getting Started documentation will guide you through the set-up process that will allow you to use the Unsplash API. Complete the steps.
  3. Now create a new record in the Credential Store  that allows you to connect to the Unsplash API.
    In our use case, we will be searching for photos by keyword. For more details see Unsplash Documentation.

B) Prepare Message

Prepare the email you want to send. In Step D we will add the content from Unsplash.

C) Create Whiteboard in Engage

  1. Create an event-based Whiteboard: Automations > Whiteboard NEW > Create > Event-based .
  2. Set the entry event to define, when the whiteboard should be triggered. In our example we use Enters Group, and select the group.

    Enters Group is an Event in the Whiteboard. Engage registers this event when a new contact joins a group. This includes contacts added manually, via an automation, or with certain API methods. For more information, see Enters Group (Whiteboard Event).

  3. As a next step, we are connecting with Unsplash and send the dogbreed of our contact's dog.
  4. Add the job  Send HTTP Request.
    image2020-12-17_9-12-31.png
  5. Select the API connection that you configured in the Credential Store from the drop-down list under Credential Store Record. Select the GET Method and UTF-8 encoding.
  6. Click Add Parameter. Unsplash uses the "query" parameter for the searched term.

    1. Use "query" as parameter name.

    2. Select defined value.
    3. Add the value. In this case, the value is a Custom Attribute that defines the dog breed: ${user.CustomAttribute[‘dogBreed’]}. If you don't have this Custom Attribute defined, see here how to do it.
    4. Click  Save Parameter
    5. Click Apply.
  7. Configure the HTTP Response Body Parser. This allows you to use the parameter values received from the server. In our example we get an image of a specific dog breed, the photographer's name and a link to his profile, so you will add three parsers in this step.
    1. Select JSON from the drop-down list.
    2. Click Add Parser. The Parser Settings window opens.
    3. Insert the parsing formula.

      Use the JSONPath Online Evaluator  to check the validity of your parser formula.

      1. Copy the example API response from  here.
      2. Paste it in the left panel of the  online evaluator.
      3. Paste the parameter in the  JSONPath Syntax field.
      4. Check results on the right panel.
    4. Add parameter name.
    5. Click Save Parser. Repeat the actions in point 7 to add the name parameter. In this example we have three parsers:
      1. Dog Breed (with parsing formula $.results[0].urls.small)
      2. Photographer's Name (with parsing formula $.results[0].user.name)
      3. Photographer's Profile Link (with parsing formula $.results[0].user.links.html)
    6. Click Apply.
  8. Add the job  Send Email and select your prepared message.

  9. Add the parameters to make it usable in your email. 

  10. Click  Apply  and activate your Whiteboard.

D) Edit Prepared Message

Finally, you have to integrate the parameters in your email.

For more information on email personalization, see Inserting Data From a Related Data Set Into a Message.

Related Topics