Suggested Flow 1

  1. Customer registers on your website (or app).
  2. After the registration page, you can show the Customer the opt-in plugin anywhere on the website and you will need to include the customer's information in the plugin so you can match your customer with the associated Facebook user. You should include some type of internal ID (can be email address or any other internal ID). You can also include any other identifying information for that customer.
  3. The Customer will then opt-in to the retail plugin.
  4. At this point, a Customer gets created in Sonar with the relevant information that you included in the opt-in plugin.
  5. You will then receive a retail webhook from Sonar with the following information: type, action, state (with params), and customer information (from Sonar).
  6. You can then send structured messages to that Customer using their fb_id or email address.