Skip to Content
Sending Attio deal changes

How to send Attio deal stage changes to Usermaven

Tracking your customer’s journey from lead to deal to closed won is essential. By sending deal stage updates from your Attio CRM directly into Usermaven, you can seamlessly connect your sales pipeline with attribution analytics. This gives you a powerful, end-to-end view of your entire customer funnel and helps you understand which marketing channels are driving deals through your sales pipeline.

This guide will walk you through setting up an Attio automation to send these valuable updates to Usermaven as custom events via webhooks.


Step 1: Get your Usermaven API credentials

First, you need to obtain your API credentials from your Usermaven workspace. You’ll need both an API Key and a Server Token.

  1. Log in to your Usermaven account.
  2. Navigate to Workspace Settings from the bottom-left menu.
  3. Click on Setup.
  4. Select the HTTP API tab.
  5. You’ll see two credentials here:
    • API Key - Copy this value
    • Server Token - Copy this value
  6. Keep both values handy. You’ll need to combine them in the next step.

Step 2: Create the automation in Attio

Next, let’s build the automation inside Attio that will trigger every time a deal moves to a new stage.

  1. From your Attio dashboard, go to Automations in the sidebar.

  2. Click + New automation.

  3. Configure the trigger:

    • Choose the Record attribute is updated trigger.
    • For Object, select your Deals list.
    • For Attribute, select your Stage attribute (this might be named “Deal Stage” or similar).

    This setup ensures the automation runs precisely when a deal’s stage is changed.

  4. Add the webhook action:

    • Click the + icon below the trigger to add an action step.
    • Search for and select the Send HTTP request action.

Step 3: Configure the webhook request

This is the most important step. You will define the exact data structure that Attio sends to Usermaven.

In the “Send HTTP request” action block:

  • Method: Set this to POST.

  • URL: Enter the following URL, replacing the placeholders with your actual credentials:

    https://events.usermaven.com/api/v1/s2s/event?token=YOUR_API_KEY.YOUR_SERVER_TOKEN

    Important: The token parameter must be formatted as API_KEY.SERVER_TOKEN (joined with a period).

    For example, if your API Key is um_abc123 and your Server Token is st_xyz789, your URL would be:

    https://events.usermaven.com/api/v1/s2s/event?token=um_abc123.st_xyz789
  • Headers: Add the following header:

    • Key: Content-Type
    • Value: application/json
  • Body: Select JSON and use the appropriate payload below based on your use case.


Step 4: Choose your payload structure

The structure you use depends on whether your users have already signed up for your product or if they’re still in the lead stage.

Case 1: When deal is created after app signup

Use this method if deal is created after users sign up for your product such as trial users. You should already be identifying them in Usermaven using a stable database ID via the usermaven('id' {...}) method on your website or app. This ensures the deal event is attached to the correct, existing user profile.

Prerequisite: You must store your internal database user_id as a custom attribute on the “Person” record associated with the deal in Attio.

JSON payload:

{ "api_key": "YOUR_API_KEY", "event_type": "Deal Stage Changed", "url": "https://yourwebsite.com", "user": { "id": "{{Associated Person → Your User ID Attribute}}" }, "event_attributes": { "deal_name": "{{Deal → Name}}", "deal_stage": "{{Deal → Stage}}", "deal_value": "{{Deal → Deal Value}}", "deal_owner": "{{Deal → Owner → Name}}", "deal_id": "{{Deal → ID}}", "source": "Attio CRM" } }

Key explanation:

  • "api_key": Your Usermaven API Key (must match the one in the HTTP Request URL).
  • "event_type": The name of the custom event that will appear in your Usermaven reports.
  • "url": The URL of your website or app. If not sent, you won’t be able to see these events in the web analytics dashbaord where domainn filters are applied.
  • "user": { "id": "..." }: This is the critical part. By providing the user’s stable database id, Usermaven will find the matching user and add this “Deal Stage Changed” event to their activity timeline, alongside their product usage events.
  • "event_attributes": All the deal-related information you want to track.

Case 2: When deal is created before or without app signup

Use this method if you create deals for leads before they have signed up for your product or don’t sign-up for product at all such as selling services or creating accounts manually after closing a deal. In this scenario, you don’t have a stable database ID yet, so you must use their email address as the primary identifier.

JSON payload:

{ "api_key": "YOUR_API_KEY", "event_type": "Deal Stage Changed", "url": "https://yourwebsite.com", "user": { "id": "{{Associated Person → Email address}}", "email": "{{Associated Person → Email address}}" }, "event_attributes": { "deal_name": "{{Deal → Name}}", "deal_stage": "{{Deal → Stage}}", "deal_value": "{{Deal → Deal Value}}", "deal_owner": "{{Deal → Owner → Name}}", "deal_id": "{{Deal → ID}}", "source": "Attio CRM" } }

