Easymailing
Automation steps

Create an update-custom-field step

POST /automations/{automationUuid}/automation_steps/update_custom_field

POST/automations/{automationUuid}/automation_steps/update_custom_field

Writes a fixed value into one custom field of the contact when it reaches this step, replacing what the field held before, and lets it continue. Its place in the flow is set with parent, parent_yes or parent_no; with none of them it becomes the first step.

When to use: To record progress or a preference in the contact's data: set a "Customer type" field to "Premium" after a purchase.

When not to use: To change the contact's quality score, use create_step_update_score. To classify the contact, use create_step_add_to_group.

Side effects: If the contact has no value yet for that field, one is created. The value is the same for every contact: it cannot be copied from another field. If the chosen position is already occupied, the new step is inserted there and the step that was there moves after it.

Permissions: Requires the author role or higher, or the marketing.automations.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

automationUuid*string

UUID of the automation, as returned by list_automations.

Request Body

The new AutomationStep resource

TypeScript Definitions

Use the request body type in TypeScript.

API Resource for automation steps.

This class defines the API endpoints and serves as the base class for all automation step types. Uses DiscriminatorMap for polymorphic serialization.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/automations/0df14405-90ff-4287-b3e4-ef088901ee6f/automation_steps/update_custom_field" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "action": {      "field": "/entity/1",      "value": null    },    "parent": "/entity/1",    "parent_yes": "/entity/1",    "parent_no": "/entity/1"  }'
{  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "step_type": "string",  "automation": "/entity/1",  "count_automation_queue_items_completed": 0,  "count_automation_queue_items_in_queue": 0,  "action": {    "field": "/entity/1",    "value": null  },  "children": {    "next": {      "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",      "step_type": "string",      "automation": "/entity/1",      "count_automation_queue_items_completed": 0,      "count_automation_queue_items_in_queue": 0,      "action": null,      "children": null    }  }}