> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MarketingAutomationStepOperation

> One surgical edit. Pass exactly one of update, insert, remove, or move.

<ResponseField name="insert" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-step-insert-input">MarketingAutomationStepInsertInput</a>}>
  Insert a new step.

  <Expandable title="fields" lazyRender>
    <ResponseField name="abTest" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-ab-test-step-input">MarketingAutomationAbTestStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="description" type="String" />

        <ResponseField name="name" type="String" />

        <ResponseField name="variants" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-ab-test-variant-input">[MarketingAutomationAbTestVariantInput!]</a>} />
      </Expandable>
    </ResponseField>

    <ResponseField name="after" type="ID">
      Insert on the outgoing edge of this parent step.
    </ResponseField>

    <ResponseField name="before" type="ID">
      Insert immediately before this child. The child must have exactly one incoming edge.
    </ResponseField>

    <ResponseField name="branch" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-branch">MarketingAutomationConditionBranch</a>}>
      Which condition arm to attach to.
    </ResponseField>

    <ResponseField name="condition" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-step-input">MarketingAutomationConditionStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="description" type="String" />

        <ResponseField name="expression" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-expression-input">MarketingAutomationConditionExpressionInput</a>} />

        <ResponseField name="nextFalseStepId" type="ID">
          First step when the expression does not match.
        </ResponseField>

        <ResponseField name="nextTrueStepId" type="ID">
          First step when the expression matches.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="end" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-end-step-input">MarketingAutomationEndStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />
      </Expandable>
    </ResponseField>

    <ResponseField name="manageCustomerTags" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-manage-customer-tags-step-input">MarketingAutomationManageCustomerTagsStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="operation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-tag-operation">MarketingAutomationTagOperation</a>} />

        <ResponseField name="tagIds" type="[String!]">
          Customer tag ids: each tag's `id` or `legacyId`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="manageStaticSegment" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-manage-static-segment-step-input">MarketingAutomationManageStaticSegmentStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="operation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-tag-operation">MarketingAutomationTagOperation</a>} />

        <ResponseField name="segmentId" type="String">
          The static segment's `id` or `legacyId`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendEmail" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-email-step-input">MarketingAutomationSendEmailStepInput</a>}>
      Insertable only when the trigger schema has an Email field (not SMS signup).

      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="emailAddressFieldName" type="String" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="originTemplateId" type="ID">
          The email template this send is copied from: its `id` or `legacyId`. Its trigger must match the automation's.
        </ResponseField>

        <ResponseField name="recipientNameFieldName" type="String" />

        <ResponseField name="templateId" type="ID">
          The email template to send: its `id`, or its `legacyId` from an earlier version of the Redo API. Its trigger must match the automation's.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendSms" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-sms-step-input">MarketingAutomationSendSmsStepInput</a>}>
      Insertable only when the trigger schema has a Phone field (not email signup, HSA, or extended warranty).

      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="phoneNumberFieldName" type="String" />

        <ResponseField name="recipientNameFieldName" type="String" />

        <ResponseField name="templateId" type="ID">
          The SMS template to send: its `id`, or its `legacyId` from an earlier version of the Redo API. Its trigger must match the automation's.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendWebhook" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-step-input">MarketingAutomationSendWebhookStepInput</a>}>
      Insert requires an http or https destinationUrl and a payload.

      <Expandable title="fields" lazyRender>
        <ResponseField name="authType" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-webhook-auth-type">MarketingAutomationWebhookAuthType</a>} />

        <ResponseField name="customTitle" type="String" />

        <ResponseField name="destinationUrl" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="headers" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-header-input">[MarketingAutomationSendWebhookHeaderInput!]</a>}>
          Replaces the stored header list. Include every header's value.
        </ResponseField>

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="oauth2Config" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-o-auth2-config-input">MarketingAutomationSendWebhookOAuth2ConfigInput</a>}>
          Required on insert when authType is OAUTH2\_CLIENT\_CREDENTIALS, including clientSecret.
        </ResponseField>

        <ResponseField name="payload" type="String" />
      </Expandable>
    </ResponseField>

    <ResponseField name="startAgentConversation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-start-agent-conversation-step-input">MarketingAutomationStartAgentConversationStepInput</a>}>
      Start a Commerce Agent conversation. Insertable when Commerce Agent is enabled, the trigger supports it, and the trigger schema has an Email or Phone field. Requires strategyId.

      <Expandable title="fields" lazyRender>
        <ResponseField name="channel" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-commerce-agent-channel-input">MarketingAutomationCommerceAgentChannelInput</a>} />

        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="strategyId" type="ID">
          A CommerceAgentStrategy id from this store. Required on insert.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="variantId" type="ID">
      Which A/B variant arm to attach to.
    </ResponseField>

    <ResponseField name="wait" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-step-input">MarketingAutomationWaitStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="numDays" type="Int" />

        <ResponseField name="numSeconds" type="Int" />

        <ResponseField name="timeUnit" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-time-unit">MarketingAutomationWaitTimeUnit</a>} />
      </Expandable>
    </ResponseField>

    <ResponseField name="waitForEvent" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-for-event-step-input">MarketingAutomationWaitForEventStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="eventType" type="String" />

        <ResponseField name="filter" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>} />

        <ResponseField name="nextStepId" type="ID" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="move" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-step-move-input">MarketingAutomationStepMoveInput</a>}>
  Move a step.

  <Expandable title="fields" lazyRender>
    <ResponseField name="after" type="ID">
      Place on the outgoing edge of this parent step.
    </ResponseField>

    <ResponseField name="before" type="ID">
      Place immediately before this child.
    </ResponseField>

    <ResponseField name="branch" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-branch">MarketingAutomationConditionBranch</a>}>
      Which condition arm to attach to.
    </ResponseField>

    <ResponseField name="id" type="ID!" required>
      The step to move.
    </ResponseField>

    <ResponseField name="variantId" type="ID" />
  </Expandable>
