# Refiner Source

<p><a href="https://refiner.io/" >Refiner</a> is a customer feedback and survey platform. It lets you create tailored microsurveys to get a better understanding of your customers, how they interact with your product, and identify new growth opportunities.</p>
<p>This guide will help you set up Refiner as a source in RudderStack.</p>

    <div>
      <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen="allowfullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/HGQCXEzgBvs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" title="YouTube video"></iframe>
    </div>

<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="get-started">Get started</h2><ol>
<li>Go to your <a href="https://app.rudderstack.com/" >RudderStack dashboard</a> and click <strong>Add Source</strong>. From the list of <strong>Event Streams</strong> sources, select <strong>Refiner</strong>.</li>
<li>Assign a name to your source and click <strong>Continue</strong>.</li>
<li>Your Refiner source is now configured. Go to the <strong>Settings</strong> tab of the source and note the <strong>Webhook URL</strong>:</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/source-webhook-url.webp"
        
        >
        <img src="/docs/images/event-stream-sources/source-webhook-url.webp" 
         alt="Refiner source webhook URL"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<ol start="4">
<li>Log in to your <a href="https://app.refiner.io/auth/login" >Refiner account</a>.</li>
<li>Go to <strong>Integrations</strong> and select <strong>Create Webhook</strong>.</li>
<li>Name your webhook and enter the webhook in the <strong>Destination URL</strong> field as shown:</li>
</ol>

<figure class="image--main "  >
    <a 
         href="/docs/images/event-stream-sources/refiner-dashboard-webhook.webp"
        
        >
        <img src="/docs/images/event-stream-sources/refiner-dashboard-webhook.webp" 
         alt="Refiner source webhook URL"  
         
         
        decoding="async" loading="lazy" class="img-shortcode"/>
    </a>
    
</figure>

<ol start="7">
<li>Click <strong>Save Webhook</strong>.</li>
</ol>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="event-transformation">Event transformation</h2><p>RudderStack ingests the Refiner events after converting them into the RudderStack event format. It also maps the following properties from the Refiner event payload to the RudderStack properties:</p>
<table>
  <thead>
      <tr>
          <th>Refiner property</th>
          <th>RudderStack property</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>email</code></td>
          <td><code>email</code></td>
      </tr>
      <tr>
          <td><code>triggered_event</code></td>
          <td><code>event</code></td>
      </tr>
      <tr>
          <td><code>attributes.user_id</code></td>
          <td><code>userId</code></td>
      </tr>
      <tr>
          <td><code>attributes</code> <br/> <code>segments</code></td>
          <td><code>context.traits</code></td>
      </tr>
      <tr>
          <td><code>account</code></td>
          <td><code>traits</code></td>
      </tr>
      <tr>
          <td><code>response</code> <br/><code>form</code></td>
          <td><code>properties</code></td>
      </tr>
      <tr>
          <td><code>last_form_submission_at</code></td>
          <td><code>originaltimestamp</code></td>
      </tr>
  </tbody>
