> This is part 1 of 2 of the full documentation (pages 1–100 of 196).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.sortment.com/llms-full.txt/1
> Page index: https://docs.sortment.com/llms.txt

> Agents can also search and read this documentation through its [MCP server](https://docs.sortment.com/~gitbook/mcp).

# Welcome to Sortment

We are thrilled to have you on board and are confident that we can help you run marketing right from your warehouse data without the need for SQL knowledge or engineering favours :)

To ensure a seamless onboarding process and get you up and running on Sortment, we have created this guide to help you become familiar with our platform and kickstart your journey.


# Sortment for beginners

## How Sortment Works

Sortment is a warehouse-native customer engagement platform. It connects to your data warehouse, reads your customer data directly from it, and uses that data to send messages across channels like Email, WhatsApp, SMS, and Push.

The data never moves. Sortment reads from your warehouse when it needs to evaluate an audience, personalise a message, or run a journey. Nothing is copied or stored on Sortment's side.

***

### Where Your Data Lives

#### Data Warehouse

Your [data warehouse](https://docs.sortment.com/setup/data-warehouses) is the starting point. It is where your customer records, transaction history, behavioural data, and events all live. Sortment connects to it with read access and uses it as the source of truth for everything. Sortment supports **Snowflake, Google BigQuery, Amazon Redshift, Databricks**, and **PostgreSQL**.

#### Cloud Bucket Storage

Alongside the warehouse, Sortment also connects to a [cloud bucket](https://docs.sortment.com/setup/cloud-bucket-storage) (AWS S3, Google Cloud Storage, or Azure Blob Storage depending on your setup). The bucket is used to stage real-time event data before it gets loaded into the warehouse, and to store campaign-related assets.

***

### The Three Types of table Sortment Works With

#### Primary Table

Your core customer table, with one row per user and a unique user ID. Everything in Sortment is anchored to this table. Audiences are built from it, campaigns are addressed to users in it, and all other data is connected back to it. The user ID is how Sortment identifies each individual across channels and campaigns.

#### Related Tables

Tables that contain more information about your customers. They might hold order history, subscription records, support tickets, ride data, or booking records. Related tables are joined to the primary table (or to each other) so that segmentation can draw on all of this data together.

For example, if you want to target users who placed more than three orders in the last 30 days, that logic runs across the primary table and the orders related table.

#### Events Table

Events capture what users do in your app, on your website, or through other interfaces. Each event has a user ID, an event name, and a timestamp. Examples: app opened, item purchased, booking abandoned, payment failed.

The events table enables audience building based on user behaviour over time. Events in the warehouse are available after the next data sync. They are not real-time. For real-time journey triggers, Sortment has a separate mechanism covered below.

> **What is a warehouse sync?** A warehouse sync is the process your data team has set up to move data from your app or product into the warehouse on a schedule. Think of it like a regular update. Your warehouse is refreshed every few minutes, hours, or once a day depending on how your team has configured it. Sortment reads from the warehouse after each of these updates, which means anything that happened between two syncs will only be visible to Sortment once the next sync completes. If you are unsure how frequently your warehouse syncs, your data engineering team will know.

***

### How the Data Comes Together

#### Schema

Before Sortment can use your data, it needs to understand how it is structured. This is done through [schema setup](https://docs.sortment.com/schema/overview), a one-time mapping that tells Sortment which table is the primary table, which tables are related, and how they connect to each other through joins.

Once the schema is defined, Sortment generates SQL queries automatically based on the relationships you have mapped.

***

### What Sortment Does With the Data

#### Audiences

An [audience](https://docs.sortment.com/engage/audiences) is a defined group of users who meet specific criteria. Those criteria can be based on anything in the primary table, any related table, or any events table. The audience is evaluated by querying the warehouse directly, so it always reflects the current state of your data.

Audiences can be built using a visual filter builder, by writing SQL directly, or by describing what you want to the AI assistant in plain language.

#### Campaigns

A [campaign](https://docs.sortment.com/engage/campaigns) is a message, one-time or recurring, sent to an audience across a channel. The message content can be personalised using any data from the warehouse, with values calculated live at send time. Sortment routes the message through the channel provider you have configured.

#### Journeys

A [journey](https://docs.sortment.com/journeys) is a multi-step automated flow that moves users through a sequence of messages and logic. Journeys can be triggered in several ways:

* When a user performs an action, on a defined schedule (for example, every hour targeting users who have not completed a booking)
* When a user enters or exits a specific audience
* When a user exits another journey.
* Via [API events](https://docs.sortment.com/setup/real-time-events) - This allows users to enter the journey immediately as soon as the event is received on Sortment (Realtime journeys)

#### Attributes

Not every data point you need for personalisation or segmentation exists as a column in your warehouse. Custom [attributes](https://docs.sortment.com/engage/attributes) let you define computed values, such as aggregations, calculations, or conditional logic, that Sortment evaluates live at query time.

For example, "number of completed rides in the last 90 days" is not a column that exists in most warehouses. It is a calculation across the rides table per user. You define it once as a custom property and from that point it is available everywhere in Sortment, in audience filters, in message personalisation, analysis and in profiles.

Custom attributes are never stored. The logic is saved, but the value is always calculated fresh from the warehouse when it is needed.

***

### Real-Time Events

In addition to the events table in your warehouse, Sortment supports [real-time event](https://docs.sortment.com/setup/real-time-events) ingestion through an API. Your app or server sends events directly to Sortment as they happen. These events are user for immediately triggering journeys/real-time usecases.

**Why to setup API events?** - Warehouse events are available after the next warehouse sync. Real-time API events are available the moment they are received and allow entering a journey instantly and receiving a campaign immediately when a user performs an action.

***

### The AI Assistant

Sortment has a built-in AI assistant that works across all of the above. It can build audiences, create attributes, write SQL, design templates, create campaigns, and build journeys, all from a plain language prompt.

The AI works with three things:

* **Schema** - so it knows what tables and columns exist
* **Intelligence blocks** - context you give it about your business, your data definitions, and your brand
* **Existing entities in your workspace** - so it does not duplicate work that already exists

The more context you give it through intelligence blocks, the more accurately it can work.


# Getting the Most Out of Sortment AI

Sortment has a built-in AI agent that works across the entire product as a team member helping you to builds real things inside Sortment from plain language prompts: audiences, custom properties, templates, campaigns, journeys, and analysis. Everything it creates goes into Draft so you can review before anything goes live.

This guide explains how it works, how to set it up properly, and how to get the most out of it day to day.

***

### What Sortment AI Can Do For You

Think of the AI assistant as three people on your team working simultaneously.

**A data analyst**

The AI can write complex SQL, build audiences from plain language descriptions, create custom attributes, and build and save charts so you have reusable outputs without re-running queries every time. Work that previously needed a data engineer can be done in minutes.

**A campaign strategist**

The AI monitors your campaigns and KPIs continuously. It surfaces recommendations on your home page feed every day, specific suggestions based on what is actually happening in your workspace, not generic tips.

**A marketing co-pilot**

The AI helps you see your data in ways you might not have thought to look. It identifies patterns, spots segments you were not targeting, and connects campaign performance back to business outcomes. It works toward the goals you have defined.

***

### Where to Find It

The AI assistant is accessible from two places:

* The **Assistant** button in the top-right nav, which opens as a slide-over panel
* The **chat input on the home page**, visible as soon as you land on the home page

The home page input also shows quick action chips: Build audience, Create attribute, Analyze data, and more. These are shortcuts to common tasks.

***

### Why It Needs Context to Work Well

The AI knows your schema: the tables, columns, and relationships in your warehouse. But it does not know your business to the precision until it has been taught. Think of Sortment Agent as your team-mate that required KT to work the way required.

Without context, if you ask it to "create a re-engagement campaign for lapsed users," it does not know what exactly "lapsed" means in your company, for creating content what tone your brand uses, which channel you prefer for re-engagement, or what a successful conversion looks like for this goal. It will produce something technically valid as per its understanding at an industry level but it may not be tailored to you.

With the right context in place, it knows all of that and produces outputs you can use immediately.

***

### Intelligence Blocks: The Most Important Setup Step

Intelligence blocks are the AI's long-term memory for your workspace. They are how you give it the context it needs to work well. Every time the AI builds something, it reads all the required intelligence blocks first.

Go to Settings, then Sortment AI, then Intelligence to create them.

**The three blocks to create before doing anything with the AI:**

**Business context** What your company does, what your marketing goals are, how you define key segments, and what success looks like. Examples of what to include: "We are a ride-hailing company. Our primary goal is to increase ride frequency among existing riders. A lapsed user is someone who has not taken a ride in 14 days. A high-value user is someone who takes more than 8 rides per month." etc.

**Data context** The best way to do this is by sharing some sample SQL queries and the purpose of the queries directly in a sheet and let Sortment understand the tables and their purpose, the joins used etc. on its own and fill up the required intelligence blocks.\
\
If required - what the important values are, and any data quirks your team knows about. Examples: "The primary table is called users. The rides table has a column called "e\_sts" with values: completed, cancelled, in\_progress to be used for identifying the ride status". Most of this data is also auto ingested during AI chats overtime.

**Content and design guidelines** Your brand tone, preferred structure, color schema, theme CTA style, what to avoid, basically the complete content DNA that you desire Sortment to use.\
\
A few ways to achieve this -

* Upload the tempalte on Sortment and just ask the AI to extract the email and content guidelines from the tempalte. Use "@" to refer the template in the AI chat.
* If you have an existing doc on your design and content guidelines, upload the doc directly in the Intelligence blocks and let the AI ingest all the informaton to create a block.
* If you do not have any existing content and want to start with something, you can always go to the community templates on Sortment and select any that you like from thousands of available template. Ask the AI to make changes on that template as you desire and then let Sortment AI extract the content and design guidelines from the created templates.

The same can be done for as many designs as required, just make sure to tell the AI to give a separate name for every template. Moving forward just prompt about your campaign goal, personalisations and the design you seek (if multiple) and let the AI create the template for you.

**Building blocks over time**

You do not have to create everything at once. The AI can also extract memories from your conversations and suggest saving them as intelligence blocks. Over time, your blocks get richer and the AI gets more accurate.

***

### How to Write a Good Prompt

The more specific your prompt, the better the output.

**For audiences**

Include the criteria explicitly. Time windows, thresholds, and column values help.

Less useful: "Create an audience of lapsed users" More useful: "Create an audience of users whose home city is New York, who have taken at least 5 rides in total, but have not taken a ride in the last 30 days"

**For custom properties**

Describe what you want to calculate and give an example of what the output should look like.

Less useful: "Create a property for ride frequency" More useful: "Create a property that counts the number of completed rides a user has taken in the last 90 days. For a user with 12 rides in that period, it should return 12."

**For campaigns**

Mention the channel, the audience, the goal, and the tone.

Less useful: "Create a re-engagement email" More useful: "Create an email campaign targeting the NYC Lapsed Riders audience with the goal of getting them to book a ride. Friendly and slightly urgent tone. Include a 15% discount offer."

**For journeys**

Describe the trigger, the sequence, and any exit conditions.

Less useful: "Build a post-ride journey" More useful: "Build a journey triggered when a user completes a ride with a rating below 3. Send a WhatsApp apology within 30 minutes. Wait 24 hours. If no response, send an email with a discount code."

***

### What the AI Does When It Needs Clarification

If your prompt is ambiguous or references data that does not exist in the workspace, the AI will ask a clarifying question before proceeding.

Clarifications appear as a structured card with multiple choice options. The options are pulled from actual data in your workspace and it will not suggest cities or values that do not exist in your tables. There is a recommended option, a skip option, and a free-text option if none of the choices fit.

The clarification and your answer are logged in the conversation so you can refer back to them.

***

### Using the AI for Specific Tasks

#### Build audience

Use the quick action chip or describe the audience in the chat. The AI loads your schema, checks existing audiences to avoid duplication, builds the filter logic, and creates the audience as a Draft. Review the logic and the matched users in the audience builder before publishing.

#### Create attribute

Describe the property you want to compute. The AI picks SQL or the UI builder based on complexity. Review the generated logic in the attribute detail view before using it in campaigns.

#### Analyze data

Ask specific questions. "Which campaigns had the lowest click-to-open rate last month?" or "Show me the distribution of ride counts across my user base." Be specific about what you want to understand and how you want the output presented.

#### Create campaign

Give the AI a channel, an audience, a goal, and a tone. It builds the campaign structure and creates a template draft. Review both before publishing.

#### Build journey

Describe the trigger and the sequence of steps. Complex journeys with many branches may need refinement after creation. Use the follow-up input to iterate on the same conversation.

#### Set up KPI tracker

Go to Analyze, then KPI tracker. Describe the metric you want to monitor in plain language. The AI sets up the tracker and it begins feeding your home page feed with trends over time.

#### Set up tasks

From the home page chat, access the Tasks section from the navbar. Describe a recurring job you want the AI to run. Examples: "Every Monday morning, review last week's campaign performance and surface what worked and what did not." Tasks run on schedule and their outputs appear in the home page feed.

***

### The Home Page Feed

The home page feed (Insights, Alerts, Needs input) is powered by the AI working in the background.

**Insights** are proactive recommendations generated from your KPI data, campaign performance, and audience trends.

**Alerts** are notifications when something needs attention: a campaign missed its send date, a journey has an error, a draft is stale.

**Needs input** is where the AI surfaces things it cannot do without a decision from you.

The more you set up (KPI trackers, tasks, intelligence blocks) the richer and more useful the home page feed becomes.

***

### Common Mistakes to Avoid

**Skipping intelligence blocks** The single biggest reason AI outputs are generic. Set up the three core blocks before doing anything else with the AI.

**Prompts that are too vague** "Create a re-engagement campaign" produces something generic. Add the audience, the channel, the goal, and the tone.

**Not reviewing before publishing** The AI always creates as Draft. It is a co-pilot, not an autopilot. Review the logic, the targeting, and the content before anything goes live.

**Expecting the AI to know things not in the schema or intelligence blocks** The AI only knows what is in your workspace. If a table is not mapped or a business definition is not in an intelligence block, the AI is working without that information.


# Core Concepts

Sortment is warehouse-native engagement platform for companies with their source of truth in the data warehouse. Here's a rundown of some core concepts to help with high-level understanding of Sortment.

### Organization

An organization is created when you sign up in Sortment. Everyone in your company will be part of one organization, with different teams or geographies or use cases being operated through different workspaces. The user who creates an organization is an Organization Admin. All Org Admins have access to all workspaces created in Sortment.

### Workspace

A workspace is a unique instance to manage your own users, data, campaigns, and integrations, allowing for separation between different parts of a business while still being managed within a single Sortment instance.

### Data Warehouse

A Data Warehouse is a centralized repository where large volumes of structured data is stored, organized for advanced analytics and querying. The most frequently used data warehouses include Snowflake, Google BigQuery, Amazon Redshift. This is the source of truth for your customer data and will be connected to Sortment for creating audiences and accessing user variables for campaigns.

### Cloud Bucket Storage

Cloud Bucket Storage is specific cloud storage associated with platforms like AWS S3 or Google Cloud Storage, where data is stored in containers called "buckets." These buckets can hold vast amounts of unstructured data, such as files, images, and videos, and provide features like scalability, security, and easy access via APIs. This is used to store campaign related data before sending to marketing platform and manage campaign events.

### Primary Table

Primary Table is the table that holds initial customer data with unique identifiers (User ID). This table will be used to create audiences on your data and uniquely identify users for your campaigns or journeys.

#### User ID

User ID is a unique identifier assigned to each customer, which tracks individual behavior across channels and campaigns. All other identifiers like device id, anonymous id get resolved into a known user id for marketing purposes.

### Schema

Schema defines the structure, organization, and relationships of data stored in the warehouse. It stores information about the tables, the type of data within them and joins between tables to allow querying of the data.

### Related Table

Related Table contains more data about the customer that can be used for segmenting users. These tables may be joined with primary table or to other related tables.

### Events Table

Events Table captures all user interactions, such as clicks, purchases, or app usage. This may include anonmyous events data which is resolved to a unique user through joins directly or indirectly with primary table. This unlocks event-based analysis to create audiences and segment users into different cohorts.

### Audience

Audience is a defined segment of users based on specific criteria, such as demographics, behaviors, or purchase history. These audiences can be created by choosing filters on Sortment, or through conversation with an AI agent on Sortment.

### Custom Properties

Custom Properties are aggregated attributes attached to users, events, or other data that allows marketers to create more tailored messages and experiences. This stores the logic for a new property for a user which does not directly exist in the data warehouse, and is added to queries for segmentation or campaign data.

### Campaign

Campaigns are one time or recurring messages sent to an audience with a clear goal, such as increasing sales or customer retention. Each campaign is sent to a channel, with analytics available to track their effectiveness.

### Journeys

Journeys are multi-step, automated campaigns aimed at engaging users across various channels, such as email, push notifications, in-app messages, and more. They are real-time communications managed with certain events user does on the app, website or other interface.

### Real-time Events

These are specific actions or interactions that users take within an app or website, which can be tracked and utilized to enhance customer engagement and personalized marketing strategies. Events need to be whitelisted on Sortment before they can be used in Journeys to send communications to the user.

### Profiles

Profiles refer to the individual user record in Sortment. It aggregate data about user interactions, preferences, and behaviors.


# Contact Us

Need help with Sortment? Our team is here to support you at every step — from onboarding and warehouse setup to building audiences, campaigns, and journeys.

## Reach our support team

For any questions, issues, or feedback, email us at <support@sortment.com>. Our team will get back to you as quickly as possible.

{% hint style="success" %}
For the fastest resolution, include your workspace name and a short description of what you were trying to do — screenshots or error messages help too.
{% endhint %}

## Before you reach out

Many common questions are already answered in the docs:

* Browse the [FAQ](https://docs.sortment.com/faq/faq) for frequently asked questions.
* Check the [How to guides](https://docs.sortment.com/how-to-guides/email-templates-with-sortment-ai) for step-by-step walkthroughs.
* New to the platform? Start with [Sortment for beginners](https://docs.sortment.com/getting-started/sortment-for-beginners) and [Core Concepts](https://docs.sortment.com/getting-started/core-concepts).


# Intelligence blocks

## Overview

Intelligence blocks are the AI's long-term memory for your workspace. They are how you give Sortment AI the context it needs to work accurately - your business definitions, your data structure, your brand guidelines, and anything else the AI should know before it builds something for you.

Every time the AI assistant takes an action - building an audience, writing a template, creating a journey, surfacing a recommendation, it reads all intelligence blocks first.

***

### Why Intelligence Blocks Matter

Sortment AI knows your schema. It can see your tables, your columns, and how they relate to each other. But it does not know your business unless you tell it.

Without intelligence blocks, the AI is working without context. It does not know what "lapsed" means at your company, what tone your brand uses, which channel you prefer for different use cases, or what a successful conversion looks like for your goals. The outputs it produces will be technically valid but not tailored to you.

With well-maintained intelligence blocks, the AI produces outputs you can use immediately; audiences that match your actual definitions, templates that sound like your brand, journeys that reflect your real use cases.

> The quality of every AI output is directly proportional to the quality of your intelligence blocks and the information provided in the prompt. This is one of the most important setup step to derive more meaningful output by the AI.

***

### How to Create an Intelligence Block

1. Go to **Workspace settings → Intelligence**<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-3ad06af9b86a801ca321e2c1f09e3dbb7b80ebb4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Click **New block**
3. Provide the purpose for this intelligence block like "defining and business KPIs"
4. Select the categories ("Business Context", "Data Definitions", "Data Analysis", "Attribute Creation","Engagement Strategy","Audience Creation","Business Context")<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-69498c502b5fcfcd8272a3c3052ad15e11152c68%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
5. Add the content - either type it directly or attach a file (PDF, document)

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-eb60d505ed634ca5c95cfae60d35477b7c14015a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
6. Click **Save**

The AI will reference this block whenever the context is required for all future actions in the workspace.

There is no limit on the number of blocks you can create.

***

### The Three Blocks we suggest to Create First

**Business Context**

Tell the AI what your company does, what your marketing goals are, how you define your key user segments, and what success looks like.

**What to include:**

* What your product or service does
* Your primary marketing goals (e.g. increase ride frequency, reduce churn, activate new users)
* Definitions for key business terms the AI will encounter (e.g. "A lapsed user is someone who has not taken a ride in 14 days", "A high-value user takes more than 8 rides per month")
* Key user segments you care about

***

**Data Context**

Tell the AI about your warehouse structure the table names, key column names, what the important values mean, and any data quirks your team knows about.

**What to include:**

* Names of your key tables and what they contain
* How tables relate to each other in plain language
* Any data quality notes (e.g. "The `homecity` column is null for users who signed up before 2022")

You can directly get a list of SQLs and their purposes on a txt or a pdf and directly share it with the AI in the intelligence blocks and let the AI derive all this information by itself

> This block helps AI to understand the tables and their purpose. The more precisely you describe your data, the more accurate the queries the AI writes.

***

**Content and Design Guidelines**

Tell the AI how your brand communicates so that templates and campaign copy it generates match your style.

**What to include:**

* Brand tone (e.g. "Friendly and direct. Not formal.")
* How to address users (e.g. "Always use first name")
* Your Email Structure, theme and skeleton
* CTA style (e.g. "Action-oriented: 'Book now', 'Get back on the road'. Avoid 'Click here'.")
* Channel-specific rules (e.g. "WhatsApp messages should be short and conversational. Email can be longer.")
* Anything to avoid (e.g. "Never use exclamation marks in subject lines")

{% hint style="info" %}
If you do not have any existing content and want to start with something, you can always go to the community templates on Sortment and select any that you like from thousands of available template. Ask the AI to make changes on that template as you desire and then let Sortment AI extract the content and design guidelines from the created templates.
{% endhint %}

***

### Building Blocks Over Time

You do not have to create everything at once. Intelligence blocks can be built incrementally as you work with the AI.

**Memory extraction:** As you have conversations with the AI assistant, it identifies things you say that should be saved - business definitions, preferences, corrections. It surfaces these as suggestions and asks if you want to save them as a new block. Confirm to save, decline to discard.

**Saving mid-conversation:** You can ask the AI directly at any point - "Save that as an intelligence block" or "Remember that for future use" and it will create the block from the current conversation context.

***

### What Happens if You Skip Intelligence Blocks

The AI will still work. But it will produce generic outputs that may require manual editing before they are usable.

Common symptoms of missing or thin intelligence blocks:

* AI builds audiences using different definitions than your team uses (e.g. defines "lapsed" as 30 days when your business uses 14)
* AI generates templates that do not match your brand tone
* AI asks clarifying questions about things your data context block should already cover
* AI-generated SQL references wrong column names or uses incorrect values

If AI outputs are consistently off, the first thing to check is whether the relevant intelligence block exists and whether it is specific enough.

***

### Managing Intelligence Blocks

* **Edit** a block at any time by clicking on it and updating the content
* **Delete** a block if it is outdated or no longer relevant; the AI will stop referencing it immediately
* Review blocks periodically, especially after your data structure changes or your brand guidelines are updated


# KPIs

## What is a KPI?

A **KPI (Key Performance Indicator)** is any measurable value that tells you how your business is doing against a goal. In Sortment, a KPI is a metric you define once and then track over time on your dashboard, so you always have a live read on the numbers that matter most.

A KPI can be almost anything you care about. Common examples:

* **Number of paid users** — how many users currently hold a paid plan.
* **Conversion rate in an onboarding funnel** — the percentage of new users who complete onboarding.
* **Day 30 churn rate** — the share of users who stop being active within 30 days of signing up.

KPIs are flexible by design. You can define them with **no-code logic** on the Sortment dashboard, using the same filters you already use to build audiences, or you can write the exact logic yourself in **SQL**. Once created, a KPI is calculated on a schedule you choose and charted over time so you can spot trends, spikes, and drops at a glance.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-90f74ee78f1fb0f87346ac8d7eff65ccdb5d56c5%2Fcreate-a-document-on-how-to-set-up-a-kpi-2.png?alt=media" alt=""><figcaption><p>A tracked KPI showing its current value, the change over the previous period, and a growth chart over time</p></figcaption></figure>

{% hint style="info" %}
KPIs share the same filtering engine as audiences. If you know how to build an audience, you already know how to define most KPIs. See [Audience Filters](https://docs.sortment.com/engage/audiences/audience-filters) for a full reference on filter conditions and operators.
{% endhint %}

***

## Creating a KPI

### Step 1: Open the KPI creator

From the KPIs dashboard, click **Create KPI** in the top-right corner. You can switch between grid and list views of your existing KPIs using the toggle next to the button.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-a48b3711ead6785e701bbd02076068d1d6472624%2Fcreate-a-document-on-how-to-set-up-a-kpi-1.png?alt=media" alt=""><figcaption><p>The Create KPI button and the grid/list view toggle on the KPIs dashboard</p></figcaption></figure>

### Step 2: Add the details

In the **Add KPI** panel, fill in the basic details:

* **KPI Name** — a short, recognisable name (e.g. `Day 30 churn rate`).
* **Description** — what this KPI measures and why it matters, so teammates understand it at a glance.
* **AI usage context** — optional guidance for Sortment AI on how this KPI should be interpreted. Use it to encode expectations or thresholds the AI should be aware of, for example: *"We want this KPI to never fall below 20%."*

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c47f8bfd9c38fca0c1c52de5d8c1b34c11dd9c0b%2Fcreate-a-document-on-how-to-set-up-a-kpi-3.png?alt=media" alt=""><figcaption><p>The Add KPI panel with Details fields, the tracking-type selector, and the live Preview panel on the right</p></figcaption></figure>

{% hint style="info" %}
AI usage context is workspace memory scoped to this KPI. For business definitions and context that apply everywhere, use [Intelligence blocks](https://docs.sortment.com/using-sortment-ai/intelligence-blocks) instead.
{% endhint %}

### Step 3: Choose what to track

Under **What do you want to track?**, pick one of four modes depending on the kind of value you want to measure.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-b60d91e266646e5fa8163be3fb080b27d7ad94ab%2Fcreate-a-document-on-how-to-set-up-a-kpi-5.png?alt=media" alt=""><figcaption><p>The four tracking modes and the filter builder used to define who or what is included</p></figcaption></figure>

#### People

Counts **how many users fit certain conditions** — typically the number of people in an audience. Under **Who should be included?**, add conditions using the same filter builder as the audience builder. For example, filter to users on a paid plan to track your number of paid users.

#### Actions

Counts **how often something happened**, based on an event you track. For example, count the number of purchases in a period. You can narrow the count with filters within the Actions block — for instance, count only purchases made by new users.

#### Metric

Computes **the total or average value of something**. For example, take the highest purchase value per user in the last 30 days and track that value across all users. Use this mode when the KPI is a numeric aggregate rather than a count.

#### Custom code

Lets you **write your own logic in SQL** for full flexibility. Paste a query that returns your KPI value. You can use Sortment AI to draft the SQL for you and copy-paste it here.

{% hint style="success" %}
Not sure how to express a metric in SQL? Ask Sortment AI to write the query for you, then paste it into Custom code and preview the result before saving.
{% endhint %}

### Step 4: Preview and format the value

The **Preview** panel on the right shows what the KPI value will look like before you publish. Click **Calculate value** to run the logic and confirm you get the number you expect.

To keep your dashboard clean and readable, apply **custom formatting** to the value. You can format the output as:

* **Currency** — for monetary values (e.g. revenue, average order value).
* **Number** — for counts (e.g. number of paid users).
* **Percentage** — for rates (e.g. conversion rate, churn rate).

{% hint style="warning" %}
Always preview the value before saving. A quick check here catches filter or SQL mistakes before the KPI starts charting on your dashboard.
{% endhint %}

### Step 5: Set the tracking frequency

Under **When should this KPI be tracked?**, choose how often Sortment recalculates the KPI. Set it to run as frequently as **Daily** at a specific time, or **Weekly** or **Monthly**. The times use your workspace timezone.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-2c43594a29789348b6153b8ed9cbfaafaa34009b%2Fcreate-a-document-on-how-to-set-up-a-kpi-4.png?alt=media" alt=""><figcaption><p>Setting a KPI to recalculate daily at a fixed time in the workspace timezone</p></figcaption></figure>

{% hint style="info" %}
The timezone shown here is your workspace timezone. To change it, see [Workspace Timezone](https://docs.sortment.com/settings/workspace-timezone).
{% endhint %}

### Step 6: Save

Click **Save** to publish the KPI. It now appears on your KPIs dashboard, where it displays the latest value, the change over the previous period, and a growth chart that updates on your chosen schedule.


# Tasks

A Task is a recurring instruction you give Sortment to perform a specific piece of work on your workspace, on a schedule you define. Describe the work once and Sortment keeps doing it, surfacing a report each time it runs.

### How to create a Task

1. **Describe the work:** Tell Sortment what you want it to do, in plain language - for example, "audit the campaigns currently running in my workspace every day at 10am and flag anything worth attention."
2. **Answer any clarifying questions:** If the agent needs more detail to run the Task correctly, it will ask. For example, it may ask which metrics to prioritize or which campaigns to include.
3. **Confirm the schedule:** a specific day, interval, or time of day the Task should run on.
4. **The Task goes live.** Once everything is confirmed, the Task is active and will run automatically on the schedule you set.

**Where to find your Tasks:** Click the chat icon on the home page, then switch to the **Tasks** tab. This is where you can see all your active Tasks and read the reports each run produces.<br>

#### Example

> **You:** "Create a Task that audits the campaigns currently running on my workspace every day and gives me a report on issues, insights, and actionables."
>
> **Sortment:** "What time should I run this audit every day?"
>
> **You:** "9 AM every day."
>
> **Result:** Sortment creates the recurring Task. Every day at 9 AM, it runs the campaign audit and drops the report into your Tasks view

### Interacting with a Task

**From an Alert or Insight.** When a Task run produces something worth surfacing, it shows up as an Alert or Insight on your home page. Click into it, then select **Explore** to open an AI chat that already has the context of that Task run loaded in, so you can ask follow-up questions or dig deeper without re-explaining what you're looking at.<br>

**From the Task report directly.** You can also go straight to a specific run's report:

1. Click the chat icon on the home page.
2. Switch to the **Tasks** tab.
3. Select the run you want to see the report for.


# Data analysis

### How to run an analysis

1. Open the AI assistant (the assistant icon in the top right of Sortment) or the home page.
2. Ask your question in plain language. Be specific about what you want to know and how you want the output framed. For example: "which campaigns had the lowest click-to-open rate last month, give me a table sorted by conversion rate."
3. If the AI needs more detail to answer accurately, it will present a structured clarification card: a labelled question, a set of options pulled from your actual workspace data, a recommended option, and a free-text option if none of the choices fit. You can also just skip the question if it isn't important.
4. Review the result. The AI shows its logic and the SQL it ran, so you can verify the numbers before relying on them.
5. Ask a follow-up in the same thread if you want to refine the analysis. It's a multi-turn conversation, not a one-shot query.

### What the AI actually does

When you ask an analysis question, the AI runs through this sequence automatically:

1. Loads the intelligence blocks for your workspace (business context, data definitions) so it understands what terms like "active user" or "conversion" mean in your business, not just generically.
2. Loads the warehouse schema and table relationships.
3. Fetches the exact table and column names it needs for your question.
4. Writes the SQL required to answer the question and runs it directly against your warehouse.
5. Returns the result as a table or chart, along with a summary of what it found and the SQL logic behind it.

A few things worth knowing about how this works:

* The AI only knows what's in the warehouse schema and your intelligence blocks. If your business context isn't documented anywhere Sortment can see it, the AI will guess at definitions instead of using your actual ones. Setting up a data context intelligence block (table names, column meanings, key values) makes analysis answers much more reliable.
* You can also set this up as a recurring task instead of a one-off question, for example: "every Monday, check which campaigns had below-average click rates last week." Recurring analysis tasks feed directly into the home page insights feed.
* Always validate AI-generated SQL while setting up before treating the output as final, especially for anything going into a report or decision. The AI is a co-pilot for analysis, not a replacement for review.

### Saving your output

Once the AI returns a table or chart, you get the option to save it rather than losing it at the end of the conversation. Saved charts and tables live in Analyze, alongside your other dashboards, so they're available to revisit or share later instead of being a one-off answer buried in a chat thread.


# Overview

Let's work through an example of uber rides. You want to use Sortment to create Audiences to personalise your marketing campaigns based on your customers' activity on your website or app. Before you start creating these audiences, you need to define two essential datasets:

* The set of people who make up your audiences — in other words, your customers
* The characteristics you want to filter these people on. For example, active riders, preferred ride type, actions they've taken on your website or app, etc.

In Sortment, you define the first as the primary table and the second ones as related tables and events. Related tables and events are similar; they're characteristics to filter primary table off of. When you add a table related to your primary table, you define the relationship between them. These tables and the relationships between them are known as your schema.

Schema setup is a one-time configuration process. Once you've set up your schema, you can build your audiences with same set of related tables and events. The schema setup process requires a technical understanding of your data and its relationships. Data or analytics engineers are often involved.

By following along with the setup on this page, you'll learn how to create a schema like this:

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c59f07e0857162ca2e44f7381d591a93f4bf4041%2Fa1.png?alt=media)

## Primary table

Primary table is the main dataset you want to build your audiences off. Once your data warehouse connection is set, you will choose your primary table.

In the uber example, the parent model would be the dataset of all customers. It could include the following columns:

* `user_id`: Unique identifier for your customer - this should be the primary key of the table and be used as foreign key for other related tables
* `full_name`: Full name for your customer
* `phone_ number`: Contact number for your customer.
* `email`: Email for the customer
* `created_at`: Timestamp when the customer was created
* `modified_at`: Timestamp when some parameter for the customer was modified

## Primary table setup

Parent model definition is a one-time step you can complete by following these steps:

1. Go to the Schema page.
2. Click Add primary table. You will see list of tables Sortment has access to from your data warehouse. Choose the primary table basis the definition above.

![](https://files.readme.io/70948bd-image.png)

3. Enter the name for your primary table, for example, "Users".
4. Optionally, enter a description.
5. Select a primary key. Make sure this key is unique and consistent across other tables you join it to.
6. Set fields labels and optionally their descriptions. This will help improve readability of your fields when building [Audiences](https://docs.sortment.com/engage/audiences) and [Campaigns](https://docs.sortment.com/engage/campaigns) later.
7. Click *"Looks good!"* to create your primary table.

![](https://files.readme.io/ff790f5-image.png)

In the uber example, a related table could be an ride details table with columns for:

* `Fare`: Total fare for the ride
* `Driver_id`: Unique id for the driver
* `phone_number`: Customer phone number for the order for communication purposes
* `Pickup_location`: Pickup location for the ride
* `Dropoff_location`: Drop-off location for the ride
* `customer_name`: Customer name
* `placed_on`: Ride assigned timestamp

For these events, an events model might include columns for:

* `id`: Unique event id
* `timestamp`: Timestamp for occurrence of the event
* `event_name`: Event name
* `user_id`: User id for the customer who did the event. This is the column the events table gets joined on with users table

An events table might include your app events:

* `account_created`
* `account_updated`
* `ride_requested`
* `payment_success`

## Relationships

When you create related or event tables, you simultaneously set up their relationships.

In the uber example, let's say you want to create an audience of customers who ordered a specific ride or who did a particular event action on your app. You need to define a relationship between your primary table (users) and your related table (orders) and events table (events).

Under the hood, Sortment generates SQL `JOINs` between your tables. To make this possible, you must create relationships by selecting the foreign keys between your tables.

![](https://files.readme.io/9f48a5a-image.png)

![](https://files.readme.io/e746904-image.png)

## Directionality

Relationships are directional. That means you can create and view relationships starting from a parent to a child table.

For example, 1:many relationship can be created from users to events

![](https://files.readme.io/907d76e-image.png)

The schema overview page shows the schema from the perspective of primary table; labels are displayed accordingly.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9836b4e368c3e26dccfbd2831464c7a0e84c5c60%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>


# Related and Events Table

In the uber example, a related table could be an ride Details table with columns for:

* `Fare`: Total fare for the ride
* `Driver_id`: Unique id for the driver
* `phone_number`: Customer phone number for the order for communication purposes
* `Pickup_location`: Pickup location for the ride
* `Dropoff_location`: Drop-off location for the ride
* `customer_name`: Customer name
* `placed_on`: Ride assigned timestamp

For these events, an events model might include columns for:

* `id`: Unique event id
* `timestamp`: Timestamp for occurrence of the event
* `event_name`: Event name
* `user_id`: User id for the customer who did the event. This is the column the events table gets joined on with users table

An events table might include your app events:

* `account_created`
* `account_updated`
* `ride_requested`
* `payment_success`

## Relationships

When you create related or event tables, you simultaneously set up their relationships.

In the uber example, let's say you want to create an audience of customers who booked a ride or who did a particular event action on your app. You need to define a relationship between your primary table (users) and your related table (orders) and events table (events).

Under the hood, Sortment generates SQL `JOINs` between your tables. To make this possible, you must create relationships by selecting the foreign keys between your tables.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c59f07e0857162ca2e44f7381d591a93f4bf4041%2Fa1.png?alt=media)

## Directionality

Relationships are directional. That means you can create and view relationships starting from a parent to a child table.

For example, 1:many relationship can be created from users to events

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-5e2557939af37337e3a7ed2164f095d96457d5c5%2Fa4.png?alt=media)

The schema overview page shows the schema from the perspective of primary table; labels are displayed accordingly.


# Setting Up Related Table

Related tables help you add more context on the users data in Sortment. Here's how you can add a related table, either from a connected warehouse or a CSV upload:

1. In the **Schema** view, click the **“Add table”** button (top right of the canvas).
2. Select **“Add related table”** from the dropdown.
3. In the **Setup** step, choose your source:
   * **Warehouse** – Select this if you're linking to a table already synced with data warehouse.
   * **CSV** – Use this if you're uploading data from a CSV file.

{% hint style="danger" %}
For CSV upload make sure your file follows the format:

* **Headers** must contain only **letters, numbers, or underscores,** No spaces or special characters are allowed in header names and each header must be **≤ 255 characters**.
* The CSV file must be less than 50MB in size.
  {% endhint %}

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c59f07e0857162ca2e44f7381d591a93f4bf4041%2Fa1.png?alt=media)

2. Once you've chosen the data source, you'll see a list of available tables. Select the relevant table (e.g., `FMS_REFUNDS`) and click **Continue**.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-2a9bd0fcdff02473f4a0e0da890c015a5f8710dd%2Fa2.png?alt=media)

3. Sortment may suggest a table name based on the table details. This will be helpful in identifying this table easily.
4. Optionally, enter a description.
5. Choose the Primary key column in your related table. This column should contain unique identifier for records in the table.
6. Click Next.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-2d5c1b7894a4d63bbf68d4b57808d426623d1852%2Fp12.png?alt=media)

7. Configure the following table properties for each column:
   1. **Visibility:** Turn a column on or off depending on whether you want to use it in Sortment.
   2. **Labels:** Sortment will autosuggest labels and descriptions for your table. Label the fields in your events table. These can be used to filter on events data in Audiences.
   3. **Descriptions** *(optional):* Describe what your column contains.
   4. **Masked toggle**: Turn this on for sensitive information (e.g., personal identifiable data). Masked data will be protected and hidden by default in UI previews to comply with regulations and security.
   5. **Cached toggle**: Caching a column stores unique values from the column to make them accessible in the filter dropdowns.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-6afe9b77c455673b298bbce316b5cdc4021ff8ef%2Fp31.png?alt=media)

8. Once you've configured all the necessary properties, click **“Save”** to finish adding your related table. The new table will now appear in your schema. Now let's define this table's relation to other tables already existing in your schema.

### Joining Tables

1. **Select the table** you want to work with (e.g. `User Information`).
2. Go to the relations tab to join the `FMS_REFUNDS` with `User Information` .

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-5e2557939af37337e3a7ed2164f095d96457d5c5%2Fa4.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click **connect table** at the bottom.
4. In the join setup:

* Choose the **column from the current table** you want to join on (e.g. `Id` from `User Information`).
* Select the **join type** (`1:1`, `many:1`, etc.).
* Pick the **column from the target table** you want to join to (e.g. `FMS ORDER ID` from `FMS_REFUNDS`).

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-f757abb9d464dd4a37621edff3a0e01cad27e021%2Fa5.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Once your configuration is complete, click **Save**.

This will link the data across tables based on the selected keys, enabling richer queries and insights.


# Setting Up Events Table

Event definition is a one-time step. You can complete event setup by following these steps:

1. Event table must be created in relation to an existing table. Click the + button on any existing table and Select events.

![](https://files.readme.io/d71a538-image.png)

2. Sortment prompts you to select a table in your data warehouse.

![](https://files.readme.io/52b8ff0-image.png)

3. Enter a name for your event table. Use something that helps you identify it easily later
4. Optionally, enter a description.
5. Choose the Primary Key column in your events table.
6. Click Next.

![](https://files.readme.io/83bb3f6-image.png)

7. Choose how your events are stored in the table. If there are multiple events in the same table, choose the field with column names and label your events. This will help in making events data readable when querying on it for Audiences.

![](https://files.readme.io/6895e3f-image.png)

8. Label the fields in your events table. These can be used to filter on events data in Audiences.![](https://files.readme.io/d5c401e-image.png)9. Define the events relationship. Select the relationship's cardinality: 1:1, 1:many, or many:1. In most cases, primary tables have a 1:many relationship with events.10. Click Save to add the table to your schema.

![](https://files.readme.io/6d86d2b-image.png)

![](https://files.readme.io/907d76e-image.png)

The schema overview page shows the schema from the perspective of primary table; labels are displayed accordingly.


# Setting Up Events Table

Sortment allows you to track event-based data by adding **event tables** to your schema. These tables capture timestamped actions such as transfers, checkouts, or logins. Here's how to set up an events table (e.g., `FMS_TRANSFERS`) from a connected warehouse or CSV upload:

#### Adding an events table

Setting events table is similar to setting the related table. Primary difference being events table contain information of various events performed by user on your website, app or else while the related table contain all the other information about your data.

1. In the **schemas** view, click the **“Add table”** button (top right of the canvas).
2. From the dropdown, select **“Add event table.”**

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c59f07e0857162ca2e44f7381d591a93f4bf4041%2Fa1.png?alt=media)

2. In the **setup** step, choose your source:

   * **Warehouse** – Select this if you're linking to a table already synced with Sortment's data warehouse.
   * **CSV** – Use this if you're uploading data from a CSV file.

   <div data-gb-custom-block data-tag="hint" data-style="danger" class="hint hint-danger"><p>For CSV upload make sure your file follows the format:</p><p><strong>Headers</strong> must contain only <strong>letters, numbers, or underscores,</strong> No spaces or special characters are allowed in header names and each header must be <strong>≤ 255 characters</strong>.</p><p>The CSV file must be less than 50MB in size.</p></div>
3. Once you select your source, choose the appropriate table (e.g., `FMS_TRANSFERS`) and click **continue**.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-61c48a36b619a654063c8a543514866b29ab2e81%2Fa3.png?alt=media)

4. Configure Table Details
   1. **Name your events table** – Pick a name that clearly describes the event (e.g., “Transfer Details”).
   2. **(Optional) Add a description** to help identify the table’s purpose.
   3. **Choose a primary key** – This should be a unique identifier for each event.
   4. **Select a timestamp** – This is required for event tables and represents when the event occurred.
   5. **Specify the event name** – This defines the type of event (e.g., `TRANSFER_COMPLETED`, `REFUND_INITIATED`).

Click **continue** to proceed.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-e6b47799ccb3af0d97cc81ff335ba9302f6c4ee7%2Fp34.png?alt=media)

7. Configure the following table properties for each column:
   1. **Visibility:** Turn a column on or off depending on whether you want to use it in Sortment.
   2. **Labels:** Sortment will autosuggest labels and descriptions for your table. Label the fields in your events table. These can be used to filter on events data in Audiences.
   3. **Descriptions** *(optional):* Describe what your column contains.
   4. **Masked toggle**: Turn this on for sensitive information (e.g., personal identifiable data). Masked data will be protected and hidden by default in UI previews to comply with regulations and security.
   5. **Cached toggle**: Caching a column stores unique values from the column to make them accessible in the filter dropdowns.

![](https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-6afe9b77c455673b298bbce316b5cdc4021ff8ef%2Fp31.png?alt=media)

8. Once you've configured all the necessary properties, click **“Save”** to finish adding your related table. The new table will now appear in your schema. Now let's define this table's relation to other tables already existing in your schema.

### Joining Tables

1. **Select the table** you want to work with (e.g. `User Information`).
2. Go to the relations tab to join the `FMS_Transfers` with `User Information` .

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-5e2557939af37337e3a7ed2164f095d96457d5c5%2Fa4.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Click **connect table** at the bottom.
4. In the join setup:

* Choose the **column from the current table** you want to join on (e.g. `Id` from `User Information`).
* Select the **join type** (`1:1`, `many:1`, etc.).
* Pick the **column from the target table** you want to join to (e.g. `FMS ORDER ID` from `FMS_Transfers`).

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-057f6fe90e3cd1b7343b0eda5cf9fbbf7c553235%2Fa6.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Once your configuration is complete, click **Save**.

This will link the data across tables based on the selected keys, enabling richer queries and insights.


# Custom Properties

Custom Properties perform aggregation calculations on your data. These can be attached to users, events, or other data that allows marketers to create more tailored messages and experiences.

This stores the logic for a new property for a user which does not directly exist in the data warehouse, and is added to queries for segmentation or campaign data.

From the e-commerce example, one may want to get most expensive item ordered in an order. If the value is not directly available in any table in the schema, one can create a custom property **Most expensive item** on **Orders** table, which is **Max of Line Item Price.**

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-78bbbd43947e9366eaffe8a3fa9e25fae093573f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Required Skillset

Building custom properties requires an understanding of your business goals. Usually, business stakeholders like marketers complete this step.

### Creating a custom property

1. Click **+ New Property** on Custom Property page.
2. Choose the table you want to create custom property against. This is the entity against which aggregation will be created. In the e-commerce example, this will be Orders table.\
   Here, tables at the leaf node in the schema won't be available.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c82389089cf7fb235eb6cedc9e86d1a4703bfe62%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Setup a name and description to identify this custom property.
4. Choose the property from the column list you want to create an aggregation on. In the example above, this will be Product Price, from Line Items table.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-fa844f7d91a94e566bd5172bf2d4a6ca7442ac91%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
5. Choose the aggregation function. The list may be different based on the datatype. The aggregation useful for the e-commerce example is maximum, to get most expensive item.
6. You can add filters here, to filter specific entries which should be accounted during the aggregation. In this example, most expensive item is being filtered among product "Ice Cream" and "Ice Cubes" only.

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-57386106490bee2ccb950e42500bebb320202bc5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
7. Once done, create the custom property. You can now use this in audience creation as a filter. This will be displayed as a separate section in the filter dropdown.

#### Aggregate functions

Aggregate functions depend on the datatype of field selected while creating custom property. Here's an exhaustive list:

* Number
  * Sum
  * Percentile
  * Median
  * Average
  * Count
  * Count Distinct
  * Min
  * Max
* Other data types (String, Boolean, Datetime)
  * Count
  * Count Distinct
  * Min
  * Max


# Audiences

Segmenting users to target with personalised campaigns is an effective campaign strategy. Currently, these workflows involve help from data team internally to generate a CSV file manually from data in your warehouse.

Sortment allows your to create audiences on top of your warehouse data using AI and no-code visual builder, to activate data directly from your warehouse. It enables marketers to use data directly from business’ single source of truth—the data warehouse.

Segmenting your users to target them with personalised campaigns is a highly effective strategy. Currently, this process is involved with manual CSV generation from your data warehouse, often requiring assistance from an internal data team.

Sortment revolutionizes this by allowing you to create audiences directly on top of your warehouse data using a no-code visual builder. This enables marketers to activate data directly from your business's single source of truth—the data warehouse.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2FT0jVsSGCpqVGWWkqfr42%2FFeature%20-%20Audience%20Creation.mp4?alt=media&token=4f8d1742-818e-4335-831e-87d767b33054>" %}

Sortment executes an SQL query on your warehouse under the hood, but the no-code interface allows anyone to create these audiences and make data access more democratic.

You can create audience using the AI-powered prompts via *Ask AI* to generate audiences instantly, using visual builder, and also use the SQL builder with AI enhanced capabilities to create audiences (or migrate existing audiences to Sortment).

#### **How it Works:**

Under the hood, Sortment executes an SQL query on your warehouse. However, our intuitive no-code interface democratizes data access, empowering anyone to create sophisticated audiences without needing SQL expertise.

**The easiest way to create audiences: Just ask Rho!**

While you can create audiences using our visual builder or even our SQL builder with AI-enhanced capabilities (perfect for migrating existing audiences), the most efficient way to build an audience is by **simply asking Rho.**

**To create an audience, just tell Rho what you need.** For example, you can say:

* "Create an audience of customers who have made a purchase in the last 30 days and are located in California."
* "I need an audience of users who have signed up but haven't completed their profile."
* "Create an audience of high-value customers who have spent over $500 in the last quarter."

Rho will take care of the rest, translating your request into the necessary audience parameters and building it for you.


# Create Audience with AI

Sortment's AI, makes audience creation incredibly intuitive and efficient. Instead of manually building complex filters, you can simply tell AI your audience requirements in plain language, and it will set up the audience for you.

**The streamlined process for creating an audience with AI:**

1. **Tell AI your requirements:**
   * Start by engaging directly with your audience criteria. For instance, you could say:
     * "Create an audience of users who have at least one record in 'Ride Details' where 'Ride Date' is in the last 10 years, 'Ride Type' is 'Uber Black' (case-sensitive), and 'Ride Rating' is greater than 3."
   * AI will confirm its understanding and begin processing your request.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c8ddafedcc5c7c5bfff9cb78c00583540839e907%2Fb2.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Review the Auto-Populated Audience:**

* Once it has processed your request, it will automatically navigate you to the visual builder page.
* Here, you'll find the filters pre-populated based on your instructions. This allows you to visually inspect the logic and ensure it matches your intent.
* **Audience Count:** In the upper bar of the Audience Builder, you'll immediately see the calculated count of users that fit your specified criteria. This gives you an instant understanding of your audience size.
* **Audience Insights:** On the right-hand side, the "Audience Insights" panel provides valuable breakdowns and reachability information, helping you understand the composition and potential impact of your audience.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-8205b04ecf27120e3e6509c4932ddf9bec6f712d%2Fb6.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Preview your Audience data:**

* To get a closer look at the actual users in your audience, click on the **"Preview data"** button
* A modal window will appear, displaying unique id of users.
* **Select columns for preview:** On the left side of the preview window, you can use the checkboxes to select specific user attributes (e.g., User ID, User Name, User Email, Signup Date) that you want to see in the preview table. This helps you verify the data points relevant to your campaign.
* Once you've selected your desired columns, click the "x" button to close the preview window and return to the visual builder.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-8378f9499767bf8004e27a937150249c2c227e13%2Fb7.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Save and Publish Your Audience:**

* AI automatically provides a name and description for the audience. However, you have the flexibility to change these to provide more context and clarity specific to your audience's purpose.
* After reviewing the audience definition, count, insights, and data preview, you can proceed to save as draft or publish your audience.
* Locate the **"Publish"** button in the top bar of the visual builder. Clicking this will finalise your audience, making it available for use in your campaigns and other Sortment workflows.

By leveraging Sortment AI, you can create highly targeted audiences with speed and accuracy, empowering your marketing efforts directly from your data warehouse.


# Creating Audience

Once the schema is setup, you can start creating your audiences using data from your warehouse.

### Required skillset

Building audiences requires an understanding of your business goals. Usually, business stakeholders like marketers complete this step.

### Using AI to create an audience

Sortment’s **Ask AI** lets you create complex audiences using natural language.

Lets create a audience for an eCommerce company in the US:

1. Click on *"Ask AI"* on the top navigation bar
2. In the input field type the audience prompt you want to create.

#### Example prompt

> **"Create an audience of users in US who have purchased the product 'Lemon' at least once, and who also placed at least one order in the last 60 days that was not cancelled, breakdown by cities"**

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-94ac92b5119416119bf0b4a7fca81b721bb790cd%2Fp7.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Ask AI will take you directly to the Visual builder, with the logic auto-populated based on your prompt.
4. You can start with a broad idea and refine it naturally. Our AI understands your intent and adapts in real-time, allowing you focus on *who* you want to reach while we handle *how*.
5. You can **visualise the generated audience** in real time.
6. Click **“Preview data”** to verify that the audience matches your intent.
7. **Give your audience a name**, and optionally add a description for context.
8. To use this audience in **campaigns and journeys**, click **“Save and Publish.”**

#### 💡 Tip

> In most cases, **Ask AI is accurate enough to fully create your audience**, saving you the need to manually configure filters in the visual builder.

### Creating audience using visual builder

1. Go to Audiences page and click + Create Audience.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9a42d19011eac45b9a92c13acf152fea0443170d%2Fb7.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Build your audience using filters and groups. The fields defined in the schema are usable in the visual builder.
3. As you build your audience, you will see an count of your audience with current filters.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-e4ab0852055484afb251a35b59580de1494f3776%2Fb8.png?alt=media" alt=""><figcaption></figcaption></figure>
4. As you build, click Preview data to verify the audience you're building is the intended one. Close the preview to back to the visual builder<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-abef84ab0df6bab9a8486c3a39091c30000c1855%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
5. Give the audience a name, and optionally a description to add more context to your audience.
6. If you want to save your progress and work on the audience later, click **Save as draft**.
7. If you want to save this audience to use into Journeys, click **Save and publish**. This will take you through data preview and setting up an audience sync.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c7f516d5d20a4ddc37534c13f269a88df5957896%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-110f3140162e49f6e09ec760fdaca8a7827dd551%2Fp2.png?alt=media" alt=""><figcaption></figcaption></figure>

4. While building, use "Preview Data" to confirm your intended audience. After previewing, close it to return to the visual builder.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9647ee788ade0f705c5b937f094c3aac32351ea6%2Fp3.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Provide a name and optionally, a description to add context
6. To save this audience for use in Journeys or Campaigns, click **Save and publish**. This will guide you through data preview and audience sync setup.
7. To save your progress for later, click **Save as draft**.


# Audience Filters

Filters are the core of the visual builder. You can mix different conditions to segment your users to a specific audience. The builder provides various types of filters you can use with Boolean (AND / OR) logic:

* User properties
* Related properties
* Events
* Audiences

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-d1f12e628c99705d95ef3b17c05f2b598e747f5e%2Fp8.png?alt=media" alt=""><figcaption></figcaption></figure>

### User properties

User properties are the most basic conditions. You can use it to filter audiences based on the column values in your primary table, which contains users.

For example, if your primary table is a table of customers of uber and includes columns like device and created at date, you can create an audience of:

* All users who have device "iPhone"

AND

* All users who got created after 1st Jan 2023.

### Related properties

The related properties filter users based on data in related tables. These tables are any non event table added to the schema.

For example, if your primary table is users for uber and you have related table for their rides and ride\_details, you can create audiences like this:

* All users who have completed at least one ride

AND

* All users who have taken at least one ride in "premium" ride type.

### Events

The events filter audiences based on what events they've performed. To use it, you need to have [set up events](https://docs.sortment.com/schema/setting-up-events-table-1). You can check whether event was performed or not performed when building your audience.

For example, if your primary table is customers who rode with uber and there is an events table that collects clickstream data, you can create audiences like this:

* All users that requested a ride of uber black between 3rd Oct 2023 to 3rd Nov 2023 with ride fare greater than 1000

OR

* All users who made payment for a ride after 3rd Oct 2023 with payment value greater than 500

### Audiences

The audience filters users based on whether they're a part of another audience. This condition helps reuse standard audience groups without creating them again and create complex audiences while ensuring you're not duplicating users across campaigns.

For example, if we take the uber, you can create an audience like this:

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-65bebe901bbf5e556468432b8bea7c4f68a8782b%2Fa11.png?alt=media" alt=""><figcaption></figcaption></figure>

### Groups

You can also create nested conditions in audience builders upto two levels. Groups allow you to create independent audience logic which are combined to get final set of users based on Boolean logic (AND/OR).

For example, you're running a campaign to find out users who are probably loyal to your brand. You could create an audience with following filter conditions:

* All users who have at least completed 50 rides in the past 6 months and distance covered through uber is greater than 10 km.

AND

* All users who do not belong to "Loyal Audience"

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-a0b072a9d96333750797a0bdd063c7da51270673%2Fa12.png?alt=media" alt=""><figcaption></figcaption></figure>

You can toggle group boolean condition by clicking on AND/OR in the query. This makes it easier to organise logic around different groups.

### Filter operators

Filter operators allow you to build your filter conditions. For example, you may want to add a related property condition based on users' device or an event condition based on when an action occurred.

The operators depend on the underlying data type you're filtering on—either textual, numerical, boolean, or timestamp. Events have operators for performed and not performed. Audience conditions only provide the operators is included in and is not included in.

#### Text operators

When filtering on textual properties, for example on a product's brand or a user's device, you can use these operators:

* is null
* is not null
* is
* is not
* starts with
* ends with
* includes
* does not include

These operators also get a flag for case sensitivity. While selecting the dropdown, you can choose to make your selections case sensitive based on your use case.

The textual filters allow you to add multiple values. To add multiple values, type a value and press enter. This will allow you to add another value for the same filter condition.

#### Numeric Operators

When filtering on numeric properties, for example on a product's price or order amount, you can use these operators:

* is null
* is not null
* is
* is not
* is less than
* is greater than

The textual filters allow you to add multiple values. To add multiple values, type a value and press enter. This will allow you to add another value for the same filter condition.

#### Boolean operators

When filtering on Boolean (true or false) values, you can use these operators:

* equals
* does not equal
* exists
* does not exist

#### Timestamp operators

When filtering on timestamps, you can use these operators:

* is null
* is not null
* is
* is not
* in the last
* not in the last
* in the next
* in the current
* is before
* is on or before
* is after
* is on or after
* is between


# Campaign Event Filters

The **Campaign Event Filters** feature enables users to define audience segments based on their engagement with various campaign touchpoints, including **email interactions, SMS engagements, WhatsApp activities etc**. These filters allow precise targeting for personalized messaging based on whether users are interacting with previous communication or not.

### Available Filters

#### **Email Engagement**

* **Email Sent**– Users to who email is sent.
* **Email Delivered** – Users to who email is delivered.
* **Email Opened** – Users who opened an email.
* **Email Link Clicked** – Users who clicked a link in an email.
* **Email Bounced**– Users for which email bounced.
* **Email Unsubscribed** – Users who unsubscribed from email communications.

#### **SMS Engagement**

* **SMS Delivered** – SMS messages that were successfully queued for delivery.
* **SMS Link clicked** – Users who clicked a link in an SMS.

#### **WhatsApp Engagement**

* **WhatsApp Message Read** – Users who read a WhatsApp message.
* **WhatsApp Link Clicked** – Users who clicked a link in a WhatsApp message.

### Filter types

For each event, users can define audience segmentation using the following conditions:

* **Event Performed X Times** – Filters users based on the number of times they performed a specific event. You can set comparisons to a specific counts, like performed "Email Opened" At Least / At Most / Exactly X times.
* **Event Not Performed** – Excludes users who have not performed the selected event.

### Sub-filters

Each event filter includes contextual sub-filters for additional refinement:

* **Campaign-Specific Filtering** – Users can filter events based on the campaign they were associated with. You will see list of all campaigns sent via Sortment.
* **Time Windows** – Users can set conditions to filter events that occurred within a specific timeframe (e.g., last 7 days, last 30 days).


# Creating Audience Using SQL Builder

Sometimes, the querying may be complex due to the nature of data modelling in the warehouse. Sortment allows you to create SQL based audiences directly.

It also enables Gen AI based flow where user can generate SQL queries using prompts, and improve them.

### Required skillset

This requires a technical understanding of your data tables and SQL. With the AI generated query, a user review may be requried to validate the correctness. Data or analytics engineers are often involved.

### Creating audience

1. Go to Audiences page and click Create Audience. Switch to the SQL editor view.

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-2c9106fbed2ff72f9588cadad72af4500a65f5b2%2Fp11.png?alt=media" alt=""><figcaption></figcaption></figure>
2. The SQL editor supports executing any SQL specific to your database or data warehouse.
3. You can also generate a query from a prompt. This will use GPT-4 to generate an SQL query. Verify that the query logic is correct.
4. You can preview audience data with count of your audience for the current SQL query.
5. You can improve an SQL query using AI. This will take your text prompt and existing query as input to generate a new query.

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-3e3e6c7fd01fa935b6290f4c9cc58513eee124e5%2Fp10.png?alt=media" alt=""><figcaption></figcaption></figure>
6. Save the query once you've verified the output. Ensure that user ids are part of your SQL query. Sortment will only access user data based on user ids. When saving an audience, you need to define which column in your SQL generated output has user ids. You can read more about saving and sync [here](https://docs.sortment.com/settings/sync-schedules).


# Managing Audiences

### Save/Publish an audience

When creating an audience, you can "Save as Draft" to preserve your progress or "Publish" it using the icon in the top navigation bar.

Publishing is a two-step process, common to both visual and SQL audiences: first, you'll verify the data in a preview (showing a sample of users and total audience size), then you'll publish.

In case of SQL audiences, you also need to choose the output column which has User ID, so that Sortment can use it to reference users in Campaigns.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-110f3140162e49f6e09ec760fdaca8a7827dd551%2Fp2.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-eb95aa845b4874b701e3dbae1cd167443793cfa7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Audience Manager

From the audience manager, you can get a snapshot view of all the created audiences and their freshness details:

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-75b1b078f14f1ba506652e91090fd562265ab8e1%2Fp4.png?alt=media" alt=""><figcaption></figcaption></figure>

1. **Audience name**: Name of the audience with the description
2. **Audience size:** Count of number of unique users in the audience. Actual reachability of an audience may be less than this count.
3. **Last run:** Time of latest run and its corresponding status. In case of failure, it is highlighted here.
4. **Created:** Creation information with timestamp and name of the user who created this audience
5. **Modified:** Modification information with timestamp and name of the user who modified this audience

### Duplicate flow

Since audiences can have interdependencies different objects in Sortment like Campaigns and Flows, there is no edit flow.

After creating an audience, you can clone it by opening the horizontal three-dot menu and clicking Duplicate.

This opens a new audience creation page where you can:

* edit the duplicate audience's configuration
* give it a custom name and description


# Sync Schedule

Audiences are created and managed on the warehouse. To maintain data freshness, Sortment allows setting up a sync for the audience at regular intervals. You can also trigger a run manually from the audience page.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9b34bdd66b48a7bdc89277c55a00d4392109ad70%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Setting Audience Refresh Schedule

From audience manager, click on action menu for any audience and click **Change Run Schedule**.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-148f5a0e25ba34739f3fb11cbbb07e057de28b8e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

3. The scheduler has different run options:
   * Generate once now: This will create the audience now and store the static list of the users in the warehouse for your use
   * Generate every: It takes a start time input, frequency of run, and end time input to maintain data freshness in your warehouse.
4. Once saved, the audience run will get scheduled and executed into the warehouse. It could take some time depending on how big the query is and how much computing power is available to Sortment.
5. Once run is successfully completed, the status will be updated in the audience manager for you to use the audience in campaigns.

#### Frequency of run

1. Hourly\
   Choose after how many hours you want the audience to be synced back into the warehouse<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-199ab810d5a3c2dc44075b36ad6ad5868ad739b4%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Daily\
   Choose after how many days you want the audience to be synced back into the warehouse<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-b841082a08b0f7a7a4f672f889bfc18086c37ebb%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Weekly\
   Choose after how many weeks you want the audience to be synced back into the warehouse. You can choose specific days of the week to schedule multiple runs during a week.<br>

   <figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-704d6f30a778eb82e683e183e2237cc4c5447eae%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
4. Monthly\
   There are two options to set a sync frequency for monthly runs. You can choose specific dates (for example, 10th of every month) or choose day of the month (for example, second Wednesday). Both examples are added below

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-d4ae8c23a3be4fe26af53c2911c50dfea164f47a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-deed59edc5c0270aabe9b360d0a38df288b37ec5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>


# Audience Insights

### **Overview**

**Audience Insights** enhance audience creation by providing a clearer, data-driven perspective. This allows marketers to confidently validate and optimize their audiences for more effective, targeted campaigns. With built-in data exploration and validation tools, marketers can ensure the accuracy of their segments, reduce the need for analyst intervention, and achieve greater efficiency in campaign execution.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-82f7d234ea07e2e93fe1c5a963d6d68223f6bd9d%2Fa13.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Generating Insights**

Insights are updated whenever refresh button is clicked. This is kept action-driven to reduce load of queries on the warehouse.

#### **Audience Reachability**

Calculates percentage of users from audience reachable per channel, based on their global reachability status.

#### **Audience Breakdown**

Create a data distribution bar chart for users based on selected columns, with options for expanded view and further analysis for each chart.

#### **Audience Overlap**

Compare the current audience with other saved audiences and see overlap in the user count. Audiences then can be used as filters to keep or remove these overlapping users in the new audience.


# Attributes

Attributes are calculated or dynamic properties that represent specific characteristics of users or other entities, defined according to your business logic. For example, a “High Net-worth Individual (HNI)” trait might be set for customers whose total order value crosses a defined threshold. By standardizing these definitions, Attributes make it easier to analyze, segment, and act on data across teams and workflows.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2FBVRF9l8W4eAPykT03qiy%2FFeature%20-%20Custom%20Attribute.mp4?alt=media&token=9aba2458-202f-4f56-ae2c-280d7f90b77b>" %}

Attributes can be created manually, using custom rules, or generated with AI to automatically identify patterns and surface relevant characteristics from your data. This flexibility allows you to adapt Attributes as your business evolves, ensuring that segmentation and targeting remain relevant and actionable.

Once defined, Attributes are reusable building blocks that can be referenced in campaigns, reports, and integrations—eliminating the need to recreate logic in multiple places. Teams can rely on shared, consistent definitions, reducing ambiguity and streamlining collaboration.


# Use Cases

**Traits** in Sortment allow teams to define reusable logic for grouping users or computing values that can be applied consistently across audiences, campaigns, and journeys. Traits help enforce consistency, reduce errors, and save time by centralising business logic.

***

#### Why traits matter?

Without shared traits, different teams may interpret the same data differently. For example:

* **Marketing** defines a **High Value Customer (HVC)** as anyone with lifetime spend over $3M.
* **Sales** considers HVCs as those spending $1M+, based on their pipeline goals.

If each team builds their own audience filters, misalignment is inevitable. Someone might use the wrong threshold or field, leading to flawed insights or mistargeted campaigns.

By defining a single trait like `High Value Customer` (e.g., `total_order_value > 3,000,000`), all teams refer to the same logic. Any future updates are made once and reflected everywhere.

***

### Common trait examples

#### Metric based traits

These are based on **numeric conditions**, **aggregations**, or **threshold logic**:

| Trait                   | Logic                                              |
| ----------------------- | -------------------------------------------------- |
| **High Value Customer** | `total_order_value > 3,000,000`                    |
| **Inactive User**       | `last_login_date < now() - 90 days`                |
| **Coupon Abuser**       | `num_coupons_used > 5 in 7 days`                   |
| **Repeat Buyer**        | `completed_orders >= 2`                            |
| **Engaged Visitor**     | `session_count (last 30 days) > 5`                 |
| **Top 10% Spender**     | `total_order_value in 90th percentile`             |
| **Cart Abandoner**      | `cart_created AND NOT checkout_started within 24h` |

#### **Dimension based traits**

These traits are derived from **field combinations**, **SQL logic**, or **categorical bins**—and not aggregates.

| Trait                    | Logic                                                                  |
| ------------------------ | ---------------------------------------------------------------------- |
| **Adjusted Order Total** | `subtotal - discount + tax + shipping`                                 |
| **Buyer Type**           | `CASE WHEN orders = 1 THEN 'First-time' WHEN orders > 1 THEN 'Repeat'` |
| **Order Size Category**  | Bin subtotal into Low/Medium/High ranges                               |
| **Geo Segment**          | `country IN ('US', 'CA') => 'North America'`                           |

These are especially useful for defining categories, applying transformations, or simplifying complex logic into a single field for reuse.

***

### Create traits using AI

Sortment includes a built-in **AI assistant** that can help you define traits faster and more accurately. Just describe the trait you want in plain language—like:

> "Create a trait of users who made more than two purchases in the last 60 days and haven’t interacted with a promotional email in the last week.

and the AI will generate the corresponding logic for you.

This makes trait creation accessible even to non-technical users and ensures best practices are followed behind the scenes.

***

#### Benefits of Using Traits

* **Shared understanding** across teams
* **Consistent targeting** in campaigns and reporting
* **Centralised logic**, updated once and applied everywhere
* **Faster analysis** and fewer manual filters
* **Reduced human error** in segmentation and performance tracking


# Calculated Attributes

In Sortment, **calculated** Attributes are reusable logic definitions that classify users based on behaviors, characteristics, or transactions.

These Attributes are ideal for:

* Complex segmentation needs
* Aggregations (e.g., total orders, spend)
* Business calculations that depend on multiple columns

They can be reused across Profiles, Audiences, and Analytics to maintain consistent business logic.

***

## Creating a calculated attributes using AI

Sortment provides an **AI-powered creation option** that makes building calculated attributes fast and approachable—even without technical expertise.

### Open the attributes section:

1. Click the **star-shaped icon** (`✶`) in the left or top navigation bar.
2. This opens the attributes page, where you can view, manage, and create new attributes.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9135aa0a74d2fb4b9651b3500c7cd37187845da7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Step 1: Click New attribute

Start by clicking the **“+ New Attribute”** button at the top right of the Attributes page. Choose calculated attributes.

Select "Use AI" as the creation method

### Step 2: Define the use case

* **Describe your use-case**: What are you trying to identify (e.g., “Number of times a customer bought premium products”)?
* **Outline examples or scenarios** *(optional but helpful)*: Provide additional context or example on how the calculation may be performed.

### Step 3: Generate the logic

After submitting your prompt, Sortment generates the logic for your attributes. It will also create a name and description for the attribute.

* You can review and refine using additional instructions like “exclude users with returns.”

### Step 4: Preview results

Click **“Preview results”** to validate that the attribute logic works as intended. This ensures data accuracy before you publish.

### Step 5: Finalise details

* The attribute name and description is generated by AI. Review the details and update if needed.
* Optionally add **tags** for searchability and organisation.

### Step 6: Save the attributes

Click **“Finish”** to save the attributes. It’s now available for use across Audiences, Profiles, and Campaign logic.


# Advanced Mode

**Sortment’s Advanced Mode** empowers data-savvy users to define custom attributes using either a **visual expression builder** or **SQL logic**, depending on the attribute type. This functionality allows you to create powerful, structured metrics and dimensions that go beyond natural language-based AI prompts.

> 💡 **Tip:** For most users, AI-based attribute creation is sufficient. Use Advanced Mode when you wish to define attributes manually.

## Creating a calculated attribute using advanced mode

Sortment provides an **Advanced option** to create calculated attributes

### Open the attributes section:

1. Click the **star-shaped icon** (`✶`) in the left or top navigation bar.
2. This opens the **Attribute** page, where you can view, manage, and create new attributes.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-1ddaa9825ea3f87f5fe544ccd6f5a7165970c3f6%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Step 1: Click “New Attribute”

Start by clicking the **“+ New Attribute”** button at the top right of the Attribute page. Choose calculated attributes.

### Step 2: Choose attribute type

Select "Advanced Mode" as the creation method

### Step 3: Define attribute settings

* Attribute type: Select [dimension](https://docs.sortment.com/engage/attributes/use-cases#dimension-based-traits) or [metric](https://docs.sortment.com/engage/attributes/use-cases#metric-based-traits).
* Data source: Choose the relevant table (Eg., `Users`, `Accounts`)

### Step 4: Attribute details:

You'll be presented with the new calculated attribute screen, enter:

1. Attribute Name : Enter descriptive name of the attribute (e.g., `Max Premium Ridefare`)
2. Description *(Optional):* Provide additional context or purpose of the attribute. (e.g., `Highest fare a user has paid in a ride`)
3. Tags *(Optional):* Add relevant tags to categorise or identify the attribute.

### Step 5: Define attribute logic

#### Metric attributes (Visual builder - No code) Use the dropdown-based builder to define logic without SQL:

1. Property : Select the property from the dropdown (e.g, `Ridefare`)
2. Function : Choose the aggregate function (e.g., `Max` ).
3. Filter *(Optional):* Add filters to restrict the data in the calculation (e.g., `Ride Type = Premium`)

#### Dimension attributes (SQL Editor) Use SQL logic to create more advanced or real-time attributes.

> Example syntax for a dimension attribute:

```
CASE
    WHEN spend > 1000 THEN 'High Value'
    WHEN spend BETWEEN 500 AND 1000 THEN 'Medium Value'
    ELSE 'Low Value'
END AS account_segment
```

### Step 6: Finishing the attribute

1. Use the preview results button to verify the output.
2. Click finish to save the attribute.


# Dynamic Attributes

**Dynamic** attributes are real-time, event-driven user properties. Unlike calculated attributes that are synced during scheduled data warehouse updates, dynamic attributes are continuously updated in real time via journeys —directly responding to user behaviour as it happens.

***

### Dynamic attributes usage

Dynamic attributes are ideal for reactive, live segmentation needs. They are **used entirely within journeys**.

These attributes help personalise communication based on immediate user actions. For example:

* A user books a ride → instantly mark a “Booked Ride” dynamic attribute.
* A user bought a subscription plan → mark the "Pricing Plan" attribute from the event.

***

### How to create a dynamic attribute?

1. **Go to** Attributes via the ✶ star icon
2. Switch to the **“Dynamic” tab**
3. Click **“New attribute”**
4. Fill in the fields as shown in the UI:
   * **Attribute Name**
   * **Description** *(optional)*
   * **Data Type** (Boolean, Text, Number, Date, etc.)
   * **Initialisation** *(optional)*: Choose a property from warehouse to set base values against each user
5. Click **Create attribute**


# Profiles

The **Profiles** section in Sortment is where you view and manage individual user data. Each profile is defined against the User ID as selected during schema setup. Use the **search bar** at the top to find profiles by **UserID**.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-a8267fb492bcfcb1aa8fdb245d0cdbdfc55456b9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

By default, no column is selected. You can add attributes like name, email, and sign-up date to the view.

By default, Sortment shows you any dynamic traits setup for your profiles. Also, event history and subscription preferences is available.

#### **Purpose**

* Understand user behavior and attributes.
* Monitor engagement and event activity.
* Manage channel subscription preferences (Ex: Email, SMS, WhatsApp).


# User Profile View

## **Accessing the profile view**

To open the full profile for a user:

* Navigate to the **Profiles page**.
* Click on any user row in the list — this will open that user's dedicated profile page.
* Or, use the search bar at the top to find profiles by UserID.

***

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-4bdb51a20a336324fadd46e07f8f53f649108a94%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Key sections in the profile view**

### **1. Attributes**

This section shows user attributes, as selected and available from your data warehouse.

{% hint style="warning" %}
The workspace admin can configure the profile view to include certain attributes from user tables, related tables or traits (calculated or dynamic).
{% endhint %}

**Common examples for fields include:**

* **Name**: User’s full name.
* **Email**: Email address linked to the profile.
* **User ID**: Unique identifier from your backend system.
* **Sign-Up Date**: When the user first registered.
* **Other Fields**: Custom fields like “Number of Rides with Low Rating” or campaign-specific metadata may also appear.

> 💡 *These fields provide a snapshot of who the user is and are often used in personalization and segmentation.*

### **2. Dynamic traits**

Dynamic traits are calculated fields that reflect user behaviors or statuses, updated in near real-time. These are primarily used in journeys as variables to store and manage information.

> 🔁 *These traits simplify data handling and managing real-time events with warehouse data.*

### **3. Navigation tabs**

Across the top of the profile, you’ll see multiple tabs:

* **Events History** – For user activity/event tracking
* **Subscriptions** – To manage opt-in/opt-out preferences

Each tab provides deeper insights into specific aspects of the user’s interaction with your platform.

***

## Event history

Event history provides a chronological log of all events associated with a user, including campaign events and other real-time events. This allows you to track user actions, engagement, and interactions across campaigns and channels.

#### Use Case: Verifying Email Delivery and Engagement

This is a powerful tool for troubleshooting and understanding user engagement at an individual level.<br>

Example scenario:

A marketing manager wants to confirm whether a recent promotional email was successfully delivered to a user and whether the user engaged with it.<br>

Steps:

1. The manager navigates to the Profiles page, searches for the user using their User ID, and opens their profile.
2. Inside the Event History tab, they review recent events for that user.
3. The log shows:
   * Email delivered event on 1 May 2025 at 10:47 AM
   * Processed event at the same time
   * Success event at the same time
4. Since the Email delivered event appears, the manager confirms that the email reached the user’s inbox.
5. However, no Email opened or Link clicked event is present, indicating the user hasn’t yet engaged with the email.
6. Based on this insight, the manager can inform the team for setting up re-engagement campaign for similar users directly within Sortment.

***

### Managing subscriptions

{% hint style="info" %}
Bounced contacts are automatically unsubscribed at the channel level for the workspace.
{% endhint %}

Subscriptions tab provides visibility and control over a user’s current subscription status across communication channels such as Email, SMS, and WhatsApp.

Each user’s subscriptions are organized into [subscription groups](https://docs.sortment.com/settings/subscription-groups-and-contact-fields#how-subscription-groups-work-in-sortment) (e.g., *Ride*, *Promotions*, *Updates*), with each group mapped to a subscription type:

| Required | Users are automatically subscribed; cannot opt-out for compliance |
| -------- | ----------------------------------------------------------------- |
| Opt-in   | Users are unsubscribed by default and must opt-in explicitly      |
| Opt-out  | Users are subscribed by default but can choose to opt-out         |

#### Key features of the Subscriptions Tab:

1. **Channel tabs:** Easily switch between Email, SMS, or WhatsApp to view and manage the user’s subscription status across different communication channels.
2. **Subscription groups:** Within each channel, subscriptions are grouped by category (e.g., *Promotions* for marketing messages, *Updates* for transactional notifications).
3. **Subscription type:** Each group displays its subscription type (*Opt-in*, *Opt-out*, *Required*), determining how the user can subscribe or unsubscribe.

***

### **Updating subscription status of a user**

You can manually update the subscription status of a user.

{% hint style="info" %}
You must be a workspace admin to do this action.
{% endhint %}

* For Opt-out subscription groups (e.g., *Promotions*), you can manually opt them out by toggling subscription status from enabled to disabled at a group label. You cannot subscribe them back via the platform due to regulatory concerns.
* For Opt-in subscription groups (e.g., *Newsletters*), you can manually opt them out or in by toggling subscription status from enabled to disabled or vice-versa at a group label.


# Campaigns

Sortment enables you to communicate with your users through targeted Email, SMS, and WhatsApp campaigns.

Before creating a campaign in Sortment, make sure the following setup is completed:

* **Connect your data source**: [Integrate with your data warehouse](https://docs.sortment.com/setup/data-warehouses) to enable segmentation and personalisation.
* **Define your audience and subscription group**: Ensure you have [audience](https://docs.sortment.com/engage/audiences) list or segment along with the appropriate subscription group to manage opt-in preferences.
* **Configure messaging channels**: Set up and verify your Email, SMS, or WhatsApp [channel integrations](https://docs.sortment.com/setup/communication-channels) to ensure messages can be sent successfully.

Once these are in place, you can start building campaigns on Sortment.


# Overview

### 1.1 **Campaigns dashboard overview (Manager view)**

The **Campaigns** dashboard is the central workspace to view and manage all campaign activity within a project. Accessible from the top navigation bar, it offers filtering, search, and action tools to streamline campaign operations.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-3ab2410aee802b7b0316f701a2007af7d1159a7e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## **Dashboard Layout**

* **Top tabs**:
  * **All**: Displays all campaigns in the workspace
  * **Scheduled**: Future-scheduled campaigns
  * **Finished**: Successfully completed campaigns
  * **Drafts**: Saved, incomplete campaigns
  * **Running Now**: Actively executing campaigns
  * **Failed**: Campaigns that encountered delivery issues
* **Campaign listing columns**:
  * **Campaign**: Title of the campaign with channel tag (Email/SMS/WhatsApp)
  * **Status**: Current state – Draft, Finished, Scheduled, Failed, etc.
  * **Scheduled Date**: When the campaign is/was intended to run
  * **Audience**: User list targeted, with delivery stats
  * **Created / Modified**: Timestamp and creator/updater name
  * **Actions (⋯)**: Access contextual options for each campaign
* **Search & Filters**:
  * Use the **Search campaigns** bar to quickly locate specific campaigns by name
  * Toggle **Show hidden** to view previously hidden campaigns from view

***

### **1.2 Duplicating a campaign**

Campaign duplication allows users to reuse the content and settings of existing campaigns.

#### **Steps to Duplicate:**

1. Navigate to the campaign you want to duplicate.
2. Click the **⋯** icon next to the campaign.
3. Select **Duplicate**.
4. A new draft campaign will be created with the original campaign’s content and structure.

> 📌 Tip: Use this feature for duplicating campaigns or when targeting similar messages to new audience segments.

***

### **1.3 Hiding a campaign**

The **Hide** feature lets you declutter the campaign list by removing test runs or outdated entries from the default view.

#### **Steps to hide:**

1. Locate the campaign you wish to hide.
2. Click the **⋯** icon next to the campaign.
3. Select **Hide** from the dropdown menu.

#### **To unhide:**

* Toggle the **Show hidden** switch at the top of the dashboard to view and manage hidden campaigns.

> ⚠️ Hidden campaigns are not deleted and remain fully accessible when the hidden filter is enabled.


# Building a Campaign

This guide walks you through how to create, configure, test, and launch a campaign in Sortment. Whether you're sending an Email, SMS or Whatsapp, this step-by-step documentation covers required and configuration and test flow for setting up a campaign.

## Navigation: Getting to campaigns

1. Log in to **Sortment**.
2. In the left-hand sidebar, click on **Campaigns**.
3. Click **New campaign** at the top-right corner.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-be491962ad71e12ebe91cbb29f6dce2488fa713f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Step-by-Step: Building a campaign

### Step 1: **Name your campaign**

* Choose a clear, descriptive name (e.g., *“Spring Sale 2025 – Email”*).
* This name is also used as the default `utm_campaign` value for any tracked links — choose something concise and meaningful.
* We recommend to provide additional description and tags to your campaign for easier access.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-5eab92ce86909bd8c9639918f7b43159c63fcf56%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

***

### Step 2: **Set up integrations**

This is where you decide *how* and *from where* the campaign will be sent.

**Fields:**

* **Integration**: Select your integration provider (Email/SMS/Whatsapp)
* **Send To**: Choose the customer profile field (e.g., email address).

<details>

<summary>More inputs for Email</summary>

Following extra fields are required in email campaign setup.

* **Sender Name**: What recipients will see as the “From” name.
* **Reply-To Address** : Email where the replies should be directed.
* **Subscription Groups**: Select the group that matches the purpose of this email. Opt-in, Opt-out and Required groups have different eligibility rules. See [Subscription groups and contact fields](https://docs.sortment.com/settings/subscription-groups-and-contact-fields).

</details>

> 💡 Tip: Use a verified integration to avoid deliverability issues.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-67ff2e6cda07a2c05e2e54e8c02b03457b92c2bc%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

***

### Step 3: **Choose your audience**

Pick the audience that should receive the campaign. You can pick multiple audiences if you want to target different segments through a campaign. You can setup the audience for the campaign with the follwoing:

* **Send list**: Select an audience previously published or upload a static list.
* **Suppress List (optional)**: Exclude users from a secondary list. Supress list will not be available for upload static list option.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-bcbdcda71b1599e0f5788d4f957de9f260403dcc%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

**Estimated Audience Size**: Automatically displayed after selection—review this to ensure the campaign targets the correct users.

{% hint style="info" %}
Upload static list allows you to CSV file to define a static audience. These users may not be part of the warehouse. For examples, list of customers shared by customer success team to inform about a specific issue. [Read more below](#upload-static-list) to know about how to upload static list.
{% endhint %}

***

### Step 4: **Design your content**

You can either:

* **Start from scratch**: Open the visual email editor.
* **Use a template**: Load saved template created previously on Sortment or from the integration.

[Follow the templates document](https://docs.sortment.com/engage/campaigns/templates) to know about about template creation and management flows.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-5df2f4af9f60c10d773018b03cef7aa20e0e0c46%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

***

### Step 5: Testing your campaign

After you have selected a template, you can **preview it for a specific user** or **send a test message**.

**Preview as user** *(for Email campaigns only)*

Use the **“View as user”** button to preview how the email will look for a specific user. You can search user with the User ID or contact fields (if set).

{% hint style="info" %}
User search is always available on User ID. To allow search on contact fields (email, phone), [setup contact fields](https://docs.sortment.com/settings/subscription-groups-and-contact-fields#contact-fields) in your workspace.
{% endhint %}

**Send test message**

Use the **Send Test** button to send a preview of the campaign to internal users.

* Enter one or more test email or phone numbers. If you have [setup test profiles](https://docs.sortment.com/settings/test-profiles) in your workspace, you will see a list of users already. You can pick from the list or add a new one.
* This sends a real version of the campaign content (with placeholders populated if applicable).
* Check your inbox to ensure layout, links, and dynamic content appear correctly.

***

### Step 6: **Add details & delivery controls**

This section lets you define key message content and control how your campaign is delivered.

<details>

<summary>Details <em>(Emails only)</em></summary>

**Key Fields** *(for Email campaigns only)*:

* **Subject**: The line that appears in the recipient’s inbox.
* **Preheader (Optional)**: A short summary text that follows the subject line—used to encourage opens.

</details>

<details>

<summary>Personalization</summary>

Sortment enables you to personalize your campaign content using dynamic variables pulled from customer data.

#### **Using Variables:**

When creating your content, you can easily insert personalization variables by enclosing them within double curly braces, like `{{ var1 }}` or `{{ customer_name }}`. These variables act as placeholders for personalized details about the user receiving the message, such as their name, address, or any other relevant information from your customer data.

**How personalization works:**

When you create or select a template, Sortment automatically identifies and populates any personalization variables present in your content. These variables appear in the **Personalization section**, where you can easily rename them or remap them to different data sources.

For example, you might remap a `{{ name }}` variable to pull data from the 'Full Name' field within your 'Customer Profiles'.

**Example:**\
If `{{ var1 }}` is mapped to Full Name and `{{ var2 }}` to Email Address, your content may read:

> *Hello {{ var1 }} ({{ var2 }})*\
> And render as:\
> \&#xNAN;*Hello Jane Doe (<jane@example.com>)*

💡 *Tip: Ensure all selected users have values for the personalization fields to avoid rendering issues in the final message.*

</details>

<details>

<summary><strong>Delivery Controls</strong></summary>

* **Throttle Send Speed**: Controls how quickly messages are delivered to reduce the risk of being flagged as spam.

> **Sortment automatically applies a default throttle configuration based on your integration.** You usually don’t need to change this unless you have specific delivery requirements.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-4e98f83796f532f1a4505bb063f21946fa953dcd%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

</details>

***

### Step 7: **Set goals (*****Optional*****)**

Conversion event tracking can be enabled if you have real-time events set in Sortment. In campaign reporting, user actions like message read, link click are already captured.

Conversion tracking is helpful when you want to capture user journey beyond the message, like *order placed* or *subscription purchased*. This can help give you a complete picture of how your campaigns are helping with business goals and metrics.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-6ef708ef6a3853ee4e12b56d5564585a9b105481%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### 🚀 Launching your campaign

Once all steps are complete:

1. Click **Launch** (top-right).
2. Choose one of the following options:
   * **Send Now:** Immediately launch the campaign.
   * **Schedule for Later:** Set a future time for the campaign to be sent. You can also schedule recurring campaigns (e.g., daily, weekly, monthly) to automate regular outreach.
3. Confirm all configuration steps: Double-check your audience, message content, and channel setup.
4. Monitor progress under the [**Campaigns**](https://docs.sortment.com/engage/campaigns/campaign-reports) tab: Track delivery, engagement, and other performance metrics in real-time.

***

### Post-send analytics

After sending:

* Track opens, clicks, conversions, and bounces under **Analytics**.
* Review conversion goal completions.

***

## References

### Upload Static List

To upload a CSV, click **Edit** in the Audience section, then select [**Upload Static List**](#upload-static-list). Follow the prompts to upload your file and map the necessary fields (e.g., email, phone number).

**📎 Notes on Using Uploaded CSVs**

{% hint style="danger" %}
**CSV Format Requirements**:

* There is a 50MB limit on the filesize that can be uploaded here.

* The file must follow the specified format.

* Include only the columns you want to use; leave other columns blank.

* Each entry **must include a `distinct_id`** to uniquely identify users.
  {% endhint %}

* Only data in the uploaded CSV can be used as variables in the campaign content.

* Engagement or behavioural data (such as clicks or opens) **cannot be used** for audience filtering in these campaigns.

* Ensure your CSV includes all required fields for the selected channel (e.g., email address or phone number).

* Some of the features will not work as expected on Sortment if you send a CSV based campaign: frequency capping and supression list. You will also not have access to fields stored in warehouse. If you are uploading a CSV with userids, same as in the warehouse, we suggest you upload it to the schema (admin permission required)

### What if publishing fails?

**Publishing** means Sortment is checking or preparing the campaign. Wait for the status to change before trying to publish again.

If a content, audience, schedule or throttle validation fails before dispatch, the campaign returns to **Draft**. Open the draft, correct the issue named in the error, and publish again. For a throttle error, compare your requested sending rate with the integration’s per-minute limit.

A validation error is different from a failed or partial send. If the campaign has already started sending, check the [campaign report](https://docs.sortment.com/engage/campaigns/campaign-reports) before retrying so you do not send to the same recipients twice.

### Why is a campaign sending more slowly than expected?

A throttle sets a sending pace; it does not promise a delivery time for each email. For example, sending 10,000 eligible messages in batches of 100 per minute takes 100 batches. The provider’s integration limit can restrict the rate you can choose. Before increasing it, check the configured batch size and interval, the campaign status and any [delivery controls](https://docs.sortment.com/settings/delivery-controls) that apply.

### Which mailbox receives email replies?

Check the **Reply-To Address** on the sender profile used for that campaign. If it is `help@example.com`, check that mailbox for a recipient’s reply even if the visible sender uses a different address. If you use a forwarding rule, check its destination as well. Setting a reply-to address directs replies; by itself, it does not create a support inbox or an automated reply workflow.


# Campaign Reports

This document outlines the reporting capabilities available in Sortment, explains how to navigate to reports, defines key analytics terms, and clarifies how custom tracking events are integrated into reporting.

***

{% hint style="info" %}
The campaign reports on Sortment are built using the campaign data on your warehouse. There is an hourly sync to update analytics.
{% endhint %}

### 1. Overview of reports

Once a campaign is sent via Sortment, a post-campaign report is generated automatically. This report provides insight into how the campaign performed across various user engagement stages.

#### Available charts and tables

* **Campaign Summary:** Quick stats such as total sent, opens, clicks, conversions.
* **Click Tracking Table:** detailed breakdown of all links included in the campaign with outputs like total clicks and unique clicks.
* **Audience Exclusion Table:** Shows users excluded from delivery due to global unsubscribes, subscription group preferences, null data validation or frequency capping.
* **Funnel Chart:** A step-by-step drop-off visualization of the campaign (Sent → Delivered → Opened → Clicked → Converted).
* **Performance Over Time:** Time-series analysis of open, click, and conversion events.
* **Aggregated Time Analysis:** Breakdown by hour, day, or week for identifying peak interaction windows.
* **Custom Tracking Events:** If configured, additional user events such as “Product Viewed” or “Added to Cart” are included.

***

### 2. Accessing the reports dashboard

To view analytics for any campaign:

1. Navigate to the Campaigns tab in the Sortment dashboard.
2. Locate the desired campaign.
3. Click the ellipsis icon (⋯) on the top-right of the campaign tile.
4. Select View Report from the dropdown.

This will open the report view for the selected campaign.

***

### **3. Report sections explained**

**3.1 Click tracking report**

* A detailed list of all links clicked by users, showing:
  * **Link URL**
  * **Total clicks**: Total times each link was clicked.
  * **Unique clicks**: Number of unique users who clicked the link.
  * Percentages next to each value indicate what fraction of total clicks that link represents.
* **Use case**: Understand user interest by analyzing which content or product links were most engaging.

**3.2 Audience exclusions summary**

This section outlines how many users were excluded from the campaign due to:

* **Global unsubscribes**: Users who opted out of all communications on the channel.
* **Subscription group unsubscribes**: Users opted out of specific categories (e.g., newsletters, promos).
* **Null check failures**: Users dropped due to missing required profile data (send to value like email, phone respectively).
* **Frequency capping exclusions**: Users skipped due to limits on how often they can be contacted.

#### **3.3 Funnel chart**

The funnel chart illustrates user progression through five stages:

* **Sent**: Total emails dispatched.
* **Delivered**: Emails that reached inboxes.
* **Opened**: Emails that were opened.
* **Clicked**: Users who clicked on any links.
* **Converted**: Users who completed a predefined conversion goal (e.g., signup, purchase).

Use the funnel to identify bottlenecks or drop-offs in engagement.

***

#### **3.4 Performance over time**

Displays how user activity evolves post-send:

* Tracks opens, clicks, and conversions over time.
* Helps analyze time-based responsiveness and campaign shelf-life.

**Note**: If data is missing or seems delayed, verify sync status and ensure campaign filters are correctly applied.

***

#### **3.5 Aggregated time performance**

Shows cumulative open, click, and conversion events over time to show a trend in how user activity trends over time in a campaign


# Glossary

### General concepts

* **Campaign Report**\
  A summary view showing performance metrics for campaigns or journeys over a selected date range.
* **Filter Block**\
  Allows segmentation of campaign analytics by specific criteria (e.g., geography, user segment).
* **Chart Type**\
  The visual format of data—e.g., **bar chart**, **line chart**.
* **Count Type**\
  Determines how metrics are displayed:
  * **Absolute**: Raw numbers
  * **Percentage**: Values as a percent of total
* **Frequency vs. Cumulative Chart**
  * **Frequency**: Shows data in time-based slices (e.g., daily opens).
  * **Cumulative**: Aggregates totals over time (e.g., total opens to date).
* **Time Axis Control**\
  Lets users change the granularity of time in visualizations:\
  `Minute | Hourly | Daily | Weekly | Monthly`
* **Total Metrics**\
  Count each action occurrence, regardless of who performs it or how often.
* **Unique Metrics**\
  Count unique users (based on userId) who perform an action, only once per user.
* **Rate Metrics**\
  Represent engagement as a percentage of eligible users or actions (e.g., clicks as % of opens).

***

### Metrics & KPIs

* **Conversions**\
  Number of users who completed a defined conversion event (e.g., purchase, signup).
* **Conversion Rate**\
  `Conversions ÷ Unique Emails Delivered`
* **Revenue**\
  Sum total of purchase values tracked during campaign; defined during conversion tracking setup.
* **Open Rate**\
  `Unique Opens ÷ Unique Emails Delivered`
* **Click Rate**\
  `Unique Users with Clicks ÷ Unique Emails Delivered`
* **Click to Open Rate (CTOR)**\
  `Unique Users with Clicks ÷ Unique Opens`
* **Unsubscribes** *(Email Only)*\
  Count of users who unsubscribed. One unsubscribe per user per campaign.
* **Spam Reports** *(Email Only)*\
  Number of users who marked the email as spam. Users who report are automatically unsubscribed from future emails.
* **Total Sends**\
  Total messages sent (e.g., emails, SMS). May be lower than audience size due to send skips.
* **Delivery Rate**\
  `Unique Deliveries ÷ Unique Emails Sent`
* **Send Skips**\
  Messages not sent due to pre-send conditions (e.g., contact opt-out, invalid channel).
* **Not Delivered**\
  Messages that failed **after** send attempt, due to provider issues (e.g., mailbox full, number unreachable).
* **Total Bounces**\
  Messages rejected by the provider due to invalid addresses, content errors, or prior unsubscribes.
* **Unique Users with Clicks**\
  Unique users who clicked a link (excluding unsubscribe links); used to determine experiment winners.
* **Total Clicks**\
  All link clicks (excluding unsubscribes), including multiple clicks per user.
* **Funnel**\
  A step-by-step visualization of user progression—from campaign entry to final conversion.


# Templates


# Handlebars

Handlebars is a JavaScript library used for creating dynamic templates.

It allows you to define templates with placeholders, and these placeholders are replaced with data when the template is triggered with the information sent in the payload.

Handlebars within Sortment support features like conditional operations, loops, date time formatting, partial searches, and custom helpers, making it a very cool tool to use when creating your templates.

### **Handlebars in Sortment's Templates**

To understand how handlebars work, we first need to establish a sample payload, based off which the Handlebars function and applicability can be demonstrated.

```
{
  "members": [
    {
      "first_name": "John",
      "last_name": "Doe",
      "city": ""
    }
  ],
  "investments": [
    {
      "amount": 10,
      "company": "L&T"
    },
    {
      "amount": 20
    }
  ],
  "companies": {
    "L&T": "India",
    "Apple": "USA"
  },
  "user_type": "pro",
  "period": {
    "start": "2023-10-01",
    "end": "2023-10-03"
  },
  "classification": ["active", "pro"]
}

```

Sortment has default as well as custom **handlebars** that you can use in your templates. Let’s have a look at what these are and how to use them using the above payload and data as example responses.

{% hint style="warning" %}
**Double Quotes within Handlebars {{" "}} may break your templates!**

Double quote may break your syntax in HBS, especially in emails! And nobody wants that!

**For example:** Use `{{math number1 '+' number2}}` instead of `{{math number1 "+" number2}}`.

Use single quotes `{{' '}}` instead!
{% endhint %}

<details>

<summary>To access placeholder values</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{key}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{user_type}}
```

{% endcode %}

{% code title="Output" %}

```
pro
```

{% endcode %}

</details>

<details>

<summary>To access values of an object</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{key.subkey}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{period.start}} to {{period.end}}
```

{% endcode %}

{% code title="Output" %}

```
{{period.start}} to {{period.end}}
```

{% endcode %}

</details>

<details>

<summary>To access object values from an array</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{key.index.subkey}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{members.0.first_name}}
```

{% endcode %}

{% code title="Output" %}

```
John
```

{% endcode %}

</details>

<details>

<summary>To access values from an array</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{key.index}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{classification.0}}
```

{% endcode %}

{% code title="Output" %}

```
active
```

{% endcode %}

</details>

<details>

<summary>To get length of an array</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{key.length}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
User made {{investments.length}} investments
```

{% endcode %}

{% code title="Output" %}

```
User made 2 investments
```

{% endcode %}

</details>

<details>

<summary>To check if variable exists</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#if variable}}
  Content Here
{{else if variable}}
  Content Here
{{else}}
  Content Here
{{/if}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#if members.0.city}}
  City available for member 1 and may be member 2
{{else if members.1.city}}
  City available for member 2 only
{{else}}
  City not available for member 1 and 2
{{/if}}
```

{% endcode %}

{% code title="Output" %}

```
City available for member 1 and may be member 2
```

{% endcode %}

</details>

<details>

<summary>Approach 1: To check if variable equals a certain value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#if (eq variable 'value')}}
  Content Here
{{else if (eq variable 'value')}}
  Content Here
{{/if}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#if (eq investments.0.company 'L&T')}}
  First investment was L&T
{{else if (eq investments.0.company 'Apple')}}
  First investment was Apple
{{else}}
  First investment was neither Apple nor L&T
{{/if}}
```

{% endcode %}

{% code title="Output" %}

```
First investment was L&T
```

{% endcode %}

</details>

<details>

<summary>Approach 2: To check if variable equals a certain value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#ifEquals variable 'value'}}
  Content Here
{{else ifEquals variable 'value'}}
  Content Here
{{else}}
  Content Here
{{/ifEquals}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#ifEquals investments.0.company 'L&T'}}
  First investment was L&T
{{else ifEquals investments.0.company 'Apple'}}
  First investment was Apple
{{else}}
  First investment was neither Apple nor L&T
{{/ifEquals}}
```

{% endcode %}

{% code title="Output" %}

```
First investment was L&T
```

{% endcode %}

</details>

<details>

<summary>To check if multiple variables equal a certain value (AND and OR options)</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#if (and/or (eq/ne/lt/gt/lte/gte variable 'value') (eq/ne/lt/gt/lte/gte variable 'value'))}}
  Content Here
{{else}}
  Content Here
{{/if}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#if (or (eq investments.0.company 'L&T') (eq investments.0.company 'Apple'))}}
  First investment is either L&T OR Apple
{{/if}}

{{#if (and (eq investments.0.company 'L&T') (gt investments.0.amount 5))}}
  First investment is L&T and investment amount is greater than 5
{{/if}}

{{#if (and (ne user_type 'pro') (gte investments.0.amount 10))}}
  User is not pro but first investment is greater than or equal to 10
{{else if (and (eq user_type 'pro') (lt investments.0.amount 10))}}
  User type is pro but first investment is less than 10
{{else if (and (eq user_type 'pro') (eq investments.0.amount 10))}}
  User type is pro and first investment is equal to 10
{{/if}}

```

{% endcode %}

{% code title="Output" %}

```
First investment is either L&T OR Apple
First investment is L&T and investment amount is greater than 5
User type is pro and first investment is equal to 10
```

{% endcode %}

</details>

<details>

<summary>To check if variable equals a regular expression</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#ifMatches variable 'regex'}}
  Content Here
{{else ifMatches variable 'regex'}}
  Content Here
{{else}}
  Content Here
{{/ifMatches}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#ifMatches members.0.last_name 'Aga\*'}}
  Matched
{{else}}
  Not matched
{{/ifMatches}}
```

{% endcode %}

{% code title="Output" %}

```
Matched
```

{% endcode %}

</details>

<details>

<summary>To check if string starts with certain characters</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#ifStartsWith variable 'value'}}
  Content Here
{{else ifStartsWith variable 'value'}}
  Content Here
{{else}}
  Content Here
{{/ifStartsWith}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#ifStartsWith members.0.first_name 'A'}}
  Name starts with A
{{else}}
  Name does not start with A
{{/ifStartsWith}}
```

{% endcode %}

{% code title="Output" %}

```
Name starts with A
```

{% endcode %}

</details>

<details>

<summary>To use OR operator between two variables</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#compare var1 'or' var2}}
  Content Here
{{else compare var1 'or' var2}}
  Content Here
{{/compare}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#compare investments.0.amount 'or' investments.1.amount}}
  Invested at least once
{{else}}
  No investment made
{{/compare}}
```

{% endcode %}

{% code title="Output" %}

```
Invested at least once
```

{% endcode %}

</details>

<details>

<summary>To use AND operator between two variables</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#compare var1 'and' var2}}
  Content Here
{{else compare var1 'and' var2}}
  Content Here
{{/compare}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#compare investments.0.amount 'and' investments.1.amount}}
  Invested at least twice
{{else}}
  One or fewer investments made
{{/compare}}
```

{% endcode %}

{% code title="Output" %}

```
Invested at least twice
```

{% endcode %}

</details>

<details>

<summary>To use a specified default value if the actual value does not exist (or is null)</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{default variable 'value'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{default members.0.city 'Bangalore'}}
```

{% endcode %}

{% code title="Output" %}

```
Bangalore
```

{% endcode %}

</details>

<details>

<summary>To sum two numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number1 '+' number2}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.0.amount '+' investments.1.amount}}
```

{% endcode %}

{% code title="Output" %}

```
30
```

{% endcode %}

</details>

<details>

<summary>To subtract two numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number1 '-' number2}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.1.amount '-' investments.0.amount}}
```

{% endcode %}

{% code title="Output" %}

```
10
```

{% endcode %}

</details>

<details>

<summary>To multiply two numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number1 '*' number2}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.0.amount '*' investments.1.amount}}
```

{% endcode %}

{% code title="Output" %}

```
200
```

{% endcode %}

</details>

<details>

<summary>To divide numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number1 '/' number2}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.0.amount '/' investments.1.amount}}
```

{% endcode %}

{% code title="Output" %}

```
0.5
```

{% endcode %}

</details>

<details>

<summary>To perform modulo</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number1 '%' number2}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.0.amount '%' investments.1.amount}}
```

{% endcode %}

{% code title="Output" %}

```
10
```

{% endcode %}

</details>

<details>

<summary>To round numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{math number 'round' decimal_places}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{math investments.0.amount 'round' 2}}
{{math investments.0.amount 'round'}}
```

{% endcode %}

{% code title="Output" %}

```
10.00
10
```

{% endcode %}

</details>

<details>

<summary>To check for negative condition (show something only if key doesn't exist)</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#unless key}}
  Content Here
{{/unless}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#unless investments}}
  Investments were not made!
{{else}}
  Investments were made!
{{/unless}}
```

{% endcode %}

{% code title="Output" %}

```
Investments were made!
```

{% endcode %}

</details>

<details>

<summary>To iterate over a list/array</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#each key}}
  {{this.subkey}}
{{/each}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#each investments}}
  {{math @index '+' 1}}.
  {{{default this.company 'Not known'}}}
  - ${{this.amount}}
{{else}}
  No investments were made!
{{/each}}
```

{% endcode %}

{% code title="Output" %}

```
1. L&T - $10
2. Not known - $20
```

{% endcode %}

</details>

<details>

<summary>To use combination of conditions and nesting (advanced)</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#if variable}}
  Content Here
{{else}}
  {{#ifEquals variable 'value'}}
    Content Here
  {{else}}
    {{#ifMatches variable 'regex'}}
      Content Here
    {{else}}
      {{#ifStartsWith variable 'value'}}
        Content Here
      {{else}}
        {{#if (eq var1 var2)}}
          Content Here
        {{/if}}
      {{/ifStartsWith}}
    {{/ifMatches}}
  {{/ifEquals}}
{{/if}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#if investments}}
  {{#ifEquals investments.0.company 'Apple'}}
    Invested in Apple Inc!
  {{else}}{{#ifMatches investments.0.company 'Amazon\*'}}
      Invested in Amazon ventures!
    {{else}}{{#ifStartsWith investments.0.company 'Microsoft'}}
        Invested in Microsoft!
      {{else}}{{#if (eq investments.0.company 'L&T')}}
          Invested in Larsen & Toubro!
        {{/if}}
      {{/ifStartsWith}}
    {{/ifMatches}}
  {{/ifEquals}}
{{else}}
  No investments were made!
{{/if}}
```

{% endcode %}

{% code title="Output" %}

```
Invested in Larsen & Toubro!
```

{% endcode %}

</details>

<details>

<summary>To lookup values and use them in placeholders (advanced)</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#each iterate_key}}
    {{subkey}}
    {{lookup ../key [subkey]}}
{{/each}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#each investments as | investment |}}
    {{#if company}}
        {{{company}}} is in {{lookup ../companies [company]}}
    {{/if}}
{{/each}}
```

{% endcode %}

{% code title="Output" %}

```
L&T is in India
```

{% endcode %}

</details>

<details>

<summary>To split variables and get value at index</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{split variable_name 'delimiter' index}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{split period.start '-' -1}}/{{split period.start '-' 1}}/{{split period.start '-' 0}} {{split period.end '-' -1}}/{{split period.end '-' 1}}/{{split period.end '-' 0}}
```

{% endcode %}

{% code title="Output" %}

```
01/10/2023
03/10/2023
```

{% endcode %}

</details>

<details>

<summary>To split variables and loop on it</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{#each (split variable_name 'delimiter')}}
  {{this}}
{{/each}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{#each (split period.start '-')}}
  {{this}}
{{/each}}
```

{% endcode %}

{% code title="Output" %}

```
2023
10
01
```

{% endcode %}

</details>

<details>

<summary>To check if timestamp equals to today or yesterday or tomorrow</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{relativeDay timestamp_with_timezone}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{relativeDay '2023-10-25T14:30:00+05:30'}}
{{relativeDay '2023-10-26T14:30:00+05:30'}}
{{relativeDay '2023-10-24T14:30:00+05:30'}}
{{relativeDay period.start}}
{{#ifEquals (relativeDay '2023-12-19T14:30:00+05:30') 'today'}}
  The date is today!
{{else}}
  The date is not today!
{{/ifEquals}}
```

{% endcode %}

{% code title="Output" %}

```
today
tomorrow
yesterday
before
The date is today!
```

{% endcode %}

</details>

<details>

<summary>To check difference between two dates (in seconds, minutes, days, hours, month, hours, etc)<br><br>The date and time must be in RFC-3339, ISO_8601 or the helper will return NaN</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{dateDiff timestamp1_with_timezone timestamp2_with_timezone 'ms / seconds / minutes / hours / days / weeks / months / years'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'ms'}}
ms
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'seconds'}}
secs
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'minutes'}}
mins
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'hours'}}
hours
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'days'}}
days
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'weeks'}}
weeks
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'months'}}
months
{{dateDiff '2023-12-01T14:30:00+05:30' '2023-12-19T14:30:00+05:30' 'year'}}
years Since
{{dateDiff '2023-12-01T14:30:00+05:30' 'NOW' 'days'}}
days

{{#if (gt (dateDiff '2023-12-01T14:30:00+05:30' 'NOW' 'days') 10)}}
  More than 10 days!
{{else}}
  Less than 10 days!
{{/if}}
```

{% endcode %}

{% code title="Output" %}

```
1555200000 ms
1555200 secs
25920 mins
432 hours
18 days
2 weeks
0 months
0 years
Since 18 days
More than 10 days!
```

{% endcode %}

</details>

<details>

<summary>To format date value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{formatDate timestamp_with_timezone 'short'}}
{{formatDate timestamp_with_timezone 'short' 'en-in'}}
{{formatDate timestamp_with_timezone 'short' 'en-in' '+05:30'}}
{{formatDate timestamp_with_timezone 'medium'}}
{{formatDate timestamp_with_timezone 'medium' 'en-in'}}
{{formatDate timestamp_with_timezone 'medium' 'en-in' '+05:30'}}
{{formatDate timestamp_with_timezone 'long'}}
{{formatDate timestamp_with_timezone 'long' 'en-in'}}
{{formatDate timestamp_with_timezone 'long' 'en-in' '+05:30'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{formatDate '2023-10-25T18:30:00Z' 'short'}}
{{formatDate '2023-10-25T18:30:00Z' 'short' 'en-in'}}
{{formatDate '2023-10-25T18:30:00Z' 'short' 'en-in' '+05:30'}}
{{formatDate '2023-10-25T18:30:00Z' 'medium'}}
{{formatDate '2023-10-25T18:30:00Z' 'medium' 'en-in'}}
{{formatDate '2023-10-25T18:30:00Z' 'medium' 'en-in' '+05:30'}}
{{formatDate '2023-10-25T18:30:00Z' 'long'}}
{{formatDate '2023-10-25T18:30:00Z' 'long' 'en-in'}}
{{formatDate '2023-10-25T18:30:00Z' 'long' 'en-in' '+05:30'}}
```

{% endcode %}

{% code title="Output" %}

```
10/25/2023
25/10/2023
26/10/2023
Oct 25, 2023
25 Oct 2023
26 Oct 2023
October 25, 2023
25 October 2023
26 October 2023
```

{% endcode %}

</details>

<details>

<summary>To format datetime value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{formatDateTime timestamp_with_timezone 'short'}}
{{formatDateTime timestamp_with_timezone 'short' 'en-in'}}
{{formatDateTime timestamp_with_timezone 'short' 'en-in' '+05:30'}}
{{formatDateTime timestamp_with_timezone 'medium'}}
{{formatDateTime timestamp_with_timezone 'medium' 'en-in'}}
{{formatDateTime timestamp_with_timezone 'medium' 'en-in' '+05:30'}}
{{formatDateTime timestamp_with_timezone 'long'}}
{{formatDateTime timestamp_with_timezone 'long' 'en-in'}}
{{formatDateTime timestamp_with_timezone 'long' 'en-in' '+05:30'}}
{{formatDateTime timestamp_with_timezone 'custom' 'en-in' '+05:30'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{formatDateTime '2023-10-25T18:30:00Z' 'short'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'short' 'en-in'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'short' 'en-in' '+05:30'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'medium'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'medium' 'en-in'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'medium' 'en-in' '+05:30'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'long'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'long' 'en-in'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'long' 'en-in' '+05:30'}}
{{formatDateTime '2023-10-25T18:30:00Z' 'custom' 'en-in' '+05:30'}}
```

{% endcode %}

{% code title="Output" %}

```
25/10/2023, 18:30
25/10/2023, 06:30 pm
26/10/2023, 12:00 am
25 Oct 2023, 18:30
25 Oct 2023, 06:30 pm
26 Oct 2023, 12:00 am
25 October 2023 at 18:30
25 October 2023 at 06:30 pm
26 October 2023 at 12:00 am
26 October 2023 at 12:00:00 am
```

{% endcode %}

</details>

<details>

<summary>To format numeric value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{formatNumber number}}
{{formatNumber number 'en-in'}}
{{formatNumber (math number 'round') 'en-in'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{formatNumber 4000000.112}}
{{formatNumber 4000000.112 'en-in'}}
{{formatNumber (math 4000000.11 'round') 'en-in'}}
{{formatNumber 4000000.112 'en-in' 'notation=compact'}}
{{formatNumber 4000000.112 'en-US' 'notation=compact'}}
{{formatNumber 42456235.112 'en-US' 'notation=compact, minimumFractionDigits=2, maximumFractionDigits=2, style=currency, currency=USD'}}
{{formatNumber 42456235.112 'en-in' 'notation=compact, minimumFractionDigits=2, maximumFractionDigits=2, style=currency, currency=INR'}}
```

{% endcode %}

{% code title="Output" %}

```
4,000,000.112
40,00,000.112
40,00,000
40L
4M
$42.46M
₹4.25Cr
```

{% endcode %}

</details>

<details>

<summary>To trim spaces from value</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{trim variable_name}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{trim ' Test Name '}}
```

{% endcode %}

{% code title="Output" %}

```
Test Name
```

{% endcode %}

</details>

<details>

<summary>To trim values to a particular length</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{trim variable_name max_length}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{trim 'First Middle Last Name' 20}}
```

{% endcode %}

{% code title="Output" %}

```
First Middle Last Na
```

{% endcode %}

</details>

<details>

<summary>To trim value to a particular length and then truncate until the last occurrence of the specified delimiter</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{trim variable_name max_length delimiter}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{trim 'First Middle Last Name' 20 ' '}}
```

{% endcode %}

{% code title="Output" %}

```
First Middle Last
```

{% endcode %}

</details>

<details>

<summary>To remove a string</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{remove variable_name 'remove_char/string'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{remove 'Sortment™' '™'}}
{{remove 'Sortment®' '®'}}
{{remove 'Sortment®™' '®|™'}}
```

{% endcode %}

{% code title="Output" %}

```
Sortment
Sortment
Sortment
```

{% endcode %}

</details>

<details>

<summary>To sum multiple numbers</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{sumAll start_key 'number_key'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{sumAll @root 'investments.amount'}}
{{formatNumber (sumAll @root 'investments.amount') 'en-US' 'style=currency, currency=USD'}}
```

{% endcode %}

{% code title="Output" %}

```
30
$30.00
```

{% endcode %}

</details>

<details>

<summary>Current time with date format</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{moment format='date_format'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{moment format='D/M/Y'}}
{{moment format='D/M/Y hh:mm A'}}
{{moment format='dddd, D MMMM'}}
{{moment format='dddd, Do MMMM Y HH:mm Z'}}
```

{% endcode %}

{% code title="Output" %}

```
26/11/2024
26/11/2024 02:51 PM
Tuesday, 26 November
Tuesday, 26th November 2024 14:54 +05:30
```

{% endcode %}

</details>

<details>

<summary>Specific time with formatting and timezone</summary>

{% code title="Format" fullWidth="false" %}

```handlebars
{{moment date format='date_format' tz='timezone'}}
```

{% endcode %}

{% code title="Example" %}

```handlebars
{{moment '1722605334190' format='D/M/Y'}}
{{moment '1722605334190' format='DD/MM/YYYY hh:mm A'}}
{{moment '1722605334190' format='dddd, D MMMM'}}
{{moment '1722605334190' format='dddd, Do MMMM Y HH:mm Z'}}
{{moment '1722605334190' format='dddd, Do MMMM Y HH:mm Z' tz='Europe/Andorra'}}
```

{% endcode %}

{% code title="Output" %}

```
2/8/2024
02/08/2024 06:58 PM
Friday, 2 August
Friday, 2nd August 2024 18:58 +05:30
Friday, 2nd August 2024 15:28 +02:00
```

{% endcode %}

</details>


# Conversion Tracking

Conversion tracking is helpful when you want to capture user journey beyond the message, like *order placed* or *subscription purchased*. This can help give you a complete picture of how your campaigns are helping with business goals and metrics.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-a13dedfae5d777e70e314d8f6756bbdb5549be53%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Event Setup (Pre-requisite)

{% hint style="success" %}
Conversion event tracking can be enabled if you have real-time events set in Sortment. In campaign reporting, user actions like message read, link click are already captured.
{% endhint %}

To use **conversion tracking** in a campaign, the required conversion event **should already be sent to Sortment**.

If the required event is not available during campaign setup, you need to [create the event first](https://docs.sortment.com/setup/real-time-events).

### Configuration setup <a href="#configuration-setup" id="configuration-setup"></a>

To enable conversion tracking within a campaign, users must configure the following on the review page for campaign creation:

**1. Event Selector**

* Enable conversion tracking check box and select the event to track as a conversion event.
* The event should be a predefined action in Sortment

**2. Tracking Duration**

* Users can define how long conversion tracking should remain active after a campaign is delivered.
* Configurable time periods (e.g., 1 day, 7 days, 30 days) ensure flexibility based on campaign goals.

### Reporting <a href="#reporting" id="reporting"></a>

To visualize the conversion data, you can track campaign funnel with conversion step added - this gives you funnel view for the number of users who completed the conversion event within the specified tracking window.


# Journeys

### Journey overview

Journeys in Sortment are real-time, behavior-based flows that allow you to engage users with the right message at the right time across channels. They help you orchestrate marketing strategies by triggering actions based on real-time user behavior.

With Sortment Journeys, you can:

* Automate personalised user experiences
* Trigger messages when specific actions are performed by the user
* Create goal oriented complex workflows
* Connect with users through multiple channels (Email, SMS, WhatsApp)

Sortment Journeys are great for:

* Onboarding new users
* Sending promotions based on user interest
* Recovering abandoned checkouts
* Re-engaging inactive users
* Running personalised campaign flows

***

### Required permissions

Before you can create or manage journeys in Sortment, ensure the following setup and permissions are in place:

* [**Warehouse setup**](https://docs.sortment.com/setup/data-warehouses): Sortment requires a connected warehouse to store and access real-time user data and events during journeys.
* [**Channel configuration**](https://docs.sortment.com/setup/communication-channels): Messaging channels (Email, SMS, WhatsApp) must be set up.
* [**Event tracking**](https://docs.sortment.com/schema/setting-up-events-table): User events (e.g., product\_viewed, cart\_abandoned) must be created on Sortment and available to trigger journey actions.


# Getting Started

To begin working with journeys in Sortment, follow these steps:

### 1. Navigate to the journeys section

From your Sortment dashboard, click on the **Journeys** tab in the top navigation bar.

This opens the **Journeys page**, where you can:

* View all existing journeys and their current status (e.g., Stopped, Running)
* See who created or last modified each journey
* Check the number of users who have entered or converted within each journey
* Sort and search for journeys using the search bar
* Toggle visibility of archived journeys

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-4b009d6922049ffe55f9a45094484581d39e15a0%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2. Create a new Journey

To start building a new journey:

* Click the **New journey** button in the top right corner.
* You’ll be redirected to the [Journey Builder](https://docs.sortment.com/journeys/journey-builder)**.** Follow the steps in the linked document to create the journey.

### 3. Understand the status indicators

Each journey shows a status label:

* **Stopped**: The journey is inactive and not receiving new user entries.
* **Running** *(if implemented)*: Indicates the journey is live and actively responding to triggers.

You’ll also be able to view:

* **Created date and creator**
* **Last modified date and editor**
* **Entry and conversion metrics** (once live data starts flowing)

### 4. Organise and manage journeys

Sortment allows you to:

* Duplicate existing journeys for quick iteration
* Archive journeys you no longer use (via the menu on the right of each row)
* Maintain visibility and management with sorting, filtering, and searching options


# Journey Builder

## Taking a tour of the canvas

The Journey Builder canvas is your workspace for designing journeys. Let's explore the key elements based on the provided in the image below:

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-b05cf40ee0040883169de5efce67daf5f0efa661%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Navigation Bar:** Located at the top of the screen, this bar provides access to essential journey information and actions. In the screenshot, we see:
  * **Back button:** A left arrow to navigate back to the main Journeys list.
  * **Journey name:** Displays the current journey's name ("Split everyone else")
  * **Version:** Shows the version you're viewing. You may have multiple journey versions (past versions that have been stopped) or future version that is currently a draft.
  * **Last refreshed information:** Indicates the last time the analytics data on the canvas was updated ("Data last refreshed at 9 May 2025, 11:41 AM)
* **Journey Log:** The initial screenshot showed a "Search for a user" bar. When a user is searched, the sidebar transforms to display a **Journey Log** for that specific user, as seen in the image below.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-b2ef76ae4a02dc57eed38c59e78fa51f42b4390c%2Fimage3.png?alt=media" alt=""><figcaption></figcaption></figure>

The Journey log provides a chronological view of a specific user's progression through the journey. It includes:

* **User identification:** Information about the searched user (e.g., email address: "'<manoj@sortment.com>'").
* **Journey entry point:** The trigger that initiated the user's journey.
* **Block progression:** A step-by-step record of the blocks the user has entered, waited in (for Delay blocks), and proceeded through, along with timestamps.
* **Payload information:** For certain blocks (like "Send email"), there might be an option to "View payload," to see the exact detail with which the email for sent to the user.
* **Branching information:** If the journey involves split blocks or conditional logic, the log indicates which path the user took.

**Canvas:** This is the primary area where you visually construct your journey using blocks and connections. The image illustrates a journey starting with a **Trigger** block, followed by a **Split** block that directs users along different paths: **Path 1** being the filtered path and **Path** **2 as everyone else** (who don't qualify any filters on split block). **Path 1** includes a **Delay** block. Each block displays a name and a "description" placeholder, where you can add descriptions for better clarity. More about different types of blocks [here](https://docs.sortment.com/journeys/journey-components#journey-components).

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-d2da5ccd6f48d3e0efbfbe1cdad9325125434202%2Fa7.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Bottom toolbar:** Positioned at the bottom of the screen, this bar offers options for managing the canvas view and performing actions:
  * **Zoom controls:** A "100%" dropdown, indicating options to adjust the zoom level of the canvas.
  * **Alignment options:** To allow user to re-align the journey blocks to organise them on the canvas.
  * **Download as image:** Export the journey canvas as PNG for reference and sharing with team beyond the platform.

## Journey settings

Journey settings define how users interact with your journey—from when it starts, how often users can enter, to what counts as a conversion. Access these settings via the **gear icon** in the top navigation bar.

Key sections include:

* **About**: Basic journey info (name, description, timestamps).
* **Scheduling**: Set the journey's start and optional end time.
* **Entry limits**: Control how many times users can enter.
* **Exit rules**: Define conditions that remove users from the journey.
* **Goals & metrics**: Track conversions and performance.

Read more on [Journey Settings](https://docs.sortment.com/journeys/journey-settings#undefined) page on what each section does.

## Blocks

Blocks are the fundamental units for building your journey in Sortment. Each block represents a specific action or decision point for the customer.

### **Adding blocks**

To add a new block to your journey:

1. Locate the **plus icon with a circle** (**⊕**). These icons appear at the end of a sequence of blocks (as seen in Image 2) or in the middle of connections to allow you to to insert a block.
2. Click on the **⊕** icon. This will open a sidebar displaying the available block types (e.g., Trigger, Send SMS, Send Email, Delay, Split, etc.).
3. Select the desired block type from the menu. The new block will be added to the canvas, connected to the preceding block.

**Starting with a Trigger:** Every journey must begin with a **Trigger** block. This block defines the event or condition that initiates the journey for users.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-421aa87da6f18cc82610b732c9369e364fa18c73%2Fa8.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Editing blocks**

To modify the settings of an existing block:

1. **Click directly on the block** you want to edit on the canvas.
2. Upon clicking a block, a **panel** will open on the right-hand side of the screen (as seen in the image below for the "Send Email" block).
3. Within this panel, you can configure the specific settings for that block (e.g., email content, SMS message, delay duration, split rules, trigger conditions).

{% hint style="info" %}
Editing is allowed only for a draft version of a journey.
{% endhint %}

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-23d8cc502d8c9a3973e699e3cad60edc71c31e88%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Adding blocks in the middle**

To insert a block between two already connected blocks:

1. Click on the **plus icon** (**⊕**) over the connection line between two blocks
2. A menu or sidebar with available block types will appear.
3. Select the desired block type. The new block will be inserted between the two existing blocks, automatically connecting them.

### **Deleting blocks**

To remove a block from your journey:

1. **Click on the block** you want to delete on the canvas.
2. The **block properties panel will open on the right-hand side**.
3. Within the block properties panel, look for a **trash bin icon**.
4. Click on the **trash bin icon** to delete the selected block.

### **Connecting blocks**

Blocks are automatically connected when you add them using the **⊕** icons. The visual lines between the blocks represent the flow of users through the journey.

You can also click on the path and press 'Delete' key to delete the connection.

When you delete the block, any journey blocks below this block will not be connected automatically. To make a connection, you can click on the ⊕ icon and drag over to the block you want to connect it with.

### **Setting up blocks**

As mentioned in "Editing Blocks," you configure the behaviour of each block through the properties panel that appears on the right when you click on a block. This panel will vary depending on the type of block selected. For example, the "Send Email" block shows options for defining sending information and email content. Blocks marked with a **red exclamation mark and "Setup pending"** indicate that required configurations are missing.

## **Saving your journey**

Sortment journey builder does **not** autosave. To preserve your progress, you need to manually click **Save Draft** in the top right corner of the screen. This saves your work in a draft state, allowing you to return and make changes before launching.


# Journey Components

Journeys in Sortment are made up of **blocks**, which represent individual steps within the automation flow. Each block defines a specific type of behavior, decision, or action that should be taken when a user progresses through the journey.

## Available block types

Blocks are categorised based on their purpose:

### Triggers

Triggers are the starting point of any journey. They define the condition that initiates the flow for a user. Without a trigger, no user will enter the journey. This is compulsory

* **User action**: Starts the journey when a user performs a specific action (e.g., clicks a button, completes a transaction).
* **Business event**: Begins the journey based on a business-related event (e.g., purchase completed, signup).
* **Scheduled**: Initiates the journey at a specific date and time, or on a recurring schedule.
* **Audience entry or exit**: Starts the journey when a user enters or exits a defined audience.
* **Other journey**: Triggers a journey when a user is added to this journey from another journey.

For a detailed breakdown, see [Triggers](https://docs.sortment.com/journeys/journey-components/trigger#available-trigger-types).

### 1. Delays

Delay blocks are used to pause a user’s progress through the journey. This is helpful when you want to space out communication or wait for user behavior before continuing.

* **Delay** – Wait for a fixed amount of time before the next step.
* **Wait for action** – Pause until a specific event occurs (e.g. user opens an email or makes a purchase).
* **Wait till date** – Resume the journey at a specific date and time, coming from user or event property.

For a detailed breakdown, see [Delays](https://docs.sortment.com/pages/lBaIJvEsjfCxywcj8YeJ#id-1.-delay).

***

### 2. Flow Control

These blocks let you dynamically route users down different paths based on their attributes, behaviours, or randomisation logic.

* **Filter** – Branch logic based on conditions (e.g. user’s location, subscription status).
* **Split** – Randomly divide users into multiple paths (useful for A/B testing).
* **Experiment** – Setup an A/B test in the journey and measure performance across content or flow logic ideas.

For a detailed breakdown, see [Flow Control blocks](https://docs.sortment.com/journeys/journey-components/flow-control#filter).

***

### 3. Actions

Action blocks are used to communicate with users or trigger downstream updates.

* **Send Email** – Deliver an email campaign using one of your saved templates.
* **Send SMS** – Send a transactional or promotional SMS.
* **Send WhatsApp** – Send a WhatsApp message using a connected provider.
* **Call API** – Trigger an external API call (e.g. update CRM, notify external service).
* **Update trait** – Modify a user’s profile attribute (e.g. mark “onboarded” as true).
* **Add to journey** – Dynamically enroll the user into another journey.

For a detailed breakdown, see [Action Blocks](https://docs.sortment.com/pages/uBgsxm1IXVkNk1caznGs#id-1.-send-email).


# Trigger

Every journey in sortment starts with a **trigger**—this is the condition that determines when a user enters the journey. Without a trigger, the journey doesn’t run. Think of it as the starting gate that opens when certain criteria are met.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-98b2f3b0a09975ec56107fc449e32be62d72ac4a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

As shown in the image above, when creating a new journey, you’re first prompted to **set a trigger** using the sidebar on the right. You can pick from various trigger types depending on the goal of your journey.

## Available trigger types

### 1. User action

Use this trigger when you want to start a journey based on specific user behaviour or activity.

#### Step 1: Selecting an event

Use this trigger when you want to start a journey based on specific user behavior or activity.

#### **How it works:**

1. Click **Add a trigger** and select **User action**.
2. Choose from a list of events that have been setup on Sortment. For example, `Ride Completed`, `User Sign Up`, etc.
3. Optionally, you can filter users based on properties. For example:\
   “Start this journey only if the **number of rides with low rating** is less than 3.”
4. Decide if you want users to re-enter this journey by enabling the **Re-entry** option.

This trigger is ideal for behaviour-based automations — like sending a message after a ride is completed, or triggering a follow-up if a user has had a negative experience.

### Business event

Use this trigger to start a journey based on business events like `Sale announcement`. This allows you to trigger a journey for a common set of people based on some action that happens somewhere else.

#### **How it works:**

1. Select **Business event** as the trigger type.
2. Pick an event from the list — such as `Sale Announcement`, `Referral Events`, or any other event added to Sortment.
3. Apply filters to determine which users should be enrolled for this journey.
4. Enable **Re-entry** if you want users to go through this flow more than once.

This is especially useful for campaign-like journeys or recurring flows based on transactional or funnel-related events.

### Scheduled

Use this trigger to start journeys on a recurring schedule — perfect for batch campaigns or regular touch-points.

**Example use case:** Push a reminder Email every friday for weekend-only offers.

#### **Setup steps:**

* Select **Scheduled** as the trigger.
* Choose a recurring schedule: Daily, Weekly, or Monthly.
* Specify the day and time (e.g., 5th of every week at 8:00 PM).
* Apply filters to determine which users should be enrolled.
* Enable **Re-entry** if this journey should recur for the same users over time.

### Audience entry or exit

Trigger a journey when users enter or exit a dynamic audience segment.

**Example use case:** Send a message when a user qualifies for a loyalty tier or drops out of an active user segment.

#### **Setup steps:**

* Click add a trigger and select Audience entry or exit.
* Choose whether to start a journey when users **Enter audience** or **Exit audience**.
* Define the audience using filters (e.g., users with a specific property).
* Set a **refresh frequency** (e.g., monthly at 12:00 AM) to re-evaluate audience eligibility.
* Enable **Re-entry** if users should re-enter the journey when they re-qualify.

### Other journey

Trigger a journey from another journey using the **Add to journey** block.

**Use case:** Create modular journeys and move users across flows.

#### **Setup:**

* In a separate journey, use the **Add to journey** block to send users here.
* This journey will receive those users.
* Apply filter for incoming users if required.
* Enable **Re-entry** to allow users to revisit this journey if re-sent from another.


# Delays

Delay blocks help you control the timing of how and when users move through your journey. They are useful when pacing communication, reacting to user actions, or syncing journey steps with real-world events like product drops or reminders.

There are three types of delay blocks:

### 1. **Delay**

The **Delay** block holds a user in the journey for a fixed period of time before they proceed to the next step. This is useful for spreading out messages or ensuring a buffer between touch-points.

#### Configuration:

* **Time delay**: Choose a duration in minutes, hours, days, or weeks.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-ef33cbcded516b9d891958b24c0d7c6c8cda1e0e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

**Example:** Wait 2 days after a welcome email before sending the next onboarding message.

***

### 2. **Wait for action**

The **wait for action** block pauses a user's journey until they perform a specific event — such as opening an email, completing a purchase, or logging into the app. If the action doesn't happen within a set time limit, the user continues down an alternate "Timed Out" path.

#### Configuration:

* **Action to wait for**: Define the event that will release the user (e.g. `email_opened`, `purchase_made`).
* **Timeout after**: Set a time window to wait (in minutes, hours, days, or weeks).

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-e5d5541cfc8e1dd35cb84ff2c1c389983966bfa7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Output Paths:

* **Qualified**: User completed the required action.
* **Timed out**: User did not complete the action within the given time.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-700de9fc176fe9459be28326a1c44cd5a6ae6798%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

**Example:** Wait up to 3 days for a user to click a product link. If they don’t, follow up with a reminder email.

***

### 3. **Wait till date**

The **wait till date** block pauses the user until a specific date and time, which can be dynamic (based on event performed) or fixed (e.g. a launch date).

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-49c7eb9ea4537fee0bc09c60099cadad8dc2d5f9%2Fa8.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Configuration:

* **Property**: Choose a date (e.g. from an event timestamp or user trait like `membership_renewal_date`).
* **Proceed from this block**:
  * **Immediately** – User proceeds as soon as the block is evaluated.
  * **Before** – Set a time duration before the chosen date (e.g. 1 day before).
  * **After** – Set a time duration after the chosen date.
  * **At specific time** – Wait until an exact time on the selected date.

**Example:** Wait 2 hours before a user's scheduled appointment date to send a reminder SMS.


# Flow Control

Flow control blocks allow you to determine how users progress through a Journey based on attributes, behaviours, or experimentation logic. These steps dynamically shape user paths, enabling precise audience targeting and optimisation.

There are three types of flow control components:

* Filter
* Split
* Experiment

***

## Filter

Use a **filter** step to evaluate users based on static or dynamic conditions. This step creates two distinct branches:

* **Qualified** – users who meet the filter criteria
* **Everyone else** – users who do not meet the criteria

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-4caa0d05d6d48f2f8e408433587ae9c59cc2a353%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Example use case

Filter users who:

* are on the “Premium” subscription plan **AND**
* have triggered the `app_opened` event within the past 7 days.

These users will continue down the **qualified** path, while others will be routed to **Everyone else**.

#### Configuration

1. **User properties**

   Pick an existing audience or create one using related tables, events, and traits. (e.g., `subscription_plan = "Premium"`, `signup_date > 01-01-2025`, `Total Order Count > 25`, etc.).
2. **Journey activity**

   Toggle on to filter users based on journey-related activity or dynamic behaviour (e.g., "has opened the app in the last 7 days").

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-bd2349609314034b056ccaa849d24648213b7b97%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

## Split

A **split** step segments users into multiple branches based on the value of a selected property. This is commonly used to customise the experience for different user segments.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-7ea35ee4087b3e094d7185b9e01455e4168a580f%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Configuration

1. **Split on:** Select a property to evaluate (e.g., `rating`, `region`, or `driver_status`).
2. **Define paths:** Create one or more conditions to group users into specific paths:
   * **Path 1**: `rating` is less than 2
   * **Path 2**: `rating` is between 2 and 4
   * **Path 3**: `rating` is greater than 4

Users are evaluated against these conditions in the order listed and routed accordingly. Any user who doesn't match a condition will follow the default **everyone else** path.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-932149a645a75be87ba3cc58de390a4f01fcab75%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Example use case

Split users by satisfaction rating to deliver tailored follow-up experiences:

* <2: Show apology and collect feedback
* 2–4: Offer support tips
* 4 - 5: Prompt referral invitation

### Experiment

An **experiment** step enables randomised testing across multiple paths to measure and optimise user outcomes. This is useful for A/B or multivariate testing.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-11c19ac07443d868c7b0187d03100807d00a2188%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Example use case

Test two onboarding email sequences by splitting users 40/60. Track which sequence results in more app opens within 7 days, and automatically switch all future users to the winning version after 7 days.

#### Configuration

1. **Variant distribution**

   Specify what percentage of users should go down each path (e.g., 40% to Path 1, 60% to Path 2). You can optionally add more paths or a control group.
2. **Conversion tracking**
   * **Conversion event**: Select the event that signifies success (e.g., `app_opened`).
   * **Tracking window**: Define how long to measure conversions (e.g., 7 days).
   * **Auto-switch to winning path**: Automatically route future users to the top-performing path after a fixed period (e.g., 12 days).
3. **Control group**\
   Set a percentage of users who do not receive anything from the experiment. This helps you to analyse the experiment on an absolute basis – how much did each variant do compared to users who did not receive any communications.

{% hint style="warning" %}
The sum total percentages for all variants and control group should add up to 100%.
{% endhint %}

####


# Action blocks

The **Action** blocks in Sortment Journeys defines the communication or outputs triggered for users as they progress through a journey. These actions are critical for delivering messages across various channels - Email, SMS, WhatsApp - or for triggering updates and integrations via API.

Let's explore each block and how to configure them effectively:

### 1. Send Email

**Purpose**: Deliver an Email to users at a specific point in their journey.

**Configuration steps**:

* **Sending information**:
  * **Integration**: Defaults to the configured email provider (e.g., Sendgrid) but can be changed.
  * **Send as**: Auto-populated with the default sending identity (e.g., `Marketing Sortment`).
  * **Reply to**: Pre-filled, but editable to suit campaign needs.
  * **Send to**: Select the appropriate Email field from user properties.
  * [**Subscription group**](https://docs.sortment.com/settings/subscription-groups-and-contact-fields#how-subscription-groups-work-in-sortment) : Select subscription group you want to send message. Ensure the message respects user opt-in preferences.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-2ecdc578b74676f1472bfac79cbe690cf59b6ca9%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

* **Content**:
  * **Start from scratch:** Create a new email template manually.
  * **Browse templates:** Use an existing saved template.

{% hint style="danger" %}
**Status Tags**:

"Setup pending" appears if required fields like recipient or content are missing.
{% endhint %}

***

### 2. Send SMS

**Purpose**: Send a text message to users at a defined point in their journey.

**Configuration steps**:

* **Sending information**:
  * **Integration**: Default SMS provider (e.g., Twilio) is pre-selected. Can be changed.
  * **Send to**: Choose the user’s mobile number from available properties.
* **Content**:
  * **Start from scratch:** Create a new message.
  * **Browse templates:** Select from saved SMS templates.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-19a3969c310aab1f5d31e64668654bf41e32960d%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="danger" %}
**Status tags**:\
"Setup pending" appears when the block is not fully configured or some entries are missing.
{% endhint %}

***

### 3. Send WhatsApp

**Purpose**: Sends a WhatsApp message to users.

**Configuration steps**:

* **Sending information**:
  * **Integration**: Pre-set based on your default WhatsApp channel. Editable.
  * **Send to**: Choose a WhatsApp contact property from the user profile.
* **Content**:
  * Select from already existing templates or create a new one from scratch.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-cb8a0a6bfeab7736cb87bb23731670bf2769f900%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="danger" %}
Setup pending will appear if the block isn’t fully configured (e.g., missing template or incomplete integration).
{% endhint %}

### 4. Call API

**Purpose**: Sends an HTTP request to an external API as part of a user’s journey. Useful for webhooks, syncing external systems, or fetching decision data.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-390335e354684184d1d38557ac7e2da3ae1a3345%2Fa10.png?alt=media" alt="" width="348"><figcaption></figcaption></figure>

**Configuration fields**:

* **Method**: Choose from standard HTTP methods:
  * `GET` – retrieve data from an endpoint.
  * `POST` – send new data to an endpoint.
  * `PUT` – update existing data.
  * `DELETE` – remove data.
* **Endpoint**: Enter the full API URL. (Must begin with `http://` or `https://`).
* **Headers**: Add key–value pairs for content-type, auth tokens, etc.
* **Request Body**: JSON formatted. (Use **tidy mode** or expand for easier editing).
* **Pasting a header or JSON body**: Use plain text. Sortment normalizes non-breaking spaces that can appear when copying formatted text. If the endpoint still rejects an authorization header, check the expected scheme, the space after it and the credential itself. Do not include the credential in a screenshot or support request.
* **Mapping API Response**:
  * **Use keys from response payload:** Map data returned by the API for use in later blocks.
  * Paste a JSON response to extract and select values, or manually add fields.

{% hint style="success" %}
Note: Use the “@” symbol to dynamically reference user-specific properties from your schema throughout the API call configuration.
{% endhint %}

{% hint style="danger" %}
"Setup pending" will appear until all required fields (at minimum, method and endpoint) are properly configured.
{% endhint %}

***

### 5. Update trait

**Purpose**: Updates a user trait (property) within the journey. Helpful for tracking status, assigning flags or storing metadata.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-6513c1034fac1a87b3acf68816444f73698d9827%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

**Configuration fields**:

* **Select property**: Choose or create a trait (e.g., `status`, `segment`).
* **Set value to**: Define the new value for the selected trait.
  * You can enter static values directly (e.g., `"betaUser"`).
  * Or insert dynamic values from earlier steps in the journey using the **@** token selector (e.g., from API response or event payload).

**Use cases:** Track engagement, assign test variants, or mark users progress for downstream targeting.

***

### 6. Add to journey

**Purpose**: Move users to another journey, enabling modular flows and multi-step campaigns.

**Configuration fields**:

* **Add users to**: Choose a target journey from the list of available, externally enabled journeys.

{% hint style="warning" %}
**Note:** Only published journeys that are configured to accept external entries will appear in the dropdown.\
\
If the desired journey isn’t listed, ensure the target journey includes a **Trigger block**, is fully configured, and has been **published**. You’ll need to complete those steps before you can connect it via the **Add to Journey** block.
{% endhint %}

This block is useful for handing off users to specialised flows, like feedback collection, re-engagement campaigns, or transactional messaging sequences.


# Tutorial: Creating a journey

This guide shows you how to build an effective nurture journey in **Sortment** to turn free trial users into paying customers within their first 7 days. We’ll walk through how to use blocks like triggers, emails, delays, and filters to create a smart, branching flow that adapts to user behaviour.

***

### **Overview: what you’ll build**

A dynamic journey that:

* Welcomes new trial users
* Encourages product engagement with targeted nudges
* Reacts differently based on user activity (like email clicks)
* Promotes upgrading with incentives
* Ends with either a thank-you message or an off-ramp for non-converters

***

## **Journey walkthrough**

Here is the journey we’ll follow, guiding users from starting a free trial through engagement and potential conversion — followed by a visual representation.

```
Trigger: User starts free trial
→ Email: Welcome
→ Delay: 1 day
→ Email: Top 3 Things to Try
→ Filter: Clicked Email?
    → Yes:
        → Update Trait: Engaged
        → Email: Promo offer
        → Filter: Payment made?
            → Yes: Welcome to Premium → Update Trait: Paid
            → No: Exit journey
    → No:
        → Delay: 2 days
        → Email: Need Help?
        → "Reactivation Journey" after 7 days
```

### **Starting the journey: Detect free trial users**

Begin in the **Journeys** section of sortment. Create a new journey and name it something descriptive, like **“Free trial to paid – conversion flow.”**

Add a **Trigger block** and set the type to **User action**, choosing the **Backend event → Started free trial**.\
This ensures any new user who initiates a trial enters the journey immediately.

*Optional:* Add filters or set re-entry rules (e.g., re-enter after 7 days) to fine-tune when users qualify.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-c0ac1a50469e8063a2dd56102f29c1e57a3b9fda%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **Step into the journey: Send a warm welcome mail**

Add a **Send Email block** linked to your trigger.\
Choose the template **“Welcome to your free trial.”**

This email sets the tone—thank the user, explain what to expect, and offer links to resources that help them get started.

Edit the subject, sender, and preview content to match your brand voice.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-0b36adcb9a2e572f6ee77538bb0ff2e940effac1%2Fa11.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **Give them room to explore: Add a delay**

Next, insert a **Delay block** for **1 day**.\
This creates space for users to try the product on their own before further engagement.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-340ee8d1728704af3e860da4564e357e2ecd96a4%2Fa12.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **Re-engage with value: Highlight key features**

Follow up with another **Send Email block** using the **“Top 3 things to try today”** template.\
This message gives users a sense of momentum—focus on practical, valuable actions they can take now.

Customise subject lines and email content to reflect your top features or user goals.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-dca967fd4d6463ab0bd76960da34a3205abf24a0%2Fa13.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **Branch based on behaviour: Did they engage?**

Insert a **Filter block** using the **Email link clicked** condition and select “Top 3 things to try today.”\
This splits your journey into two paths: those who engaged (clicked) and those who didn’t.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-57b344cf94eef4b4fd227ea345267b310e32dc26%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **For Engaged Users (“Yes” Branch)**

1. **Mark as engaged:**\
   Use an **Update trait block** to flag the user as an **Engaged trial user** by updating their trait to “Engaged Trial.”

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-fa8a92e3f503ce41d833d655f83ac52467979b7e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Make the offer:**\
   Add a **Send email block** with the template **“Upgrade now & save 20%.”**\
   Offer a time-sensitive incentive to encourage conversion.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-9ec73e598057eae8d80025cc05791705be19e76c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

3. **Track redemptions:**\
   Insert a **Filter block** to detect if a user redeemed the promo or made a payment.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-3d57074fab7ceb46b2c1df3007051da134b975af%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

4. **Celebrate success:**\
   If converted, send a **Welcome to premium** email and use another **Update trait block** to set them as a **Paid user**.

***

#### **For Non-Engaged Users (“No” Branch)**

1. **Wait a bit longer:**\
   Add a **2-day Delay block** to allow time for re-engagement. considering only limited time remains in the trial.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-80ddb196522c68619424f834eddff24ba605b073%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

2. **Send a reminder Email:**\
   Use the **“Need help getting started?”** template to offer assistance and reignite interest.
3. **Shift to reactivation:**\
   Instead of continuing within this journey, use the **Add to journey** block to move the user into a **Reactivation journey**, where you can target them with longer-term, personalised follow-ups.

<figure><img src="https://233844858-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmbOMKRXus6KHDbeQALkO%2Fuploads%2Fgit-blob-6558dae41e2e3374b737e4d394f57bdbc0dfe6e9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### **Visual flow summary**

* **Trigger:** User starts free trial
* **Email:** Welcome message
* **Delay:** 1 day
* **Email:** Product engagement tips
* **Filter:** Clicked email → Branch
  * **Yes →** Mark Engaged → Send Promo → Check Payment → Thank You
  * **No →** Wait 2 Days → Reminder Email → "Reactivation Journey" after 7 days


# Journey Settings

The journey settings panel is divided into the following key sections:

* Scheduling
* Entry limits
* Exit triggers
* Goals

Each section enables you to fine-tune how and when users interact with your journeys.

### **1. Scheduling** <a href="#undefined" id="undefined"></a>

**Purpose:** Define the active periods for your journey-when it starts and optionally when it ends.

**Configuration steps:**

* **Activate this journey at a specific date and time:**
  * Enable this option to schedule the journey’s start.
  * Set the desired start date and time using the calendar and clock controls.
  * The time zone is displayed (e.g., GMT+05:30).
* **Set end date and time (optional):**
  * Enable this checkbox if you want the journey to automatically end at a specified date and time.
  * Specify the end date and time as required.

### **2. Entry limits** <a href="#undefined" id="undefined"></a>

**Purpose:** Control how many times users can enter the journey.

**Configuration options:**

* **No limits:**
  * Users can enter the journey an unlimited number of times.
* **Sunset after a specific number of trips:**
  * Set a maximum number of entries (trips) per user.
  * Once the limit is reached, users will no longer be able to enter the journey.

### **3. Exit triggers** <a href="#undefined" id="undefined"></a>

**Purpose:** Set up criteria for users to exit the journey before completion.

**Configuration steps:**

* **Add exit rules:**
  * Click "Add Rule" to define exit conditions.
  * Select an event from the dropdown menu to specify what triggers a user's exit from the journey (e.g., a user action, inaction, or system event).
* **Multiple rules:**
  * You can add multiple exit rules, each based on different events.

### **4. Goals** <a href="#undefined" id="undefined"></a>

**Purpose:** Assign and track goals for your journey to measure user conversions.

**Configuration steps:**

* **Conversion event:**
  * Select the event that represents a successful conversion for this journey (e.g., purchase completed, signup).
* **Goal deadline:**
  * Define the maximum time (in days) allowed between a user entering the journey and achieving the goal.

### **Summary table** <a href="#undefined" id="undefined"></a>

| Setting       | Description                                        | Options/Inputs                         |
| ------------- | -------------------------------------------------- | -------------------------------------- |
| Scheduling    | Set start/end date and time for journey activation | Date, Time, Time Zone                  |
| Entry Limits  | Restrict number of journey entries per user        | No limits, Sunset after N trips        |
| Exit Triggers | Define conditions for early journey exit           | Add rules based on events              |
| Goals         | Track conversions and set deadlines                | Conversion event, Goal deadline (days) |


# BSNL

Before you begin, you will need a BSNL account already set up, with a Sender ID added.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Click Add integration, select SMS as the channel, then choose BSNL as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username**: The username of your BSNL account.
* **Password**: The password of your BSNL account.
* **Sender**: The Sender ID you want to use.
* **Entity ID**: Your DLT registered Entity ID.
* **Circle**: The region or area code. Example: MH.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but BSNL requires a manual update of the Callback Endpoint to receive these reports.

Share the Callback URL from the integration page with your BSNL account manager so they can configure it in your BSNL account settings.

Once configured, send a test message from Sortment using BSNL as the Provider and check the delivery logs in your Sent Logs.


# Exotel

Before you begin, you will need an Exotel account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Click Add integration, select SMS as the channel, then choose Exotel as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: From your Exotel account, find API Credentials at the top of the application and click on it. On the new page, click Create an API Key, or use an existing one.
* **API Token**: Corresponding to the API Key copied above, copy and paste the API Token as well.
* **Account SID**: From the same API Credentials page, find the Account SID and paste it into Sortment.
* **Sub-Domain**: From the same API Credentials page, find the subdomain and select one: api.exotel.com or api.in.exotel.com.
* **Type of SMS**: Choose the type of SMS you intend to trigger: Transactional, Transactional\_opt\_in, or Promotional.
* **Sender/Header**: Enter the Sender ID you want to use.
* **Entity ID**: Enter your DLT registered Entity ID.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Exotel does not provide message delivery status by default. You will need to speak with your Exotel account manager to get this configured.

Once the integration is complete, the delivery status shared by Exotel will show up in the logs. Click on a log entry and check the Delivery tab.


# Infobip

Before you begin, you will need an Infobip account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Infobip as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Infobip Base URL**: Found on your Infobip home page, in the format xxxxx.api.infobip.com.
* **API Key**: Log into Infobip, go to Menu → Developer Tools → API Key, and copy an existing key or create a new one.
* **Sender**: Enter the Sender ID you want to use.
* **Entity ID (DLT)**: Enter your DLT registered Entity ID, available on your DLT platform.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Infobip provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Infobip will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Infronics

Before you begin, you will need an Infronics account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Infronics as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username**: The username shown on your Infronics account dashboard when you log in.
* **Password**: The password used to log into the account entered above.
* **Sender**: Enter the Sender ID you want to use.
* **DLT Entity ID**: Enter your DLT registered Entity ID.
* **Route**: Select the route type: Transactional or OTP.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Infronics provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Infronics will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# JioCx

Before you begin, you will need a Jio account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose JioCx as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Org Name**: The organisation name Jio assigns for this integration.
* **Username**: The username shown on your Jio account dashboard when you log in.
* **Password**: The password used to log into the account entered above.
* **Sender/Header**: Enter the Sender ID you want to use.
* **DLT Entity ID**: Enter your DLT registered Entity ID.
* **Route**: Select the route: Transactional, Promotional, or OTP.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

JioCx does not provide message delivery status by default. You will need to contact Jio to enable the Callback Endpoint and status updates via webhooks.

Once the integration is complete, the delivery status shared by JioCx will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Kaleyra Global

Before you begin, you will need a Kaleyra Global account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Kaleyra Global as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: The API key generated from your Kaleyra Global application.
* **Sender**: Enter the Sender ID you want to use.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Kaleyra Global provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Kaleyra will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Kaleyra.io

Before you begin, you will need a Kaleyra.io account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Kaleyra.io as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **SID (Security Identifier)**: Found on Kaleyra.io under the Developers tab, from a previously created API key or by creating a new one.
* **API Key**: Also found on Kaleyra.io under the Developers tab. Copy an existing key or create a new one.
* **Sender**: Enter the Sender ID you want to use.
* **Type of Route**: Select the route type based on the configuration added in your Kaleyra.io application.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Kaleyra.io provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Kaleyra will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Karix

Before you begin, you will need a Karix account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Karix as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: From your Karix platform, find Power API and click API Keys. Create a new key or use an existing one.
* **Sender**: Enter the Sender ID you want to use.
* **Entity ID**: Enter your DLT registered Entity ID.
* **Route**: Select the route: Transactional, Promotional, or OTP.
* **Delivery callback payload structure**: Email the Karix support team with the delivery callback URL and the sample payload below to set up callbacks on your Karix account.

Sample payload:

```
{
  "reason": "XXXXXX",
  "dtime": "YYYY-MM-DD hh:mm:ss",
  "mid": "201051790526XXXXXX",
  "stime": "YYYY-MM-DD hh:mm:ss",
  "dest": "XXXXXXXXXXXXXXXXXX",
  "type": "0",
  "circle": "XXXXX",
  "send": "SENDER",
  "cust_ref": "SORTMENT_REFERENCE_ID",
  "operator": "OPERATOR",
  "status": "XXX"
}
```

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Karix does not provide message delivery status by default. You will need to email <provisioning@karix.com> to enable the callback URL and status updates via webhooks.

Once the integration is complete, the delivery status shared by Karix will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Ozonetel

Before you begin, you will need an Ozonetel account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Ozonetel as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: From your Ozonetel platform, find Power API and click API Keys. Create a new key or use an existing one.
* **Sender**: Enter the Sender ID you want to use.
* **Entity ID**: Enter your DLT registered Entity ID.
* **Type of SMS**: Select the SMS type: Transactional, Promotional, or OTP.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Ozonetel does not provide message delivery status by default.

Once the integration is complete, the delivery status shared by Ozonetel will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# OneXtel

Before you begin, you will need an active OneXtel account with the required SMS credentials and DLT details configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose OneXtel as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured OneXtel account within Sortment.
* **API Key**: The API key generated from your OneXtel account, used to authenticate SMS requests sent through Sortment.
* **Sender/Header**: The Sender ID (Header) approved for your OneXtel account, used when sending SMS notifications.
* **Entity ID**: The DLT-registered Entity ID associated with your organization.
* **Delivery Callback URL**: Copy the callback URL shown in Sortment and configure it in your OneXtel account. This lets Sortment receive delivery reports and update message statuses.

#### 3. Complete the integration

Click Save once all the required details have been entered, and you're ready to send SMS notifications using OneXtel.

### Message delivery status

To receive SMS delivery updates in Sortment, the Delivery Callback URL configured in the integration must also be set up in your OneXtel account.

Once the callback configuration is complete, delivery events shared by OneXtel will show up in the logs. Open the relevant notification and check the Delivery tab for details.

Make sure the callback URL configured in OneXtel matches the one provided in Sortment. A mismatch will prevent delivery statuses from updating.

#### Artifacts

Sortment sms bsnlDocument · MD


# MessageBird

Before you begin, you will need a MessageBird account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose MessageBird as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: In MessageBird, click Developers in the left navigation, then API Access. Create a new key or use an existing one.
* **Originator**: Enter the Sender ID you want to use.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

MessageBird provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by MessageBird will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# MSG91

Before you begin, you will need an MSG91 account already set up, with Sender ID added.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose MSG91 as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Auth Key**: Found in your MSG91 account under Configurations → Auth Key. Create a new one or use an existing one.
* **Sender**: Enter the Sender ID you want to use.
* **Route**: Select the route based on message type: Transactional, Promotional, or OTP.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but MSG91 requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Log in to your MSG91 account.
2. Go to Configuration and find Webhook in the left navigation.
3. Configure the POST URL, which you can retrieve from the integration pop-up in Sortment.

Once set up, send a test message from Sortment using MSG91 as the provider and check the delivery logs in your Sent Logs.

#### Artifacts

Sortment sms bsnlDocument · MD


# Mtalkz

Before you begin, you will need a Mtalkz account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Mtalkz as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: Available in your Mtalkz account under Account Settings.
* **Sender**: Enter the Sender ID you want to use.
* **DLT Entity ID**: Enter your DLT registered Entity ID.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Mtalkz provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Mtalkz will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Netcore

Before you begin, you will need a Netcore account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Netcore as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Account ID**: The unique identifier representing the channel owned by your enterprise.
* **Username**: The Customer ID shown on your Netcore account dashboard when you log in.
* **Password**: The password used to log into the Customer ID entered above.
* **Sender**: The Sender ID you use to send out messages.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Netcore provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Netcore will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Plivo

Before you begin, you will need a Plivo account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Plivo as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Auth ID**: Log into Plivo, click Messaging in the left navigation, and find Auth ID under Accounts and Payments.
* **Auth Token**: Found in the same place as the Auth ID.
* **Source**: Select one of:
  * Sender ID — alphanumeric, registered on your Plivo account
  * Phone Number — numeric only, registered on your Plivo account
  * Powerpack UUID — created in Plivo under Messaging → Powerpacks; create a new one or use an existing one
* **Sender ID/Phone Number/Powerpack UUID**: Enter the value matching the Source you selected above.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Plivo provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Plivo will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Route Mobile

Before you begin, you will need a Route Mobile account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Route Mobile as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username**: The username you use to log into Route Mobile.
* **Password**: The password you use to log into Route Mobile.
* **Sender**: The Sender ID you want to use with this integration.
* **Entity ID**: Your company's DLT Entity ID (India only).

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Route Mobile provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Route Mobile will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Sinch

Before you begin, you will need a Sinch account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Sinch as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Route Type**: Select the route based on the configuration added in your Sinch application: OTP or Transaction.
* **Application Id**: In your Sinch portal, click the profile icon in the top right and select Access Keys. You'll find the Application ID (Project ID) there.
* **subappid**: Found in the same Access Keys section as the Sub Application ID (subproject ID).
* **UserId**: Enter the user ID.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sinch provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Sinch will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Smartping

This guide walks through configuring Smartping as an SMS provider in Sortment, including credential setup, DLT compliance requirements, delivery status configuration, and verification steps.

Before you begin, make sure your Smartping account is fully activated and that you've completed DLT registration (mandatory for India SMS traffic).

### Prerequisites

Before starting the integration, confirm you have the following from Smartping:

* Client Domain (API endpoint domain)
* Username associated with your Smartping account
* API Password (API-level credential, not your dashboard login password)
* Sender/Header approved on DLT
* Entity ID registered on the DLT platform
* Access or permission to configure Delivery Report (DLR) callbacks on Smartping

Messages will fail or be blocked by operators if the Sender ID, Entity ID, or templates are not DLT-approved.

### Setup steps

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Smartping as the provider. This opens the account configuration panel.

#### 2. Configure the integration

Fill in the following fields:

* **Custom name**: A descriptive name to identify this Smartping account inside Sortment. This is internal to Sortment and doesn't affect message delivery. Base it on use case or traffic type, e.g. "Smartping–OTP", "Smartping–Transactional", "Smartping–Promotions".
* **Client Domain**: The Client Domain provided by Smartping, used as the base URL for API requests. Example format: api.smartping.io. Don't include https\:// unless Smartping explicitly instructs you to, and don't add trailing slashes.
* **Username**: The API Username provided by Smartping, used to authenticate API requests. A common mistake is using the dashboard login email instead.
* **API Password**: The API Password associated with your Smartping username, used only for API authentication. Copy and paste carefully to avoid leading or trailing spaces, and update this field if the password is regenerated in Smartping.
* **Sender/Header**: The Sender ID/Header approved on your DLT platform. Typically a 6-character alphanumeric code, uppercase recommended. Must be approved on DLT, mapped to your Entity ID, and linked to the SMS templates you plan to use.
* **Entity ID**: The Entity ID registered with your DLT provider, required for India traffic. Operators validate Entity ID, Sender ID, and Template ID together, so a mismatched or missing Entity ID will cause message rejection.

#### 3. Configure the delivery callback URL

At the bottom of the configuration screen, Sortment displays a Delivery Callback URL. This lets Smartping notify Sortment about message delivery events like sent, delivered, failed, or rejected.

To use it:

1. Copy the Delivery Callback URL from Sortment.
2. Log in to your Smartping dashboard or contact Smartping support.
3. Configure this URL as the DLR / Delivery Report Callback endpoint.

Make sure the HTTP method is supported (GET or POST) and that no authentication blocks Smartping from calling the URL. This step is optional but strongly recommended for production use.

#### 4. Save and activate the account

Double-check all fields, then click Save. The Smartping account will appear under Accounts in the SMS integrations section and becomes available for use immediately.

### Sending a test message

After configuration:

1. Create a test notification in Sortment using SMS as the channel.
2. Select Smartping as the provider.
3. Use a DLT-approved template and a valid mobile number.
4. Send the message.

### Verifying delivery status

If the callback URL is configured correctly:

1. Go to Sent Logs in Sortment.
2. Open the message entry.
3. Review the operator response, final delivery state, and delivery timestamps.

Once set up, Smartping enables DLT-compliant SMS delivery through Sortment with full delivery tracking support.

#### Artifacts

Sortment sms bsnlDocument · MD


# Syniverse

Before you begin, you will need a Syniverse account already set up, with a Sender ID and registered numbers assigned. Alternatively, you can use the numbers publicly available on the platform for testing.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Syniverse as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Access Token**: Log into Syniverse, go to the Applications page, and click the application you want to connect. Find the Auth Keys section, expand it, and copy the Access Token into the field in Sortment.
* **Sender Address/Channel**: Log into Syniverse, go to the Applications page, and click Voice and Messaging Console. Select the relevant account. From the left navigation, expand Messaging Account → Private Channels, select the channel you want to connect, and copy the channel ID. In Sortment, enter "channel:" followed by that ID.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but Syniverse requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Log into Syniverse. On the homepage, expand Event Manager and click Delivery Configurations.
2. Click New Delivery Configuration. Give it a name, enter the Sortment Callback URL, set Delivery Protocol to REST and Delivery Format to JSON, then save.
3. From the Event Manager menu, click Subscriptions, then New Subscription, and fill in:
   * Topic: SCG-Message
   * Event Type: All types
   * Delivery Configuration: the one you just created
   * Matching Criteria: leave blank
   * Start Time: enter a time and date
   * End Time: leave blank so the callback URL doesn't expire
4. Click Create.

You can now send a test message from Sortment using Syniverse as the provider and check the delivery logs in your Sent Logs.

#### Artifacts

Sortment sms bsnlDocument · MD


# telSpiel

Before you begin, you will need a telSpiel account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose telSpiel as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username/Account ID**: The username or Account ID of your telSpiel account.
* **API Key**: Email <care@telspiel.com> to request your API key.
* **Sender**: Enter the Sender ID you want to use.
* **Entity ID**: Enter your DLT registered Entity ID, available from your DLT platform.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

telSpiel does not provide message delivery status by default. To enable tracking:

1. Email <care@telspiel.com> requesting activation of delivery tracking, and include the Callback URL from the telSpiel integration pop-up in Sortment.
2. Enable "custref" in the webhook URL.

Once this is complete, the delivery status shared by telSpiel will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# TrustSignal

Before you begin, you will need a TrustSignal account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose TrustSignal as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: In TrustSignal, go to SMS → SMS API in the left navigation.
* **Sender**: In TrustSignal, go to SMS → SMS Settings → Headers, and use the value(s) in the Header column.
* **Type of Route**: Select the route type based on the configuration added in your TrustSignal application.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but TrustSignal requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Log into your TrustSignal Messaging account.
2. Go to SMS → SMS Settings → SMS Webhook.
3. Enter the URL from the TrustSignal integration pop-up in Sortment, and save.

#### Artifacts

Sortment sms bsnlDocument · MD


# Twilio

Before you begin, you will need a Twilio account already set up, with a Messaging Service SID.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose Twilio as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Account SID**: In Twilio, under the Account tab in the top right, find API Keys and Tokens. Use the live credentials.
* **Auth Token**: In the same section, use the eye icon to reveal the Auth Token. Use the live credentials.
* **Messaging Service SID**: In Twilio, under Develop in the left navigation, go to Messaging → Services. Create a new Messaging Service or use an existing one.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Twilio provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by Twilio will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# ValueFirst

Before you begin, you will need a ValueFirst account already set up, with Sender ID and templates added.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the SMS channel, then click Add integration and choose ValueFirst as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username**: The username you use to log into your ValueFirst account.
* **API Key**: Generate a permanent API Key from the Key Management tab in your ValueFirst account. Use this key in the cURL command below to fetch your token:

```
curl --location 'https://http.myvfirst.com/smpp/api/sendsms/token?action=generate' \
--header 'Content-Type: application/json' \
--header 'apikey: {{apikey-from-ui}}' \
--data '{
  "old_token": "{{old-token-from-ui}}"
}'
```

* **Sender**: Enter the Sender ID you want to use.
* **Account Type**: Select SMPP (Short Message Peer-to-Peer) or PSMS (Platform Service Management System).

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

ValueFirst provides message delivery status by default, with no additional setup needed.

Once the integration is complete, the delivery status shared by ValueFirst will show up in the logs. Click on a log entry and check the Delivery tab.

#### Artifacts

Sortment sms bsnlDocument · MD


# Gupshup Enterprise

Before you begin, you will need a Gupshup Enterprise account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the RCS channel, then click Add integration and choose Gupshup Enterprise as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **UserID**: The Customer ID shown on your Gupshup Enterprise account dashboard when you log in.
* **Password**: The password used to log into the Customer ID entered above.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but Gupshup Enterprise requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Copy the Callback URL from the integration pop-up in Sortment.
2. Send the Callback URL to your Gupshup account manager to add it to your Gupshup account.

#### Artifacts

Sortment sms bsnlDocument · MD


# MSG91

Before you begin, you will need an MSG91 RCS account already set up.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the RCS channel, then click Add integration and choose MSG91 as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **API Key**: Log into your MSG91 RCS account, go to Authkey settings, and copy the Authkey.
* **Project ID**: Found in your MSG91 account settings.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but MSG91 requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Copy the Callback URL from the integration pop-up in Sortment.
2. Send the Callback URL to your MSG91 account manager to add it to your MSG91 account.

#### Artifacts

Sortment sms bsnlDocument · MD


# Sinch

Before you begin, make sure you have a Sinch account with RCS enabled.

All required integration details will be provided by the Sinch team upon request. The API credentials used here are different from your Sinch account login credentials.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the RCS channel, then click Add integration and choose Sinch as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify this account within Sortment.
* **Username**: The API username provided by Sinch.
* **Password**: The API password provided by Sinch.
* **App ID**: The application ID shared by Sinch for your RCS setup.
* **Project ID**: The project ID associated with your Sinch account.

#### 3. Update account and run test

You can edit and update your details at any time. Fields that are greyed out can't be modified. Use Run Test to verify the saved configuration is correct.

#### 4. Complete the integration

Click Save once all required fields are filled in. Your Sinch RCS account will now be configured.

#### Artifacts

Sortment sms bsnlDocument · MD


# ValueFirst

Before you begin, you will need a ValueFirst account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the RCS channel, then click Add integration and choose ValueFirst as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Username**: The username of your ValueFirst RCS account.
* **Token**: Contact your ValueFirst RCS account manager to get this token.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but ValueFirst requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Copy the Callback URL from the integration pop-up in Sortment.
2. Send the Callback URL to your ValueFirst account manager to add it to your ValueFirst account.

#### Artifacts

Sortment sms bsnlDocument · MD


# Wisely

Before you begin, you will need a Wisely account already set up, with Sender ID and templates configured.

#### 1. Find the provider

Go to Settings → Engagement Setup → Sender Profiles. Select the RCS channel, then click Add integration and choose Wisely as the provider.

#### 2. Configure the integration

In the pop-up, fill in:

* **Custom name**: A name to help you identify the configured account in Sortment's portal.
* **Sender**: In Wisely, go to Channels → RCS → My Agents, and fetch the Agent ID.
* **Access Key**: In Wisely, go to API → Access Accounts. Click the key icon on an existing account to get the Access Key, or click Create New.

#### 3. Complete the integration

Click Save once done, and you are all set.

### Message delivery status

Sortment can track notification delivery status, but Wisely requires a manual update of the Callback Endpoint to receive these reports. To update it:

1. Copy the Callback URL from the integration pop-up in Sortment.
2. Send the Callback URL to your Wisely account manager to add it to your Wisely account.

#### Artifacts

Sortment sms bsnlDocument · MD


# Meta

Sortment supports **multiple Meta WhatsApp account types**, but **we do not sell or provision Meta accounts**.

This page exists to help you:

* Understand the **differences between Meta account types**
* Identify **which Meta WhatsApp setup you already have**
* Know **which integration applies to your setup in Sortment**

***

### The Three Meta WhatsApp Account Types We Support

Meta WhatsApp accounts generally fall into **one of three categories**:

1. **Meta (By Facebook)**
2. **Meta Direct**
3. **Meta Direct Plus**

All three use Meta’s official WhatsApp infrastructure, but differ in **billing**, **usage**, and **coexistence with the WhatsApp Business App**.

***

## How to Identify Your Meta WhatsApp Account Type

Meta does **not clearly label** WhatsApp accounts as *Meta Direct*, *Meta Direct Plus*, or *Meta (by Facebook)* in their UI.

Instead, your account type is determined by **how it was onboarded**, **who manages billing**, and **how much setup you control**.

This guide helps you identify **which Meta WhatsApp account you already have**.

***

### First: What You Will *Not* See

You will **not** see labels like:

* “Meta Direct”
* “Meta Direct Plus”
* “Meta Cloud API”

These are **integration-level distinctions**, not names shown inside Meta dashboards.

***

### Step 1: Did you ever create or manage a Meta App?

**Ask yourself:**

> “Did I (or my tech team) create a Meta App and manage tokens, webhooks, and IDs manually?”

#### If YES → **Meta (by Facebook)**

You likely:

* Created a Meta App in **developers.facebook.com**
* Generated **System User access tokens**
* Configured **Webhooks manually**
* Used:
  * Phone Number ID
  * WABA ID
  * Access Tokens

✅ **Account Type: Meta (by Facebook)**

***

#### If NO → Move to Step 2

***

### Step 2: Who bills you for WhatsApp usage?

This is the **strongest indicator**.

#### Billing check

| What you see                                                | What it means    |
| ----------------------------------------------------------- | ---------------- |
| Charges appear **directly from Meta** (Facebook / WhatsApp) | Meta Direct      |
| You receive invoices from a **partner / provider**          | Meta Direct Plus |

***

#### If Meta bills you directly → **Meta Direct**

You likely:

* Added a **credit card** in Meta Business Manager
* Completed **embedded signup**
* Never touched app tokens or webhooks
* Manage templates natively via Meta

✅ **Account Type: Meta Direct**

***

#### If a provider bills you → **Meta Direct Plus**

You likely:

* Could not add an international credit card
* Used a **credit line / partner billing**
* Still onboarded via Meta embedded signup
* Didn’t manage technical details

✅ **Account Type: Meta Direct Plus**

***

### Step 3: Did Sortment ask you to “Login with Facebook”?

| Experience                            | Account type       |
| ------------------------------------- | ------------------ |
| Yes, onboarding was mostly UI-driven  | Meta Direct / Plus |
| No, only IDs and tokens were required | Meta (by Facebook) |

***

### Step 4: Do you manage webhooks yourself?

| Webhook setup                                          | Account type       |
| ------------------------------------------------------ | ------------------ |
| You manually configured Webhooks in Meta App Dashboard | Meta (by Facebook) |
| You never touched webhooks                             | Meta Direct / Plus |

***

### Final Identification Table

| Signal                                  | Meta (by Facebook) | Meta Direct | Meta Direct Plus |
| --------------------------------------- | ------------------ | ----------- | ---------------- |
| Created Meta App manually               | ✅                  | ❌           | ❌                |
| Uses Phone Number ID & tokens           | ✅                  | ❌           | ❌                |
| Embedded signup (“Login with Facebook”) | ❌                  | ✅           | ✅                |
| Billing via Meta                        | Depends            | ✅           | ❌                |
| Billing via provider                    | ❌                  | ❌           | ✅                |
| Manual webhook setup                    | ✅                  | ❌           | ❌                |
| Tech-heavy setup                        | ✅                  | ❌           | ❌                |

***

### Still Not Sure?

If you’re unsure after these checks, ask yourself:

1. **Who sends me invoices for WhatsApp?**
2. **Did I ever open Meta App Dashboard?**
3. **Did I ever generate tokens or webhooks manually?**

Answering just these three usually gives you the answer.

***

### When to Reach Out for Help

If you cannot confidently identify your setup:

* Share **who bills you**
* Confirm **whether your number works in WhatsApp Business App**
* Sortment support can help map your setup to the right integration


# Meta (By Facebook)

This guide explains how to connect an existing **Meta WhatsApp Cloud API setup** with **Sortment** using credentials from **Meta Business Manager and App Dashboard**.

This integration is typically used when:

* You already have a **Meta App** set up for WhatsApp
* You manage **tokens, webhooks, and phone numbers manually**
* You want deeper control over incoming messages and callbacks

***

### Prerequisites (Required from Meta)

Before configuring the integration in Sortment, ensure the following are completed in **Meta Business Manager**:

#### 1. Business & Access Setup

* You are added to the Meta Business as **Employee Access**
  * Business Admin can add you from **Business Settings → People**
* You have access to the **Meta App** used for WhatsApp
  * Granted via **People → Add Asset → Apps**
  * Permission: **Manage apps**

***

#### 2. Generate an Access Token

1. Go to **Business Settings → System Users**
2. Click **Generate New Token**
3. Select the App used for WhatsApp
4. Grant permissions:
   * **WhatsApp Business Messaging**
   * **WhatsApp Business Management**
5. Generate and save the token\
   → This will be used as the **Access Token** in Sortment

***

#### 3. Get Phone Number ID

1. Open **Meta App Dashboard**
2. Go to **WhatsApp → Getting Started**
3. Under **Send and Receive Messages**, select the WhatsApp number
4. Copy the **Phone Number ID**

***

#### 4. Get WhatsApp Business Account ID (WABA ID)

* Go to **Business Settings → Accounts → WhatsApp Accounts**
* Select the WhatsApp account
* Copy the **WABA ID** shown on the top-right

***

### Configure Meta (by Facebook) in Sortment

Once the prerequisites are ready, continue in **Sortment**.

***

#### Step 1: Find the Provider

1. Log in to **Sortment**
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click **Add Integration**
5. Select **Meta (by Facebook)**

***

#### Step 2: Configure the Integration

In the integration pop-up, enter:

* **Custom Name**\
  A name to identify this sender\
  \&#xNAN;*(Example: Meta Cloud API – Prod)*
* **Phone Number ID**\
  From Meta App Dashboard (WhatsApp → Getting Started)
* **Access Token**\
  Generated from **System Users** in Business Manager
* **WhatsApp Business Account ID (WABA ID)**\
  From Business Settings → WhatsApp Accounts

***

#### Step 3: Complete the Integration

* Click **Test and Save**
* Once validated, the Meta WhatsApp sender will be active

***

### Enabling Incoming Messages (Optional)

If you want to **receive inbound WhatsApp messages** in Sortment:

1. Enter the WhatsApp number (with country code) in the integration
2. Click **Update Account**
3. Click **Enable Incoming Messages**
4. Verify by:
   * Sending the displayed message **or**
   * Scanning the QR code
5. Confirm from the WhatsApp message received
6. Once enabled, incoming messages will start appearing in Sortment

***

### Message Delivery Status (Webhook Setup Required)

Meta requires a **manual webhook configuration** for delivery events.

***

#### Steps to Configure Webhooks

1. Log in to **Meta App Dashboard**
2. Open your App
3. Scroll to **Webhooks** → Click **Set Up**
4. Select **User** as the object
5. Subscribe to:
   * `messages`
   * `message_template_status_update`
   * `message_template_quality_update`
6. Choose API version **v18.0**
7. Enter:
   * **Callback URL** → from Sortment integration popup
   * **Verify Token** → any string (store it safely)
8. Complete webhook verification

***


# Meta Direct Plus

This guide explains how to set up **Meta Direct Plus** with **Sortment**.

***

### Prerequisites

Before starting, ensure you have:

* Access to **Meta Business Manager**
* An existing or new **WhatsApp Business** account
* Ability to temporarily **disable 2FA** (only if reusing an existing WhatsApp number)
* A **Solution ID** (provided by the Sortment team)

***

### Signup Scenarios

You will fall into **one of the following scenarios**:

1. You already have a WhatsApp Business account with a BSP and want to migrate
2. You want to add WhatsApp to an existing Meta Business account
3. You’re starting from scratch (no Meta Business account, no WhatsApp account)

The embedded signup flow adapts automatically based on your scenario.

***

### Scenario 1: Existing WhatsApp Business Account with a BSP

You already have:

* A verified Meta Business account
* WhatsApp connected via another BSP

You can:

* **Migrate the same WhatsApp number** to Meta Direct Plus
* **Add a new WhatsApp number** under the same Meta Business account

> ⚠️ If reusing the same number, temporarily **disable 2FA** on that WhatsApp number.

***

### How to Set Up Meta Direct Plus in Sortment

#### Step-by-Step Integration

1. Log in to **Sortment**
2. Navigate to **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click **Add Integration**
5. Select **Meta Direct Plus**

***

#### Embedded Signup Flow

6. Enter a **Custom Name**\
   \&#xNAN;*(Example: Meta-Direct-Plus-WhatsApp)*
7. Enter the **Solution ID**\
   \&#xNAN;*(Contact the Sortment team to obtain this)*
8. Click **Login with Facebook**
9. Complete the Meta embedded signup:
   * Select or create a Meta Business account
   * Create or select a WhatsApp Business account
   * Add and verify phone number (OTP)
   * Complete business profile details
10. Wait for Meta verification (usually under 2 minutes)
11. Return to Sortment and click **Test and Save**

🎉 Your Meta Direct Plus WhatsApp sender is now active.

***

### Enabling MM Lite API (Optional)

**Marketing Messages Lite API (MM Lite API)** improves delivery and analytics for marketing messages.

Enable it if:

* You have a **Meta Ads account**
* You plan to send **marketing messages**

#### Key Benefits

* Higher or comparable delivery vs Cloud API
* Engagement-based dynamic messaging limits
* Template benchmarks & performance insights
* Conversion reporting
* Time-bound (TTL) promotional messages

🔗 Learn more: <https://developers.facebook.com/docs/whatsapp/marketing-messages-lite-api/>

***

### Creating & Syncing WhatsApp Templates

#### Sync Existing Templates

* Go to **Templates → External**
* Click the **Sync** icon
* All Meta templates will be imported into Sortment

#### Create New Templates

* Click **+ Create**
* Submit for approval
* Approvals typically take a few minutes

> ⚠️ Templates can only be tested after **billing is enabled** via the service provider.

***

### Billing with Meta Direct Plus

* Billing is handled via **Sortment’s approved service provider**
* You receive **monthly invoices**
* No international credit card required
* Messaging and templates still operate on Meta’s Cloud API

***

### Scenario 2: Adding WhatsApp to an Existing Meta Business Account

If you already have a Meta Business account but no WhatsApp number:

* Follow the same steps as **Scenario 1**
* The embedded signup flow will guide you automatically

***

### Scenario 3: Starting from Scratch

If you don’t have a Meta Business account or WhatsApp account:

#### You’ll need:

* **GST Registration** (or incorporation proof for exemptions)
* **Company website** showing legal entity name
* **WhatsApp number** (not active on personal WhatsApp)
* No international credit card required (billing via provider)

> ⏱️ Meta verification may take **up to 48 hours**

Once verified, continue onboarding via **Meta Direct Plus** in Sortment.

***

### Important Things to Remember

1. New WhatsApp accounts start at **1,000 messages/day**
2. Good engagement unlocks **10k → 100k** tiers
3. Poor quality (blocks/spam reports) can:
   * Freeze tier upgrades
   * Disable templates
   * Risk account suspension
4. Meta Direct Plus removes **payment friction**, not quality enforcement


# Meta Direct

This guide explains how to set up **Meta Direct WhatsApp** with **Sortment**, allowing you to onboard quickly, manage templates seamlessly.

***

### Prerequisites

Before starting, ensure:

* Access to **Meta Business Manager**
* An active or new **WhatsApp Business** account
* Ability to temporarily disable **2FA** (only if reusing an existing number)
* An **international credit card** (or use Meta Direct Plus)

***

### Signup Scenarios

The Meta Direct signup flow differs based on your current setup. You’ll fall into **one of these three scenarios**.

***

### Scenario 1: Existing WhatsApp Business Account with a BSP

You already have:

* A verified Meta Business account
* WhatsApp connected via another BSP

#### Possible paths

1. **Migrate the same WhatsApp number** to Meta Direct via Sortment
2. **Add a new WhatsApp number** under the same Meta Business account (e.g., marketing vs support)

> ⚠️ Disable 2FA on the WhatsApp number if reusing the same number.

***

### Scenario 2: Add WhatsApp to an Existing Meta Business Account

If you already have a Meta Business account but no WhatsApp number attached:

* Log in to **Sortment**
* Go to **Settings → Sender Profiles → WhatsApp**
* Select **Meta Direct**
* Follow the embedded signup flow

The steps are almost identical to Scenario 1.

***

### Scenario 3: Starting from Scratch

If you have **no Facebook Business account and no WhatsApp Business account**, you’ll need to create both.

#### What you’ll need

* **GST Registration** (or incorporation certificate for exemptions)
* **Company website** showing legal entity name
* **WhatsApp phone number** (not already active, or personal WhatsApp must be deactivated)
* **Credit card with international transactions enabled**

> ⏱️ Meta verification may take **up to 48 hours**

Once verified, follow the steps in **Scenario 1** to complete WhatsApp onboarding.

***

### How to Set Up Meta Direct in Sortment

#### Step-by-Step Integration

1. Log in to **Sortment**
2. Navigate to **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click **Add Integration**
5. Select **Meta Direct**

***

#### Embedded Signup Flow

6. Enter a **Custom Name**\
   \&#xNAN;*(Example: Meta-Direct-WhatsApp)*
7. Click **Login with Facebook**
8. Complete the Meta signup flow:
   * Select Business Account
   * Create or select WhatsApp Business Account
   * Add and verify phone number (OTP)
   * Complete business profile details
9. Wait for Meta verification (usually < 2 minutes)
10. Return to Sortment and click **Test and Save**

🎉 Your Meta Direct WhatsApp sender is now active.

***

### Enabling MM Lite API (Optional)

**Marketing Messages Lite API (MM Lite API)** improves delivery for high-engagement marketing campaigns.

Enable it if:

* You have a **Meta Ads account**
* You want enhanced marketing delivery & analytics

#### Key Benefits

* Higher delivery potential vs Cloud API
* Engagement-based message scaling
* Template performance benchmarks
* Conversion reporting
* Expiring messages (TTL-based campaigns)

🔗 Learn more: <https://developers.facebook.com/docs/whatsapp/marketing-messages-lite-api/>

***

### Message Limits & Quality Guidelines

* New accounts start at **1,000 messages/day**
* Positive engagement unlocks **10k → 100k** tiers
* Low quality (blocks, spam reports) can:
  * Block tier upgrades
  * Pause templates
  * Lead to account suspension

Maintain good content and targeting hygiene.


# MessageBird

This guide explains how to connect your **MessageBird WhatsApp account** with **Sortment** to send WhatsApp campaigns and view message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **MessageBird** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **MessageBird API credentials**
* Access to **WhatsApp channel details** (Channel ID and Namespace)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **MessageBird** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this MessageBird WhatsApp sender within Sortment\
\&#xNAN;*(Example: “MessageBird – WhatsApp Prod”)*

***

#### API Key

1. Log in to your **MessageBird** account
2. Navigate to **Developers → API Access**
3. Create a new API key **or** copy an existing one
4. Paste the API Key into the **API Key** field in Sortment

***

#### From (Channel ID)

1. In MessageBird, go to **Channels**
2. Select **WhatsApp**
3. Choose the WhatsApp number you want to use
4. Copy the **Channel ID**
5. Paste it into the **From** field in Sortment

***

#### Namespace

1. From **Channels → WhatsApp** in MessageBird
2. Select the same WhatsApp number
3. Copy the **Template WhatsApp Namespace ID**
4. Paste it into the **Namespace** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your MessageBird WhatsApp sender is now ready to be used in Sortment campaigns 🎉


# Karix

This guide explains how to connect your **Karix WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Karix** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **Karix API / Account Key**
* Access to **Karix Managebot** (for webhook configuration)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Karix** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this Karix WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Karix – WhatsApp Prod”)*

***

#### API / Account Key

1. Log in to **Karix Power APIs**
2. Click **Create Keys**
3. Enter a **Key Name** and **Description**, then save
4. Click the **eye icon** to reveal the generated API key
5. Copy and paste the key into the **API / Account Key** field in Sortment

***

#### From WhatsApp Number

Enter the registered **WhatsApp business number** used to initiate conversations.

To find or add a number:

1. Log in to **Karix Managebot**
2. Navigate to **WhatsApp Campaign → Profiles**
3. If a number already exists, copy the **Mobile Number**
4. Or click **Add WhatsApp Number** to add a new one

Enter this number in Sortment **without the “+” symbol**.

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Karix WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Required)

Karix requires a **manual webhook configuration** to send message delivery updates to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to **Karix Managebot**
2. Navigate to **WhatsApp Campaign → Webhook\_Config**
3. Under the **Delivery Rule** tab, click **Create New**
4. In the **URL** field:
   * Paste the **Callback URL** shown in the Karix integration pop-up in Sortment
5. Add the following header:
   * **Key:** `Content-Type`
   * **Value:** `application/json`
6. Select **all required delivery events** for tracking
7. Save the configuration


# Kaleyra

This guide explains how to connect your **Kaleyra WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Kaleyra** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **Kaleyra API credentials** (SID and API Key)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Kaleyra** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this Kaleyra WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Kaleyra – WhatsApp Prod”)*

***

#### SID (Security Identifier)

1. Log in to your **Kaleyra** account
2. Navigate to **Developers → API Keys**
3. Open an existing API Key (click the **more / ellipsis** menu)
4. Click **View**
5. Copy the **SID** shown and paste it into the **SID** field in Sortment

***

#### API Key

1. In **Kaleyra → Developers → API Keys**
2. Copy an existing API Key **or** create a new one
3. Paste the key into the **API Key** field in Sortment

***

#### From Number

Enter the registered **WhatsApp business number** used to initiate conversations.

To find the number in Kaleyra:

1. Go to **Channels**
2. Select the **WhatsApp** channel
3. Click **Manage**
4. Open **Configurations** from the top ribbon
5. Copy the configured WhatsApp number

Enter this number in Sortment **without the “+” symbol**.

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Kaleyra WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Required)

Kaleyra requires a **manual callback configuration** to send message delivery updates to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to your **Kaleyra** account
2. From the top-right corner, click **Settings**
3. On the top ribbon menu, click **Settings** again
4. Locate **Enable WhatsApp Callback URLs**
5. Paste the **Callback URL** shown in the Kaleyra integration pop-up in Sortment
6. Save the configuration


# Interakt

This guide explains how to connect your **Interakt WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Interakt** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **Interakt Developer Settings**

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Interakt** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you easily identify this Interakt WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Interakt – WhatsApp Prod”)*

***

#### API Key

1. Log in to your **Interakt** account
2. Open **Developer Settings**
3. Locate the **Secret Key**
4. Copy the **Secret Key**
5. Paste it into the **API Key** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Interakt WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Required)

Interakt requires a **manual webhook configuration** to send message delivery updates to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to your **Interakt** account
2. From the **top-right corner**, open **Developer Settings**
3. Under **Configure Webhook**, click **Configure**
4. On the configuration page:
   * Paste the **Callback URL** shown in the Interakt integration pop-up in Sortment into the **Webhook URL** field
   * Enter the **Secret Key**
5. Under:
   * **Template Messages sent via API**
   * **Template Messages sent via Interakt Campaigns**\
     Select **all required options**
6. Click **Submit**

***

####


# Infobip

This guide explains how to connect your **Infobip WhatsApp account** with **Sortment** to send WhatsApp campaigns and view delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Infobip** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **Infobip API credentials**
* Required **API scopes enabled** for WhatsApp

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Infobip** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this Infobip WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Infobip – WhatsApp Prod”)*

***

#### From Number

Enter the registered **WhatsApp business number** used to initiate conversations.

To find or add a number in Infobip:

1. Log in to your **Infobip** account
2. Go to **Channels and Numbers → Numbers**
3. If a WhatsApp number is already added, you’ll see the **Mobile Number** and **Sender Name**
4. To add a new number, click **Buy Number**

Enter the selected number in Sortment **without the “+” symbol**.

***

#### Base URL

* You can find this on the **Infobip home page**
* Format:\
  `xxxxx.api.infobip.com`
* Copy and paste this value into the **Base URL** field in Sortment

***

#### API / Account Key

1. In Infobip, go to **Menu → Developer Tools → API Keys**
2. Copy an existing API Key **or** click **Create API Key**
3. Paste the key into the **API / Account Key** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Infobip WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Enable Required API Scopes (Mandatory)

To send WhatsApp messages and **sync WhatsApp templates** with Sortment, the API Key must have the required scopes enabled.

#### Steps to Enable API Scopes

1. In Infobip, go to **Developer Tools → API Keys**
2. Create a new API Key **or** open an existing one
3. In **Available API Scopes**, search for **WhatsApp**
4. Enable the following scopes:
   * `whatsapp:manage`
   * `whatsapp:message:send`
5. Click **Save**

Once enabled, Sortment will be able to:

* Send WhatsApp messages
* Sync WhatsApp templates from Infobip

***

### Message Delivery Status

**No additional setup is required.**

Infobip provides message delivery statuses by default.


# Gupshup

This guide explains how to connect your **Gupshup WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Gupshup (gupshup.io)** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to **Gupshup API credentials** (API Key, App ID, Bot Name)
* Access to **Gupshup Webhooks** (for delivery status tracking)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Gupshup** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this Gupshup sender within Sortment\
\&#xNAN;*(Example: “Gupshup – WhatsApp Prod”)*

***

#### API Key

* Log in to your **Gupshup** account
* Navigate to **Settings**
* Copy the **API Key**
* Paste it into the API Key field in Sortment

***

#### Bot Name

* Found under **Settings** in your Gupshup dashboard
* This is the **App Name / Bot Name**
* Paste the exact value into the **Bot Name** field

***

#### App ID

* Navigate to **Settings** in Gupshup
* Copy the **App ID**
* Paste it into the App ID field in Sortment

***

#### From Phone Number

* Enter the registered **WhatsApp Business Number**
* **Do not include the “+” symbol**

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Gupshup WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Required)

Gupshup requires a **manual webhook configuration** to send message delivery updates to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to your **Gupshup** account
2. From the top navigation bar, click **Webhooks**
3. In the **Callback URL** field:
   * Paste the **Callback URL** shown in the Gupshup integration pop-up in Sortment
4. Scroll to **Message Events Settings**
5. Select **all Message Events and System Events**
6. Save the configuration


# Gupshup Enterprise

This guide explains how to connect your **Gupshup Enterprise WhatsApp account** with **Sortment** to send WhatsApp campaigns and receive message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Gupshup Enterprise** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Login credentials for your **Gupshup Enterprise account**
* Access to **Gupshup Analytics** (for webhook configuration)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Gupshup Enterprise** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, enter the following details:

#### Custom Name

Provide a name that helps you identify this Gupshup Enterprise sender within Sortment\
\&#xNAN;*(Example: “Gupshup Enterprise – WhatsApp Prod”)*

#### Username

Enter the **username** used to log in to your Gupshup Enterprise account

#### Password

Enter the **password** corresponding to the same Gupshup Enterprise account

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once authentication is successful, the integration will be activated

Your Gupshup Enterprise WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### WhatsApp Template Handling (Important)

Gupshup Enterprise requires the **message body to be explicitly provided**, even for **template-based messages**.

#### What this means in Sortment

* While using Gupshup Enterprise as a sender, you must:
  * Select the approved WhatsApp template
  * **Also provide the message body/content** when configuring the campaign
* This is a **Gupshup Enterprise–specific requirement** and is expected behavior

***

### Message Delivery Status Configuration (Required)

Gupshup Enterprise requires a **manual webhook setup** to send message delivery updates to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to your **Gupshup Analytics** account
2. From the left navigation panel, click **Integrations**
3. In the left panel, select **Webhooks**
4. Click on **WhatsApp Message Delivery Events**
5. Scroll to the bottom of the page and:
   * Paste the **Notification Callback URL** shown in the Gupshup Enterprise integration pop-up in Sortment
   * Set **Forward Method** to **JSONBODY**
6. Click **Submit**


# Gallabox

This guide explains how to connect your **Gallabox WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Gallabox** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* Access to your **Gallabox Access Token**

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Gallabox** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you easily identify this Gallabox WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Gallabox – WhatsApp Prod”)*

***

#### Access Token

1. Log in to your **Gallabox** account
2. From the left navigation panel, go to **Integrations → Configuration**
3. Copy the **Access Token**
4. Paste the token into the **Access Token** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once the test is successful, the integration will be activated

Your Gallabox WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Important)

Gallabox requires a **manual webhook configuration** to send message delivery statuses to Sortment.

#### Steps to Enable Delivery Status Tracking

1. Log in to your **Gallabox** account
2. Navigate to **Integrations** from the left navigation panel
3. Open the **Configuration** tab
4. In the **Status URL** field:
   * Paste the **Callback URL** shown in the Gallabox integration pop-up in Sortment
5. Save the configuration

Once this is completed, Gallabox will start sending delivery status updates to Sortment.


# Freshchat

This guide explains how to connect your **Freshchat WhatsApp account** with **Sortment** to send WhatsApp campaigns and track message delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **Freshchat** account:

* An **active WhatsApp business number**
* **WhatsApp message templates** created and approved
* Access to **Freshchat API credentials**
* Access to **Meta WhatsApp Manager** for namespace information

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Freshchat** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following fields:

#### Custom Name

Provide a name to help you easily identify this Freshchat WhatsApp sender within Sortment\
\&#xNAN;*(Example: “Freshchat – WhatsApp Prod”)*

***

#### Freshchat Domain

1. Log in to your **Freshchat** account
2. Navigate to **Settings → Admin Settings**
3. Scroll to **Website Tracking and APIs**
4. Click on **API Settings**
5. Complete the CAPTCHA to view credentials
6. Copy the value from **Your Chat URL** and paste it into the **Freshchat Domain** field in Sortment

***

#### Namespace

1. Log in to **Meta Business Manager**
2. Go to **Settings → WhatsApp Accounts**
3. Select the relevant WhatsApp account
4. Click **WhatsApp Manager**
5. Under **Account Tools**, click **Message Templates**
6. Click the **Namespace** button next to the filters
7. Copy the namespace and paste it into the **Namespace** field in Sortment

***

#### From Phone Number

1. In **Freshchat**, navigate to **Settings → Admin Settings**
2. Under **Chat Channels**, select **WhatsApp**
3. Copy the registered **Business Phone Number**
4. Paste the number into Sortment **without the “+” symbol**

***

#### Freshchat API Key

1. In **Freshchat**, go to **Settings → Admin Settings**
2. Scroll to **Website Tracking and APIs**
3. Click **API Settings**
4. Complete the CAPTCHA
5. Copy **Your API Key**
6. Paste it into the **Freshchat API Key** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once the test is successful, the integration will be activated

Your Freshchat WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status

**No additional setup is required.**

Freshchat provides message delivery statuses by default.

####


# Connectly

This guide explains how to connect your **Connectly WhatsApp account** with **Sortment** to send WhatsApp campaigns and track delivery statuses.

***

### Prerequisites

Before starting the integration, ensure the following are set up in your **Connectly** account:

* An **active WhatsApp number**
* **WhatsApp templates** created and approved
* Access to **API credentials** (Business ID and API Key)

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **Connectly** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, enter the following details:

#### Custom Name

Provide a meaningful name to help you identify this Connectly account within Sortment\
\&#xNAN;*(Example: “Connectly – WhatsApp Prod”)*

#### Business ID

1. Log in to your **Connectly** account
2. Navigate to **Settings** from the left navigation panel
3. Locate **API Key and Webhook Secret**
4. Click on **Generate API Key**
5. Copy the **Business ID** and paste it into the Business ID field in Sortment

#### From WhatsApp Number

Enter the **registered WhatsApp number** linked to your Connectly account.

You can find this in:

* **Settings → General → Messaging Channels**

#### API Key

1. In **Connectly → Settings → API Key and Webhook Secret**
2. Click **Generate API Key**
3. Copy the **API Key**
4. Paste it into the API Key field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your Connectly WhatsApp sender is now ready to be used in Sortment campaigns 🎉

***

### Message Delivery Status Configuration (Important)

By default, **Connectly does not send message delivery statuses automatically**.

To enable delivery status tracking:

1. Contact your **Connectly Account Manager**
2. Ask them to **configure a webhook** using the **Webhook URL** shown in the Connectly integration pop-up in Sortment
3. Once configured, Connectly will start sending message status updates to Sortment


# AiSensy

This guide explains how to connect your **AiSensy WhatsApp account** with **Sortment** to send WhatsApp campaigns.

***

### Prerequisites

Before starting the integration, ensure the following are already set up in your **AiSensy** account:

* An **active WhatsApp business number**
* **WhatsApp templates** created and approved
* An **API Campaign** created in AiSensy using the desired template
* Access to your **AiSensy API Key**

> ⚠️ AiSensy requires campaigns to be created as **API Campaigns**.\
> Sortment can only trigger WhatsApp messages against these API Campaigns.

**IP Allowlisting (Required) -**&#x54;o allow Sortment to trigger WhatsApp messages via AiSensy, the following IPs must be **whitelisted in your AiSensy account**:

* `3.7.109.206`
* `15.206.24.102`

If these IPs are not allowlisted, message delivery requests from Sortment will fail.

> 📌 If you’re unsure where to add this, please contact **AiSensy support** or your **AiSensy account manager** to whitelist the above IPs.

***

### Step 1: Find the Provider

1. Log in to your **Sortment** dashboard
2. Navigate to:\
   **Settings → Sender Profiles**
3. Open the **WhatsApp** section
4. Click on **Add Integration**
5. Select **AiSensy** as the provider

***

### Step 2: Configure the Integration

In the integration pop-up, fill in the following details:

#### Custom Name

Provide a name to help you identify this AiSensy WhatsApp sender within Sortment\
\&#xNAN;*(Example: “AiSensy – WhatsApp Prod”)*

***

#### API Key

1. Log in to your **AiSensy** account
2. Navigate to **Manage** from the left navigation panel
3. Click on **API Key**
4. Copy the **API Key**
5. Paste it into the **API Key** field in Sortment

***

### Step 3: Complete the Integration

* Click **Test and Save**
* Once validation succeeds, the integration will be activated

Your AiSensy WhatsApp sender is now ready to be used in Sortment campaigns 🎉


# Gmail

Before we get started, you will need to have 2-factor authentication activated on your Google Account. This can be done by simply navigating to Google's [2 Factor Authentication Guide](https://support.google.com/accounts/answer/185839?hl=en\&ref_topic=2954345).

> In case you do deactivate the 2-factor authentication, the passcode will be rendered inactive, in which case the same process will have to be repeated after re-activating 2 Factor Authentication.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profile. Under the "Email" section, click on the **Gmail** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **Email:** The email address from which the "From" line or email will be sent. This may be a personal or a work email ID with a non-Gmail domain.
* **App Password:** The passcode token can be generated from [Gmail](https://myaccount.google.com/apppasswords) by navigating to Google Account and under the "Security" tab. Go to 2-step verification and find App Passwords under Signing into Google. On the page that loads, enter "Sortment" and click on Generate. Copy the code that appears in the pop-up.
* **From Name:** The name you want to be displayed in the from field to the recipient. This may be an individual or group name and is optional.
* **Content type:** You can choose either "Text/Plain" (no rich content in emails, simple plain text) or "Text/HTML" (rich content including images, buttons and links will be supported) depending on the type of content you intend on pushing in the templates.
* **Reply to:** This is an optional field. You may enter an alternate email ID so that when the recipient clicks on "Reply", the email ID you have entered in the "Reply To" will be populated. This can be different from the "From" email ID.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

> **Note:** Gmail has a limit on the number of emails that can be sent from personal and corporate email IDs. Read more on [Gmail send limits](https://support.google.com/a/answer/166852?hl=en).

**Message Delivery Status**

Gmail, by default, does not provide the status of the notification sent out. This is not a configurable feature as well. As and when this becomes a supported feature, Sortment will integrate the same into the application. In the meantime, for every Trace for Gmail, the **Delivery** tab under Trace will not be seen.


# Mailgun

Before integrating Mailgun with Sortment, you will need to have an account already set up with Mailgun.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profile. Under the "Email" section, click on the **Mailgun** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **SMTP User:** From your Mailgun account, navigate to Settings and select "Overview". On the page that opens, find "SMTP Credentials". You will see the "username" that you need to enter as "SMTP User".
* **Password:** Enter the password associated with the SMTP User entered above.
* **From Name:** Enter the name that you want to be displayed to the recipient on receiving this email.
* **From Email:** In your Mailgun account, from the Settings tab on the left navigation menu, find "Sender Authentication" and copy the details of the Sender you intend on using. Alternatively, you can add a domain or a single user on Mailgun from the same page. This can then be entered into Sortment's "From Email" field.
* **Content type:** You can choose either "Text/Plain" (no rich content in emails, simple plain text) or "Text/HTML" (rich content including images, buttons and links will be supported) depending on the type of content you intend on pushing in the templates.
* **Reply To:** This is an optional field. You may enter an alternate email ID so that when the recipient clicks on "Reply", the email ID you have entered in the "Reply To" will be populated. This can be different from the "From" email ID.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

**Message Delivery Status**

While Sortment has the capacity to track the notification delivery status, Mailgun requires a manual update of the Sortment Callback Endpoint in order to receive these reports. To update the Callback manually, follow these steps:

1. Log into your Mailgun account and click on the "Sending" tab on the left navigation panel to expand it and find **Webhooks**.
2. Click on **Webhooks** and add Sortment's webhook for each event type by clicking on **Create Webhook**. Please create and add a webhook for all the statuses using Sortment's Callback URL given in the Mailgun Integration popup.


# Mailchimp (Mandrill)

###

Before integrating Mailchimp with Sortment, you will need to have an account already set up in Mailchimp with Domains and API Keys already created.

> **Note:** Only transactional emails are processed through Sortment for Mandrill (Mailchimp). Campaigns are currently not supported.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profile. Under the "Email" section, click on the **Mailchimp** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **API Key:** Log in to your Mailchimp account. Navigate to the "Transactional email" tab and click on the "Launch App" button in the top right corner. On the new page that opens, from the left navigation pane, click on "Settings". Find the API Keys section and create a new API Key.
* **From Email:** Enter the From Email address you want to use. This email ID has to be a domain that has already been whitelisted in the [Domains](https://mandrillapp.com/settings/sending-domains) section of Mailchimp. If not added, go ahead and add the domain by clicking on "Add" and follow the instructions to complete verification, DKIM and SPF setup.
* **From Name:** Enter the name associated with the Sender Signature that was entered in the "From Email" field.
* **Content type:** You can choose either "Text/Plain" (no rich content in emails, simple plain text) or "Text/HTML" (rich content including images, buttons and links will be supported) depending on the type of content you intend on pushing in the templates.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

**Message Delivery Status**

While Sortment has the capacity to track the notification delivery status, Mailchimp requires a manual update of the Sortment Callback Endpoint in order to receive these reports. To update the Callback manually, follow these steps:

1. Log in to your Mailchimp account.
2. From the left navigation panel, find and click on "Settings". On the page that opens, find and click on "Webhooks" on the ribbon menu.
3. Click on "Add a Webhook", select all the triggers you need, enter the Callback URL given in the Mailchimp Integration popup, and save.
4. Test your integration by sending a message from the Sortment app. Your notification delivery status will be displayed in the logs, under the **Delivery** tab.


# Karix

Before integrating Karix Email with Sortment, ensure you have an active Karix account with SMTP credentials enabled.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profiles. Under the "Email" section, click on the **Karix (Email)** button.

**Step 2 — Configure the Integration**

In the setup panel, fill in:

* **Custom Name:** Provide a recognizable name for this account. *Example: Karix - Production*
* **SMTP User:** Enter your Karix SMTP username. You can obtain it from the Karix support team.
* **Password:** Enter the SMTP password associated with the above user.
* **From Name:** This is the sender name visible to recipients. *Example: Sortment Support*
* **From Email:** Enter the email address used to send emails. **Note:** This must be a verified email/domain in Karix. *Example:* [*support@yourdomain.com*](mailto:support@yourdomain.com)
* **Content Type:** Defines the email format:
  * `text/html` → Recommended (supports rich email templates)
  * `text/plain` → Plain text emails only
* **Reply To:** Specify the email address where replies should be sent.
* **Delivery Callback URL:** Sortment provides a callback URL. This must be configured in Karix to receive delivery updates.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and your Karix Email account will be connected to Sortment.

**Step 4 — Enable Delivery Tracking**

To receive delivery reports from Karix, you need to enable and configure a callback (webhook) URL on your account.

**Step 5 — Configure Callback in Karix**

Karix does not currently provide a clear self-service option in the dashboard to configure callbacks/webhooks. To enable callback configuration, you will need to reach out to the Karix support team or your account manager. Please share the Sortment Callback URL provided in the Karix integration popup with them — the Karix team will configure this on your behalf.

> **Note:** Karix requires manual configuration of the callback URL to enable delivery tracking. Without this step, delivery status will not be available in Sortment.

**Message Delivery Status**

Sortment can track email delivery statuses only after the callback URL is configured in Karix. To receive delivery reports, ensure the Sortment Callback Endpoint is correctly set in your Karix account.


# Mailmodo

Before integrating Mailmodo with Sortment, you will need to have an account already set up with Mailmodo.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profiles. Under the "Email" section, click on the **Mailmodo** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **SMTP User:** Connect with your Mailmodo Account manager to get your SMTP user details.
* **Password:** Connect with your Mailmodo Account manager to get your Password details.
* **From Name:** Enter the name that you want to be displayed to the recipient on receiving this email.
* **From Email:** Log into your Mailmodo account and navigate to **Settings** from the left navigation panel. On the page that opens, find the verified sender domains. In case there aren't any, you will need to add a new one by clicking on **Add Sender** and add the email along with the domain and set up the same in your DNS settings. This will then need to be verified by clicking on the **Verify** button next to the sender domain details.
* **Content type:** You can choose either "Text/Plain" (no rich content in emails, simple plain text) or "Text/HTML" (rich content including images, buttons and links will be supported) depending on the type of content you intend on pushing in the templates.
* **Reply To:** This is an optional field. You may enter an alternate email ID so that when the recipient clicks on "Reply", the email ID you have entered in the "Reply To" will be populated. This can be different from the "From" email ID.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!


# Netcore (Email)

Before we get started, you will need to have your Netcore account already set up with the domain mapped and verified and the content type specified.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profiles. Under the "Email" section, click on the **Netcore** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **API Key:** Log into your Netcore application and click on "Integrations" on the left navigation panel. On the page that loads, find the API tab on the ribbon menu and obtain your API Key.
* **From Email:** Enter the Email ID from which the emails will be sent. This must be an email ID with a domain that is already registered with Netcore.
* **Name:** Enter the name that would be displayed in the "From" line. It may be a person or a group name.
* **Content type:** You can choose either "HTML" or "amp-content" based on your preconfigured setup on Netcore.
* **Reply to:** This is an optional field. You may enter an alternate email ID so that when the recipient clicks on "Reply", the email ID you have entered in the "Reply To" will be populated. This can be different from the "From" email ID.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

**Message Delivery Status**

While Sortment has the capacity to track the notification delivery status, Netcore requires a manual update of the Sortment Callback Endpoint in order to receive these reports. To update the Callback manually, follow these steps:

1. Log in to your Netcore Email API account.
2. Navigate to **Settings** and find **Webhooks**. Enter Sortment's Callback URL and save.
3. Test your integration by sending a message from the Sortment app. Your notification delivery details will be displayed in the logs, under the **Delivery** tab.


# Outlook

Before we get started, we also need to understand the account type being configured.

Accounts may be:

* **Outlook / Office 365 Accounts** — These are almost all of the time belonging to an organisation or company.
* **Microsoft / Live Accounts** — These are personal accounts, created by signing up on Microsoft. They do not belong to a company or organisation.

Depending on the type of account, Outlook configuration involves a few prerequisites.

**Prerequisites for Outlook / Office 365 Accounts**

Firstly, you would need to request your administrator to grant you permission to create an app password so that you can send an email through SMTP Auth.

Your Admin will need to perform the following steps:

1. Log into the [Microsoft 365 Admin Center](https://aka.ms/admincenter).
2. In the left navigation pane, find "Active users" under "Users". On the page that opens, find the name of the person. On selecting it, a pop-up will appear on the right.
3. **To enable SMTP:** In the pop-up, find "Mail" on the ribbon menu and find "Manage Email Apps". In the second pop-up that appears, tick the box against **Authenticated SMTP** and save.
4. **To enable App Password Creation:** In the same pop-up, find "Account" and scroll to the bottom to find "Manage Multifactor Authentication". This will open a fresh page. Click on "Service Settings" on the ribbon menu. Find and select **Allow users to create app passwords to sign in to non-browser apps** and click on **Save**.

**To create an App Password:**

1. Log into your account and navigate to [Account Settings](https://myaccount.microsoft.com/). Find the **Account Info** card and click on "Update Info".
2. On the page that opens, click on "Add Sign-in Method". In the pop-up, select **App Password** and click on **Add**, provide a name and hit **Next**.
3. The App Password will be displayed in the pop-up. This won't be displayed again, so make sure to copy it before clicking on **Done**.

**Prerequisites for Microsoft / Live Accounts**

Microsoft or Live accounts are personal accounts, owned by a single person. Usually, the domain would be the default one and these accounts would not need Admin controls enforced.

**To create an App Password:**

1. Log into your account through [Security Basics](https://account.microsoft.com/security) and click on the "Advanced Security Options" card.
2. Scroll to **App Passwords** and click on **Create New App Password**.
3. Copy the App Password that is displayed on the new page and click on **Done**.

**Integrating with Sortment**

Once you have these details in place, we can proceed with the integration into Sortment's app.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profiles. Under the "Email" section, click on the **Outlook** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name to help you identify the configured account in Sortment's portal.
* **Email:** The email address from which the "From" line or email will be sent. This will be the same Email ID for which the settings were updated by the Admin of your organisation.
* **App Password:** Follow the steps mentioned above to create the App Password.
* **From Name:** The name you want to be displayed in the from field to the recipient. This may be an individual or group name and is optional.
* **Content type:** You can choose either "Text/Plain" (no rich content in emails, simple plain text) or "Text/HTML" (rich content including images, buttons and links will be supported) depending on the type of content you intend on pushing in the templates.
* **Reply to:** This is an optional field. You may enter an alternate email ID so that when the recipient clicks on "Reply", the email ID you have entered in the "Reply To" will be populated. This can be different from the "From" email ID.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

**Message Delivery Status**

Outlook, by default, does not provide the status of the notification sent out. This is not a configurable feature. As and when this becomes a supported feature, Sortment will integrate the same into the application. In the meantime, for every Trace for Outlook, the **Delivery** tab under Trace will not be seen.


# Postmark

Before integrating Postmark with Sortment, you will need to have an account already set up in Postmark with Servers and Sender Signatures already created.

**Step 1 — Find the Provider**

Navigate to the Workspace settings -> Sender profiles. Under the "Email" section, click on the **Postmark** button.

**Step 2 — Configure the Integration**

In the pop-up that appears, fill in:

* **Custom name:** Provide a name that would help you identify the configured account in Sortment's portal.
* **Server Token:** Log into Postmark and navigate to "Servers" and find the server you would like to integrate. Find the tab "API Tokens" on the ribbon menu and click on it to obtain the Server API token.
* **From Email:** Enter a Sender Email that has been pre-registered as a [Sender Signature](https://account.postmarkapp.com/signature_domains) in the Postmark application.
* **From Name:** Enter the name associated with the Sender Signature that was entered in the "From Email" field.

**Step 3 — Complete the Integration**

Click on **Add Account** once done and you are all set!

**Message Delivery Status**

While Sortment has the capacity to track the notification delivery status, Postmark requires a manual update of the Sortment Callback Endpoint in order to receive these reports. To update the Callback manually, follow these steps:

1. Log in to your Postmark account.
2. Click on **Servers** and select the server you want to connect.
3. On the page that opens, select the **Message Stream**. On the new page, click on **Webhooks** on the ribbon menu and click on the **Add Webhooks** button.
4. Enter Sortment's Callback URL given in the Postmark Integration popup, select the relevant notifications required, and save.
5. Test your integration by sending a message from the Sortment app. Your notification delivery status will be displayed in the logs, under the **Delivery** tab.




---

[Next Page](https://docs.sortment.com/llms-full.txt/1)

