How to receive email interactions from a website form

Created by Hannah Peters, Modified on Tue, 18 Apr 2023 at 09:12 AM by Hannah Peters

This article explains how you can use an email form on your website where customers can easily reach out to you - the emails create interactions in Connectel and the agents will receive a notification for a new incoming email.


Requirements:

  • You need to have the Chat channel added to your platform. Contact your Account Manager or Customer Success Manager
  • Optimal: add an API user by following this guide. An API user is used for accessing Connectels powerful API. The reason you want to create a separate user is to have a dedicated user for the API-key. If you use the API key from any other user you risk losing the integration when e.g. the user is removed because they're not using the platform anymore.



How to receive email interactions from a website form


1. First of all you need to make sure the email account is set up in Connectel. Follow this guide.


2. Create the API user by following this guide.


3. Go to Chat -> Chat websites and create a new chat website by clicking the plus in the bottom right corner:


4. Fill in the details:


Name: Name of the chat website (only visible for agents)

Key: Unique 5 character key for chat website

Website Domain: The address where the form will be available

Proxy Or Motion Domain: https://yourcompany.connectel.io:443

If your site has limitations or restrictions in how it can be accessed on the internet (e.g. limited to certain IP addresses), please contact our Helpdesk for additional advice.

List: Which list contacts should be added to

Interval: Always

Description: Optional


Click Add Chat Website.


5. Click the three dots to the right of the chat website and then Edit Chat Website:


6. Go to Offline:


7. Add the details that the customer should fill in. The fields in the form need to match the fields in the website form.

For example: First name, Last name, Email, Category, Message. Match fields with fields in Connectel Contact Manager Field (e.g. First name = firstName, Last name = lastName, Email = email). This matches an incoming email with the contact in your system, or creates a new contact if it does not already exist.


- Enable "Open new interaction"

- Add the Email Account

- Subject = e.g. category

- The following Motion Contact Manager Field = which field should be searched for in Contacts Manager to match the interaction with a contact

- Will be mapped in your Motion Chat Snippet as = Email


You can see the preview to the right:


You can also add fields such as Attachements, checklists etc.


8. Next step is to try out the API endpoint and test the functionality. You can find all API endpoints here: https://app.swaggerhub.com/apis-docs/Connectel/connectel-agent_user_api/3.14.0


Below is a json example request. Make sure you use the correct Website ID under "id". The Website ID can be found here:

Also make sure all your input fields (that you created in the Offline form in step 7) are included in the request.


curl --location --request POST 'https://yourdomain.connectel.io/api/chat/websites/1/offline' \
--form 'body[First name]="John"' \
--form 'body[Last name]="Doe"' \
--form 'body[Email]="john.doe@connectel.se"' \
--form 'body[Category]="Question"' \
--form 'body[Message]="Hello"' \
--form '‘body[Attachment][0]=@"/path/to/file"' \
--form 'id="1"' \
--form 'mapKeyOffline="email"' \
--form 'from="john.doe@connectel.se"'


After a successful test you will find the interaction in the email account you mapped it to.


9. Now you can implement this functionality into your production by triggering this API endpoint from you website form.























Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article