</table>
<!-- end-chunk -->
<!-- begin-chunk -->
<h2 id="how-rudderstack-creates-the-event-payload">How RudderStack creates the event payload</h2><p>This section details how RudderStack receives the data from Refiner source and creates the resulting payload.</p>
<p>A sample payload sent by Refiner is shown below:</p>
<div class="rs-code">
  <div class="rs-code__head">json<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-json" data-lang="json">{
  &#34;uuid&#34;: &#34;69b83e20-4ea2-11ed-941c-e1cb6c7a3870&#34;,
  &#34;cookie_uuid&#34;: &#34;2f9b7e6a-9ba8-1c68-d474-48d719d92a60&#34;,
  &#34;project_uuid&#34;: &#34;0d8759d0-401c-11ed-8ded-9757c4929b55&#34;,
  &#34;remote_id&#34;: &#34;sdk@30&#34;,
  &#34;email&#34;: &#34;sdk30@gmail.com&#34;,
  &#34;display_name&#34;: &#34;&#34;,
  &#34;first_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
  &#34;last_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
  &#34;attributes&#34;: {
    &#34;address&#34;: null,
    &#34;address_city&#34;: null,
    &#34;address_state&#34;: null,
    &#34;age&#34;: null,
    &#34;another_attribute&#34;: null,
    &#34;city&#34;: null,
    &#34;country&#34;: null,
    &#34;created_at&#34;: null,
    &#34;email&#34;: &#34;sdk30@gmail.com&#34;,
    &#34;event&#34;: null,
    &#34;first_name&#34;: null,
    &#34;first_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
    &#34;form_submissions_count&#34;: &#34;1&#34;,
    &#34;form_views_count&#34;: &#34;1&#34;,
    &#34;gender&#34;: null,
    &#34;last_form_submission_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
    &#34;last_form_view_at&#34;: &#34;2022-10-18T05:05:29.000000Z&#34;,
    &#34;last_name&#34;: null,
    &#34;last_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
    &#34;name&#34;: null,
    &#34;phone&#34;: null,
    &#34;some_attribute&#34;: null,
    &#34;status&#34;: null,
    &#34;student&#34;: null,
    &#34;tag&#34;: null,
    &#34;trait1&#34;: null,
    &#34;trait2&#34;: null,
    &#34;trait3&#34;: null,
    &#34;url&#34;: null,
    &#34;user_address_city&#34;: null,
    &#34;user_address_state&#34;: null,
    &#34;user_country&#34;: null,
    &#34;user_id&#34;: null,
    &#34;username&#34;: null,
    &#34;useroccupation&#34;: null,
    &#34;why_did_you_cancel_your_subscription&#34;: &#34;Missing features&#34;
  },
  &#34;segments&#34;: [{
      &#34;uuid&#34;: &#34;0d91d7a0-401c-11ed-8898-bb1ee0c23ae5&#34;,
      &#34;name&#34;: &#34;All Users&#34;,
      &#34;created_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
      &#34;updated_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;
    },
    {
      &#34;uuid&#34;: &#34;f71ad940-455c-11ed-85e0-bf25f168b224&#34;,
      &#34;name&#34;: &#34;test-segment&#34;,
      &#34;created_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
      &#34;updated_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;
    }
  ],
  &#34;account&#34;: {
    &#34;uuid&#34;: &#34;69ba2030-4ea2-11ed-adfc-595e70c7ab07&#34;,
    &#34;remote_id&#34;: null,
    &#34;domain&#34;: null,
    &#34;display_name&#34;: &#34;&#34;,
    &#34;first_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
    &#34;last_seen_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
    &#34;attributes&#34;: {
      &#34;1&#34;: null,
      &#34;2&#34;: null,
      &#34;3&#34;: null,
      &#34;4&#34;: null,
      &#34;a_date_at&#34;: null,
      &#34;business_email&#34;: null,
      &#34;company&#34;: null,
      &#34;email&#34;: null,
      &#34;isfunded&#34;: null,
      &#34;location&#34;: null,
      &#34;name&#34;: null,
      &#34;revenue&#34;: null,
      &#34;some_account_data&#34;: null,
      &#34;trait1&#34;: null,
      &#34;trait2&#34;: null,
      &#34;trait3&#34;: null,
      &#34;user_id&#34;: null
    }
  },
  &#34;triggered_event&#34;: &#34;Completed Survey&#34;,
  &#34;form&#34;: {
    &#34;uuid&#34;: &#34;0d94c790-401c-11ed-bb27-e31f6832c5ae&#34;,
    &#34;name&#34;: &#34;Customer Churn Survey&#34;
  },
  &#34;response&#34;: {
    &#34;uuid&#34;: &#34;7c508c60-4ea2-11ed-9302-57708fe11d26&#34;,
    &#34;first_shown_at&#34;: &#34;2022-10-18T05:05:29.000000Z&#34;,
    &#34;last_shown_at&#34;: &#34;2022-10-18T05:05:29.000000Z&#34;,
    &#34;show_counter&#34;: null,
    &#34;first_data_reception_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
    &#34;last_data_reception_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
    &#34;completed_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
    &#34;dismissed_at&#34;: null,
    &#34;received_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
    &#34;data&#34;: {
      &#34;why_did_you_cancel_your_subscription&#34;: &#34;Missing features&#34;
    },
    &#34;tags&#34;: []
  }
}</code></pre></div>
</div>
<p>RudderStack transforms the above payload into the following payload:</p>
<div class="rs-code">
  <div class="rs-code__head">json<button class="rs-code__copy" type="button">
      
      Copy
    </button>
  </div>
  <div class="highlight"><pre class="chroma"><code class="language-json" data-lang="json">{
  &#34;type&#34;: &#34;identify&#34;,
  &#34;traits&#34;: {
    &#34;why_did_you_cancel_your_subscription&#34;: &#34;Missing features&#34;
  },
  &#34;userId&#34;: &#34;sdk@30&#34;,
  &#34;context&#34;: {
    &#34;traits&#34;: {
      &#34;email&#34;: &#34;sdk30@gmail.com&#34;,
      &#34;segments&#34;: [{
          &#34;name&#34;: &#34;All Users&#34;,
          &#34;uuid&#34;: &#34;0d91d7a0-401c-11ed-8898-bb1ee0c23ae5&#34;,
          &#34;created_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
          &#34;updated_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;
        },
        {
          &#34;name&#34;: &#34;test-segment&#34;,
          &#34;uuid&#34;: &#34;f71ad940-455c-11ed-85e0-bf25f168b224&#34;,
          &#34;created_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;,
          &#34;updated_at&#34;: &#34;2022-10-18T05:04:58.000000Z&#34;
        }
      ]
    },
    &#34;library&#34;: {
      &#34;name&#34;: &#34;unknown&#34;,
      &#34;version&#34;: &#34;unknown&#34;
    },
    &#34;formName&#34;: &#34;Customer Churn Survey&#34;,
    &#34;formUuid&#34;: &#34;0d94c790-401c-11ed-bb27-e31f6832c5ae&#34;,
    &#34;integration&#34;: {
      &#34;name&#34;: &#34;Refiner&#34;
    }
  },
  &#34;rudderId&#34;: &#34;0b10eeb2-0949-4cc9-9d38-3fd1348392e2&#34;,
  &#34;messageId&#34;: &#34;579f213b-5f7d-4dd4-9fa4-d3dca8a0a661&#34;,
  &#34;integrations&#34;: {
    &#34;Refiner&#34;: false
  },
  &#34;originalTimestamp&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;
} {
  &#34;type&#34;: &#34;track&#34;,
  &#34;event&#34;: &#34;Completed Survey&#34;,
  &#34;userId&#34;: &#34;sdk@30&#34;,
  &#34;context&#34;: {
    &#34;library&#34;: {
      &#34;name&#34;: &#34;unknown&#34;,
      &#34;version&#34;: &#34;unknown&#34;
    },
    &#34;formName&#34;: &#34;Customer Churn Survey&#34;,
    &#34;formUuid&#34;: &#34;0d94c790-401c-11ed-bb27-e31f6832c5ae&#34;,
    &#34;integration&#34;: {
      &#34;name&#34;: &#34;Refiner&#34;
    }
  },
  &#34;rudderId&#34;: &#34;0b10eeb2-0949-4cc9-9d38-3fd1348392e2&#34;,
  &#34;messageId&#34;: &#34;94e5747f-4324-4d32-8a1d-33d0a3b718e1&#34;,
  &#34;properties&#34;: {
    &#34;response&#34;: {
      &#34;data&#34;: {
        &#34;why_did_you_cancel_your_subscription&#34;: &#34;Missing features&#34;
      },
      &#34;tags&#34;: [],
      &#34;uuid&#34;: &#34;7c508c60-4ea2-11ed-9302-57708fe11d26&#34;,
      &#34;received_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
      &#34;completed_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
      &#34;last_shown_at&#34;: &#34;2022-10-18T05:05:29.000000Z&#34;,
      &#34;first_shown_at&#34;: &#34;2022-10-18T05:05:29.000000Z&#34;,
      &#34;last_data_reception_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;,
      &#34;first_data_reception_at&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;
    },
    &#34;refiner_form_name&#34;: &#34;Customer Churn Survey&#34;,
    &#34;refiner_form_uuid&#34;: &#34;0d94c790-401c-11ed-bb27-e31f6832c5ae&#34;
  },
  &#34;integrations&#34;: {
    &#34;Refiner&#34;: false
  },
  &#34;originalTimestamp&#34;: &#34;2022-10-18T05:05:45.000000Z&#34;
}</code></pre></div>
</div>

