Voucherify Destination

Destination Info
Partner Owned
  • This integration is partner owned. Please reach out to the partner's support for any issues.

Voucherify helps developers integrate digital promotions across any marketing channel or customer touchpoint - eventually giving full control over campaigns back to the marketing team.

This destination is maintained by Voucherify. For any issues with the destination, contact the Voucherify Support team.

Getting Started

  1. From the Segment web app, click Catalog.
  2. Search for “Voucherify” in the Catalog, select it, and choose which of your sources to connect the destination to.
  3. Enter the “API Key” and “API Token” into your Segment Settings UI which you can find from your Voucherify dashboard.

Getting API Key and API Token

On the Voucherify Dashboard page:

  • Open the “Project settings” from the user context menu on the top right.
  • Find the “Application Keys” section on the project page.
  • Create a new key pair if needed.
  • Use “Application ID” and “Secret Key” respectively as “API Key” and “API Token”.

Identify

If you’re not familiar with the Segment Specs, take a look to understand what the Identify method does. An example call would look like:

analytics.identify('cust_9032_re_3234', {
  email: 'john.doe@example.com'
});

Received events will be carried to Voucherify.io as a Customer Create request unless the setting Identify Disabled is true.

The Customer is created, with a source_id equal to the event userId or anonymousId. When exists, an existing Customer is updated.

With setting Identify Mapping you can customize the conversion from the event payload to Voucherify Customer payload.

# Default identify event mapping (src : dest)
{
  "traits.name"              : "customer.name",
  "traits.firstName"         : "customer.firstName",
  "traits.lastName"          : "customer.lastName",
  "traits.email"             : "customer.email",
  "traits.description"       : "customer.description",
  "traits.address.city"      : "customer.address.city",
  "traits.address.state"     : "customer.address.state",
  "traits.address.street"    : "customer.address.line_1",
  "traits.address.country"   : "customer.address.country",
  "traits.address.postalCode": "customer.address.postal_code",
  "traits.phone"             : "customer.phone",
  "traits.metadata"          : "customer.metadata"
}

Track

If you’re not familiar with the Segment Specs, take a look to understand what the Track method does. An example call would look like:

analytics.track('Registration Completed', {
  name: 'Customer Name'
});

Received events will be carried to Voucherify.io as Custom Events related to the Customer, with an event name equal to segment event value, unless the setting Track Disabled is true.

The Custom Event is attached to a Customer, with a source_id equal to the event userId or anonymousId. The userId field is a field which persists from when you first make an identify call on a JavaScript source. The anonymousId field is a randomly generated field that will be generated when you call a track event. The userId will take priority if anonymousId exists. If userId doesn’t exist, the anonymousId will be used.

With setting Track Events Filter you can define the list of allowed events that will be transferred.

With setting Track Mapping you can customize the conversion from the event payload to Voucherify Custom Event payload.

# Default track event mapping (src : dest)
{
  "properties.name"              : "customer.name",
  "properties.firstName"         : "customer.firstName",
  "properties.lastName"          : "customer.lastName",
  "properties.email"             : "customer.email",
  "properties.description"       : "customer.description",
  "properties.address.city"      : "customer.address.city",
  "properties.address.state"     : "customer.address.state",
  "properties.address.street"    : "customer.address.line_1",
  "properties.address.country"   : "customer.address.country",
  "properties.address.postalCode": "customer.address.postal_code",
  "properties.phone"             : "customer.phone",
  "properties.metadata"          : "customer.metadata"
}

Voucherify Custom Event

Payload mapping

The received event payload is translated, with the specific event mapping (track or identify), to a Custom Event payload.

Regardless of the provided mapping, some fields have a fallback mapping logic:

  • event when not defined, using the event property from the event, if not defined then the event type.
  • customer.source_id when not defined, using userId or anonymousId from the event.
  • customer.name when not defined, trying to build one from firstName and lastName.

Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

Setting Description
API Key
(required)
string. To get ApiKey and ApiToken, please check the Voucherify.io documentation and follow the instructions on the page: https://docs.voucherify.io/docs/authentication
API Token
(required)
string. Voucherify App Token
API URL string. Voucherify API Url, default: https://api.voucherify.io
API Version string. Voucherify API Version, default: latest
Group Disabled boolean, defaults to FALSE .

Check if page event should not trigger CustomEvent sync default: false
Group Mapping text-map, defaults to {}.

Identify event object mapping. default: { traits: customer }
Identify Disabled boolean, defaults to FALSE .

Check if identify event should not trigger CustomEvent sync. default: false
Identify Mapping text-map, defaults to {}.

Identify event object mapping. default: { traits: customer }
Ignore Anonymous boolean, defaults to FALSE .

Check if want to filter events with anonymousId. default: false
Page Disabled boolean, defaults to FALSE .

Check if page event should not trigger CustomEvent sync default: false
Page Mapping text-map, defaults to {}.

Track event object mapping. default: { properties: customer }
Screen Disabled boolean, defaults to FALSE .

Check if page event should not trigger CustomEvent sync default: false
Screen Mapping text-map, defaults to {}.

Identify event object mapping. default: { properties: customer }
Track Disabled boolean, defaults to FALSE .

Check if track event should not trigger CustomEvent sync. default: false
Track Events Filter array, defaults to .

Provide a list of track events that trigger the CustomEvent sync. default: all events allowed.
Track Mapping text-map, defaults to {}.

Track event object mapping. default: { properties: customer }
Track Only Existing Customers boolean, defaults to FALSE .

Check if want to block track events for nonexistent customers.

This page was last modified: 08 Jan 2024



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account