{ "apikey": "YOURAPIKEY" }
You will need
- A tyntec Conversation Inbox account.
- A tyntec Conversations Inbox API key.
- A tyntec assignee's JID.
- A Cognigy account.

More information about creating a virtual agent can be found here.




More information about Context can be found here.

Complete variant: Full guide for integrating Cognigy with tyntec Conversations Inbox
1. Create a virtual agent
Let's start with creating the first virtual agent.
1. Click the Create agent button.
2. Fill in your virtual agent name and language.
3. Select Solution Accelerator - Blank.
4. Select Webchat.
5. Save the new virtual agent.
The new agent is successfully set up and ready to configure the default context.
More information about creating a virtual agent can be found here.

More information about Context can be found here.

More information about building flows can be found here.
"message": { "body": "Hi {{ input.data.fromName }}, happy to assist you with scheduling your try-on. Would you like to come to one of our stores or should we ship the shoes to you?", "type": "text" } }



{ "message": { "body": "Great! Since you’re our VIP customer, our store associate will take over this conversation to make sure everything’s ready for your visit. One short moment, please…", "type": "text" } }
- Headers key: Authorization
- Headers value: Bearer {{context.apikey}}
- Error Handling - Abort Flow Execution on Error: ON
3. Case (Default)
- Click on the + icon.
- Add another HTTP Request node.
- HTTP Request Method: PATCH
- URL:https://api.cmd.tyntec.com/v3/channels/{{input.data.channelJid}}/conversations/{{input.userId}}
- Payload Type: JSON
- Payload:
{ "assignee": "YOURASSIGNEEJID" }

More information about HTTP requests can be found here.
5. Set up a REST endpoint
1. Select Deploy - Endpoints.
2. Click New Endpoint.
3. Create a New REST API Endpoint assigned to your flow.
4. Open new REST API Endpoint.
5. Open Transformer Functions.
6. Enable Abort on Error in Transformer.
7. Enable Input Transformer.
8. Insert this code into the Transformer:
createRestTransformer({ handleInput: async ({ endpoint, request, response }) => { return { userId: request.body.from.jid, sessionId: request.body.contextInfo.conversation.id, text: request.body.message.body, data: { channelJid: request.body.to, fromName: request.body.from.name } }; }, handleOutput: async ({ output, endpoint, userId, sessionId }) => { return output; }, handleExecutionFinished: async ({ processedOutput, outputs, userId, sessionId, endpoint, response }) => { return processedOutput; } });

Connect Cognigy to Conversations Inbox
Once your Cognigy agent is ready it's time to connect it to the tyntec Conversations Inbox.
1. Open tyntec Conversations Inbox.
2. Select Conversation you want to assign to Cognigy bot.
3. Click on pulldown under name.
4. Select Assistants.
5. Select Outreach Demo.

More?
Cognigy can be modified in many ways. It offers a large amount of flows that you can use for your Cognigy agents. You can also use this integration with others like CRM systems. For example, you can use Cognigy and Salesforce at the same time for your Conversations Inbox (check out the Salesforce-tyntec integration tutorial).