Skip to main content

ChurnKey Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a ChurnKey location.
churnkey_api.png

ChurnKey

Create a ChurnKey Destination

  1. Click the + icon on the Nexset that will be sent to the ChurnKey destination, and select the Send to Destination option from the menu.

  2. Select the ChurnKey connector from the list of available destination connectors. Then, select the credential that will be used to connect to the ChurnKey account, and click Next; or, create a new ChurnKey credential for use in this flow.

  3. In Nexla, ChurnKey destinations can be created using pre-built endpoint templates, which expedite destination setup for common ChurnKey endpoints. Each template is designed specifically for the corresponding ChurnKey endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

    ChurnKey destinations can also be configured manually, allowing you to send data to ChurnKey endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this destination manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common ChurnKey endpoints. Each template is designed specifically for the corresponding ChurnKey endpoint, making destination setup easy and efficient.

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Create Event

    This endpoint tracks a single customer behavioral event, feeding ChurnKey's predictive customer-health models. Use it to stream product-usage signals — such as logins or feature usage — that help ChurnKey forecast churn risk.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/api/events/new. Each Nexset record is sent as the JSON request body.
    • Map your Nexset so each record matches the expected event shape. The body supports the following fields:

      • event — The name of the behavioral event being tracked (for example, a login or a feature use).
      • customerId — The customer's identifier from your billing provider (for example, the Stripe customer ID).
      • uid — An optional alternative customer identifier.
      • eventDate — An optional timestamp for when the event occurred.
      • eventData, user, and customerData — Optional objects carrying additional event, user, and customer attributes.

    To pre-train ChurnKey's health models, ChurnKey recommends submitting three to six months of historical event data. For details on supported event fields, refer to the ChurnKey Event Tracking documentation.

    Bulk Create Events

    This endpoint tracks up to 100 customer events in a single request. Use it to backfill historical behavioral data efficiently when pre-training ChurnKey's customer-health models.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/api/events/bulk. The request body is an array of event objects.
    • Use Record Batching to group multiple Nexset records into a single array per request. Set the batch size to no more than 100, since the endpoint accepts a maximum of 100 events per call.

    Unlike the single Create Event endpoint, the bulk endpoint does not accept customerData updates. To update customer attributes, use the Update Customer endpoint instead.

    Update Customer

    This endpoint updates the customer attributes that ChurnKey stores — such as plan tier or seat count — so that health-model features stay current with your CRM or billing system. Use it to keep ChurnKey's view of each customer in sync with your source of truth.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/api/events/customer-update. Each Nexset record is sent as the JSON request body.
    • Map your Nexset so each record includes at least one customer identifier. The body supports the following fields:

      • customerId or uid — At least one of these is required to identify the customer to update.
      • customerData — An optional object carrying updated customer attributes, such as the number of seats or plan name.
      • user — An optional object carrying user-level attributes, useful for B2B products that track individual users.

    Keeping customer attributes current improves the accuracy of ChurnKey's churn predictions. For the full customer model, refer to the ChurnKey customer model documentation.

    Set Billing Contacts

    This endpoint configures the billing contacts for a single customer so they receive Failed Payment Recovery communications. Use it to control which users are opted into recovery emails for a given customer.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/api/events/customer-update/set-users. Each Nexset record is sent as the JSON request body.
    • Set billingAdmin to true for any user who should be opted into Failed Payment Recovery emails for the customer.

    For complete details on configuring billing contacts, refer to the ChurnKey Billing Contact API documentation.

    Bulk Set Billing Contacts

    This endpoint updates billing contacts across many customers in a single request. Use it to apply Failed Payment Recovery contact settings in bulk rather than one customer at a time.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/api/events/customer-update/set-users/bulk. The request body is an array of objects, each containing a customerId and a users array.
    • Use Record Batching to group multiple Nexset records into a single array per request, with each element specifying the customer and its billing-contact users.

    This endpoint is best suited for syncing billing-contact settings for large customer bases. For details on the request shape, refer to the ChurnKey Billing Contact API documentation.

    Delete DSR Data

    This endpoint fulfills a GDPR data deletion request by erasing all stored ChurnKey data for a customer identified by email address. Use it to satisfy data subject deletion requests.

    • This endpoint sends a POST request to https://api.churnkey.co/v1/data/dsr/delete. Each Nexset record is sent as the JSON request body and must include the customer's email.
    • The endpoint responds for each request indicating whether the deletion succeeded.

    Use this endpoint with care, as deletions are permanent. A deletion can be rejected (returning deleted: false with a reason) if the profile exceeds the API deletion limit. For details, refer to the ChurnKey Data API documentation.

Configure Manually

ChurnKey destinations can be manually configured to send data to any valid ChurnKey API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the ChurnKey API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the ChurnKey API from the Method pulldown menu. ChurnKey write endpoints use the POST method.

Data Format

  1. Select the format in which the Nexset data will be sent to the ChurnKey API from the Content Format pulldown menu. ChurnKey expects JSON, so select the JSON format. Nexla will automatically convert the data to the selected format for each API call.

API Endpoint URL

  1. Enter the URL of the ChurnKey API endpoint to which you want to send the Nexset data in the URL field. ChurnKey Event Tracking endpoints are based at https://api.churnkey.co/v1/api/, and the GDPR deletion endpoint is https://api.churnkey.co/v1/data/dsr/delete.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include any headers already present in the credentials. The ChurnKey x-ck-api-key and x-ck-app authentication headers are added automatically by Nexla based on your credential configuration.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this ChurnKey destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional

Record batching is useful for ChurnKey's bulk endpoints, which accept an array of objects in a single request. For the Bulk Create Events endpoint, batch sizes must not exceed 100 records per call.

  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings.

Response Webhook

Optional

Nexla can automatically send the response received from the ChurnKey API after each call to a new Nexla webhook data source. This option allows you to keep track of the status of each API call and any additional information returned after each call — for example, to capture whether a GDPR deletion request was accepted or rejected.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the ChurnKey API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the ChurnKey API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the ChurnKey API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to ChurnKey, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to ChurnKey until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.