ProdCamp Help
Go to ProdCampSign InLeave Feedback
  • What is ProdCamp?
  • How it works
  • Getting Started
    • Getting Started with ProdCamp
    • Invite Your Team
    • Custom Domain
  • Customer feedback
    • Attaching Feedback to a Feature
    • Processing Feedback
  • Feedback Channels
    • Customer Feedback Channels
    • ProdCamp App
    • Public Roadmap
    • Feature Voting Portal
    • Email Forwarding
    • Google Chrome Extension
    • Intercom Messanger
    • Embeddable Feedback Widget
    • NPS
    • Any App (via Zapier)
  • Installing widgets
    • Installing widgets
    • Widgets SSO
    • Changelog widget
    • Feedback Widget
    • NPS widget
  • Features
    • Creating a Feature
    • Sharing Features on Public Roadmap
    • Push Feature to Jira
    • Feature Releases
    • Features and Sprints relation
  • Feedback Loop
    • Closing Feedback Loop
    • Changelog
  • Roadmaps
    • Public Roadmap
    • Single Sign-On (SSO)
    • Feature Placement on the Public Roadmap
    • Internal Roadmap
    • Protected Roadmap (beta)
  • ❌Sprints (DEPRECATED)
    • Sprints Mode
    • Create Sprint
    • Adding Features to a Sprint
    • Sprint Releases
  • Products
    • Create and Manage Products
  • Prioritization
    • Prioritization Matrix
    • RICE Prioritization
  • Customers
    • Manage Accounts and Contacts
    • Sync Accounts with SalesForce
  • Integrations
    • Slack
    • Jira
    • GitLab
    • SalesForce
    • Intercom
    • Zapier
  • Operations
    • Import Features
    • Import Customers
  • Settings
    • Profile
  • Getting Help
    • Contact Us
  • API
    • Authentication
    • Feedback API
      • Feedback Types
      • Feedback States
    • Features API
    • Customers API
Powered by GitBook
On this page
  • Initializing the feedback widget
  • Feedback widget commands

Was this helpful?

  1. Installing widgets

Feedback Widget

How to initialize and use the feedback widget

PreviousChangelog widgetNextNPS widget

Last updated 1 year ago

Was this helpful?

Initializing the feedback widget

Finally, after you've you have to invoke the "ProdCamp" init function to identify a user in your system that will be matched to a Customer Contact in ProdCamp (so you don't have to create a contact for every user via API manually - it will be created automatically based on the data that you provide in the init function. When a user sends feedback for the first time - a contact entity will be created or the feedback will be matched to an existing one compared by the provided email)

<script>
    ProdCamp('initFeedbackWidget', {
        email: 'johndoe@foo.com',
        company: {        //optional
            name: 'Foo', //optional
            revenue: 100 //optional
        },
        firstName: 'John',//optional
        lastName: 'Doe', //optional
        avatarUrl: 'https://somedomain.com/avatar.png'//optional
    });
</script>

We strongly recommend you use the SSO token for your security to authorize requests from your widgets and prevent irrelevant data (spam) as well as unauthorized access. .

For instance: if you set up the SSO token - you don't need to provide any initialization parameters to the widget, because it's already provided inside the token. If the data provided inside the initialization parameters doesn't match the one used inside the token - it will be just ignored by our servers and the one from the token will be used instead, anyway.

So, after setting up the token - you will have to just invoke the initialization function like in the following code and it will be enough:

ProdCamp('initFeedbackWidget')

The only situation when an email should be provided in both cases - is when you set up the async getToken function to receive a new token each time user performs an action. Before the user performs the first action - there will be no info regarding the user and the widget will show an "Email" field to be filled up by the user himself (which will actually be ignored after the token is received).

Those are the fields that you can provide in the init function:

  • email

  • company

    • name

    • revenue

  • firstName

  • lastName

  • avatarUrl

The "email" field is the only required one and will be used as an identifier to create a new contact or match the provided feedback to an existing one.

The "company" property will be used to identify a Customer Account that the contact belongs to (if a Customer Account with such a name exists - the contact will be bound to this account, in other cases, a new Customer Account will be created with the name that was provided in the "name" field of the company property). When you provide a revenue field - it will update the Revenue field inside the provided account if it exists or set the revenue value in the newly created one.

If the "company" property is not provided - contact will be created along with a new customer account that will have the name same as the domain of the email provided in the init function if the domain is not of commonly used email services like "Google," "Hotmail," etc. Or the new account will not be created, but the contact will be bound to the "No Account" special customer account that exists in your ProdCamp from the start and collects all the contacts that can't be identified by their emails.

Feedback widget commands

There are several commands that you can use to manipulate the feedback widget behavior

  • initFeedbackWidget - this one you already know and it instantiates a feedback widget.

  • openFeedbackWidget - this command can be used to open the widget manually from anywhere in your code

  • closeFeedbackWidget - this command will close the widget

  • updateFeedbackWidgetUser - using this command you can update the user that will be sent along with the next provided feedback. The format of the model that should be provided is the same as in the first init command.

  • destroyFeedbackWidget - destroy the widget instance on the page

Installing widgets
installed the widget SDK
Learn how to set it up here