Key explanation:

  • "user": { "id": "...", "email": "..." }: Notice that you must send the lead’s email address in both the id and email fields.
  • Why is this essential? This creates a new user profile in Usermaven identified by that email. Later, when the lead signs up for your product and you make your first usermaven('id' {...}) call with their new stable database ID and the exact same email address, Usermaven’s identity resolution will automatically merge the pre-signup sales activity with their new user profile. This provides a complete, unified customer journey from the very first touchpoint.
  • "event_attributes": All the deal-related information you want to track. Important notes:
  1. Replace YOUR_API_KEY in the JSON body with your actual API Key.
  2. Replace ‘url’ with your website URL otherwise you won’t be able to see these events in the web analytics dashboard where domain filters are applied.
  3. Use Attio’s attribute inserter (the + icon or by typing {{) to map the dynamic values from your deal records.
  4. Add any additional event attributes you want to track.

Step 5: Test and activate your automation

Before you enable the automation, it’s crucial to test that the connection is working.

  1. In the Attio webhook editor, click the Test button. Attio will ask you to select a sample deal to use for the test.
  2. Go to your Usermaven account and open Configure → Events Activity (or the Live View). You should see the Deal Stage Changed event appear within moments.
  3. Click on the custom event to inspect the properties and confirm the data is correct.
  4. Once you’ve verified the test was successful, return to Attio and turn on your automation using the toggle at the top right of the screen.

That’s it! Your Attio deal stage changes will now flow directly into Usermaven.


Step 6: Use your custom events in attribution reports

Now that your deal stage changes are flowing into Usermaven as custom events, you can leverage them in your attribution analysis to understand which marketing channels are driving deals through your sales pipeline.

Creating a conversion goal from your custom event

  1. Log in to your Usermaven account.

  2. Navigate to Configure → Conversion Goals from the sidebar.

  3. Click New Goal at the top right.

  4. Configure your conversion goal:

    • Name: Give it a descriptive name like “Deal Stage - Qualified” or “Deal Closed Won”.
    • Event type: Select Custom Event.
    • Event: Choose Deal Stage Changed from the dropdown.
    • Add filters (optional but recommended): You can filter to track only specific deal stages:
      • Click Add filter
      • Select property: deal_stage
      • Set condition to match the stage you care about (e.g., equals “Closed Won” or equals “Qualified”)
    • Conversion value:
      • Select Dynamic value if you want to use the actual deal value
      • Choose deal_value from your event attributes
      • This allows Usermaven to calculate revenue attribution
    • Count unique conversions: Check this box if you want to count each user only once within your date range (recommended for milestone stages like “Closed Won”).
  5. Click Save Goal.

Analyzing attribution with your conversion goal

Once your conversion goal is created and receiving data, you can use it across Usermaven’s attribution features:

Channel/Source attribution:

  1. Go to Attribution → Channel/Source in the sidebar.
  2. At the top left, select your newly created conversion goal from the dropdown.
  3. The dashboard will show which marketing channels (Organic Search, Paid Search, Social, Direct, etc.) are driving deals through your pipeline.
  4. Compare different attribution models (First Touch, Last Touch, Linear, Time Decay, U-Shaped, W-Shaped, Z-Shaped) to understand the full impact of each channel.

Paid ads attribution:

  1. Go to Attribution → Paid Ads in the sidebar.
  2. Select your deal-based conversion goal.
  3. See which specific ad campaigns, ad sets, and individual ads are contributing to pipeline movement and closed deals.
  4. View metrics like ad spend, ROAS (Return on Ad Spend), cost per conversion, and revenue attributed to each campaign.

Key insights you can uncover:

  • Which marketing channels generate the highest-value deals
  • The typical customer journey from first touch to closed deal
  • Which campaigns have the best ROI when measured by actual pipeline impact (not just signups)
  • How long it takes from first marketing touchpoint to deal closure
  • The attribution window that matters most for your sales cycle

Pro tip: Create multiple conversion goals for different deal stages (e.g., “Qualified Lead”, “Opportunity”, “Closed Won”) to analyze how different channels perform at each stage of your funnel. This gives you a complete view of your marketing’s impact on the entire customer journey.


Troubleshooting

Events not appearing in Usermaven:

  • Double-check that your token parameter in the URL is correctly formatted as API_KEY.SERVER_TOKEN with a period between them.
  • Verify that the api_key in your JSON payload exactly matches the API Key in your account and HTTP request URL.
  • Ensure the Content-Type header is set to application/json.
  • Check Attio’s automation logs to see if the webhook is being sent successfully.

Events appearing but not attributed to the correct user:

  • For Case 1 (SaaS): Verify that the user.id you’re sending matches exactly with the ID you use in your usermaven.('id', {...}) calls.
  • For Case 2 (Lead-Gen): Ensure the email address is being sent in both the id and email fields, and that it matches the email used during signup.
  • If conversion goals show 0 conversion for server side events, check if you are sending ‘url’ field in the payload.

Need more help?

If you’re stuck or have a specific case that isn’t covered by these steps, reach out to Usermaven support via in-app chat or email at support@usermaven.com.

Last updated on