Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
    • Engage profile in scenario
    • Import and engage profile in scenario
    • Batch import and engage profiles in a scenario
    • Task for batch import and engaging profiles in the scenario
    • Get scenarios list
    • Activate scenario
    • Deactivate scenario
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Automation scenarios
  • Engage profile in scenario
Documentation for version v74

Engage profile in scenario

Description​

Engages a customer profile in scenario.

tip

When you launch the scenario using the API, the profiles will enter the "Default" start node.

Request URL​

Method: POST

https://example.com/api/v1.1/workflows/start

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"csv"NoResponse data format.
By default – json
idint12YesWorkflow ID
contentJSON-objectNoAdditional data to be used in the message template as {apicontent.fieldname} variable. The variable can be used in the "API call" and "API content filter" nodes
attachJSON-массив[]NoAttaches file(s) to the request
Profile matching mode
matchingstring"email"
"phone"
"profile_id"
"custom"
No, if matched by emailProfile matching mode
By default - email
emailstring"john@example.com""matching":"email"Email address
phonestring"+79000000000""matching":"phone"Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"CRM_ID""matching":"custom"Custom profile data field name
field_valueint/string"123420""matching":"custom"

Custom profile data field value.

tip

Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2".

resource_idint24NoResource ID for email and
phone matching
custom_requestJSON objectWhen no matching
specified
Custom MongoDB database query
subscription_filterJSON objectPush example:
"subscription_filter": {
   "subscription_id": "CAREFULWITHTHATAXE",
   "provider": "Chrome",
   "not_strict": true
}
Email example:
"subscription_filter": {
   "email": "example@example.com",
   "not_strict": true
}
SMS example:
"subscription_filter": {
   "phone": "+79106135133",
   "not_strict": false
}
NoSelects a profile's subscription to send message

Not used if custom_request is set.

not_strict determines what to do when a certain subscription is not found. If "true" — another fitting subscription will be used instead.

Request example 1​

Engages a single profile matched by Profile ID.

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 11,
"matching": "profile_id",
"profile_id": "5a74876369d42613b31947b8"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>11</id>
<matching>profile_id</matching>
<profile_id>5a74876369d42613b31947b8</profile_id>
</xml>

Request example 2​

Overwrites message subject by placing "New videos on your favorite channels" for "{apicontent.email_title}" message variable value, if it is used in mailing node templates.

Attaches "日本.txt" and "US.txt" files and a content object to be used in API content filter query.

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"id": 12,
"matching": "profile_id",
"profile_id": "66102b984a5d12bd6cc0912f",
"attach": [
{
"data": "data:text/csv;base64,5LuK5pel44GvCg==",
"name": "日本.txt"
},
{
"data": "data:text/csv;base64,SEVMTE8K",
"name": "US.txt"
}
],
"content": {
"data_lines": [
"Channel A",
"Channel B"
],
"email_title": "New videos on your favorite channels"
}
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<id>12</id>
<matching>profile_id</matching>
<profile_id>661027b04a5d12bd6cc09125</profile_id>
<attach>
<data>data:text/csv;base64,5LuK5pel44GvCg==</data>
<name>日本.txt</name>
</attach>
<attach>
<data>data:text/csv;base64,SEVMTE8K</data>
<name>US.txt</name>
</attach>
<content>
<data_lines>Channel A</data_lines>
<data_lines>Channel B</data_lines>
<email_title>New videos on your favorite channels</email_title>
</content>
</xml>

Response example​

  • JSON
  • XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data/>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError text
Last updated on Feb 21, 2024
Previous
Automation scenarios
Next
Import and engage profile in scenario
  • Description
  • Request URL
  • Request parameters
  • Request example 1
  • Request example 2
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.