</ResponseField>

<ResponseField name="remove" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-step-remove-input">MarketingAutomationStepRemoveInput</a>}>
  Remove a step.

  <Expandable title="fields" lazyRender>
    <ResponseField name="id" type="ID!" required>
      The step's id.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="update" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-step-update-input">MarketingAutomationStepUpdateInput</a>}>
  Patch an existing step.

  <Expandable title="fields" lazyRender>
    <ResponseField name="abTest" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-ab-test-step-input">MarketingAutomationAbTestStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="description" type="String" />

        <ResponseField name="name" type="String" />

        <ResponseField name="variants" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-ab-test-variant-input">[MarketingAutomationAbTestVariantInput!]</a>} />
      </Expandable>
    </ResponseField>

    <ResponseField name="condition" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-step-input">MarketingAutomationConditionStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="description" type="String" />

        <ResponseField name="expression" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-condition-expression-input">MarketingAutomationConditionExpressionInput</a>} />

        <ResponseField name="nextFalseStepId" type="ID">
          First step when the expression does not match.
        </ResponseField>

        <ResponseField name="nextTrueStepId" type="ID">
          First step when the expression matches.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="end" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-end-step-input">MarketingAutomationEndStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />
      </Expandable>
    </ResponseField>

    <ResponseField name="id" type="ID!" required>
      The step's id.
    </ResponseField>

    <ResponseField name="manageCustomerTags" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-manage-customer-tags-step-input">MarketingAutomationManageCustomerTagsStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="operation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-tag-operation">MarketingAutomationTagOperation</a>} />

        <ResponseField name="tagIds" type="[String!]">
          Customer tag ids: each tag's `id` or `legacyId`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="manageStaticSegment" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-manage-static-segment-step-input">MarketingAutomationManageStaticSegmentStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="operation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-tag-operation">MarketingAutomationTagOperation</a>} />

        <ResponseField name="segmentId" type="String">
          The static segment's `id` or `legacyId`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendEmail" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-email-step-input">MarketingAutomationSendEmailStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="emailAddressFieldName" type="String" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="originTemplateId" type="ID">
          The email template this send is copied from: its `id` or `legacyId`. Its trigger must match the automation's.
        </ResponseField>

        <ResponseField name="recipientNameFieldName" type="String" />

        <ResponseField name="templateId" type="ID">
          The email template to send: its `id`, or its `legacyId` from an earlier version of the Redo API. Its trigger must match the automation's.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendSms" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-sms-step-input">MarketingAutomationSendSmsStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="phoneNumberFieldName" type="String" />

        <ResponseField name="recipientNameFieldName" type="String" />

        <ResponseField name="templateId" type="ID">
          The SMS template to send: its `id`, or its `legacyId` from an earlier version of the Redo API. Its trigger must match the automation's.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="sendWebhook" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-step-input">MarketingAutomationSendWebhookStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="authType" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-webhook-auth-type">MarketingAutomationWebhookAuthType</a>} />

        <ResponseField name="customTitle" type="String" />

        <ResponseField name="destinationUrl" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="headers" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-header-input">[MarketingAutomationSendWebhookHeaderInput!]</a>}>
          Replaces the stored header list. Include every header's value.
        </ResponseField>

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="oauth2Config" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-send-webhook-o-auth2-config-input">MarketingAutomationSendWebhookOAuth2ConfigInput</a>}>
          Required on insert when authType is OAUTH2\_CLIENT\_CREDENTIALS, including clientSecret.
        </ResponseField>

        <ResponseField name="payload" type="String" />
      </Expandable>
    </ResponseField>

    <ResponseField name="startAgentConversation" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-start-agent-conversation-step-input">MarketingAutomationStartAgentConversationStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="channel" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-commerce-agent-channel-input">MarketingAutomationCommerceAgentChannelInput</a>} />

        <ResponseField name="customTitle" type="String" />

        <ResponseField name="disabled" type="Boolean" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="strategyId" type="ID">
          A CommerceAgentStrategy id from this store. Required on insert.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="trigger" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-trigger-step-input">MarketingAutomationTriggerStepInput</a>}>
      Patch the trigger. Cannot change key or schemaType.

      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="entryConditions" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-entry-conditions-input">MarketingAutomationEntryConditionsInput</a>}>
          Replace entry conditions. Empty conditions clears them. Trigger-schema predicates only.
        </ResponseField>

        <ResponseField name="frequencyCap" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-frequency-cap-input">MarketingAutomationFrequencyCapInput</a>} />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="shouldSkipSmartSending" type="Boolean" />

        <ResponseField name="skipConditions" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-skip-conditions-input">MarketingAutomationSkipConditionsInput</a>}>
          Replace skip conditions. Empty conditions clears them. Segments are allowed here.
        </ResponseField>

        <ResponseField name="triggerSpecificFields" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>} />
      </Expandable>
    </ResponseField>

    <ResponseField name="wait" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-step-input">MarketingAutomationWaitStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="nextStepId" type="ID" />

        <ResponseField name="numDays" type="Int" />

        <ResponseField name="numSeconds" type="Int" />

        <ResponseField name="timeUnit" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-time-unit">MarketingAutomationWaitTimeUnit</a>} />
      </Expandable>
    </ResponseField>

    <ResponseField name="waitForEvent" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-automation-wait-for-event-step-input">MarketingAutomationWaitForEventStepInput</a>}>
      <Expandable title="fields" lazyRender>
        <ResponseField name="customTitle" type="String" />

        <ResponseField name="eventType" type="String" />

        <ResponseField name="filter" type={<a href="/docs/api-reference/v3/reference/common/json">JSON</a>} />

        <ResponseField name="nextStepId" type="ID" />
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.