Configure a custom action for a triggered personalization

Important

Feature availability is part of a phased rollout. Your organization may not see this functionality yet. It will become available when your environment is included in the rollout.

Use the New API request to send a custom payload to a webhook when the trigger occurs and any configured conditions are met.

The webhook connects SitecoreAI to an external system, such as a CRM, loyalty platform, order management system, or another API.

The payload can include dynamic values from visitor profile and event data. For example, you can send customer details and form data to a CRM after a qualifying visitor submits a form.

You configure the webhook URL, HTTP method, authentication, headers, and request body. You can then preview the request with a test profile to verify how dynamic values are resolved before you publish the personalization.

Configure the API request

Define the webhook destination and the payload that SitecoreAI sends when the personalization is triggered.

To configure the API request:

  1. On the Configuration page, in the Triggered action section, click New API request.

  2. Enter a descriptive name for the action.

  3. Select the HTTP method and enter the webhook URL.

    Note

    To include dynamic values, use ${variableName} or {{variableName}} in the URL, header values, or request body.

  4. Click Default headers and configure the headers required by the destination.

  5. Optionally, click Add header to add more headers.

  6. In Authentication, select the method required by the webhook destination:

    • No authentication - sends the request without authentication credentials.
    • Basic - sends a username and password with the request.
    • API key - sends an API key provided by the destination service.
    • OAuth - uses client credentials to obtain an access token for the request.
  7. In the Request body template, define the JSON payload that SitecoreAI sends to the webhook.

    Note

    You can include dynamic values in the payload. These values are resolved using data available when the personalization runs.

    For example, you can send visitor and event data to a CRM when a qualifying visitor submits a form:

       {      
       "firstName": "{{firstName}}",
       "email": "{{email}}",
       "country": "{{country}}",
       "source": "product-demo-form"      
       }

    When the personalization is triggered, SitecoreAI resolves the dynamic values and sends the resulting payload to the configured webhook.

  8. Click Next.

Preview the webhook request

Use a visitor profile to check how dynamic values are resolved before you publish the personalization.

To preview the webhook request:

  1. In the Context for preview section, choose one of the following:

    • Load profile - enter a visitor's client ID or profile ID. To retrieve these IDs, use inspect mode.
    • Generate profile - use AI to generate a test profile from a natural-language prompt.
  2. If you selected Generate profile:

    • Enter a description of the profile you want to test.
    • Example: A person called John Doe
    • Click Generate.

    After the profile is loaded or generated, optionally click View JSON to review the profile data.

The Resolved body shows the payload with the dynamic values populated from the test profile.

Review the resolved payload to make sure its data and JSON structure match what the webhook destination expects.

Next steps

After you verify the request, publish the triggered personalization immediately or schedule it for later.

If you have suggestions for improving this article, let us know!