Webhook Information

The most important thing to do when setting up the CRM integration is properly fill out the webhook step that you're using! There's only a few necessary fields to fill out in the webhook, but while most of the functionality of the AI is tied to the agent itself, there are a few optional fields you can fill out in the webhook itself to change some of its functionality!

Webhook Type, Name, Method, and URL

The very first thing to do when setting up your webhook is making sure that you have the settings done properly. First, the webhook needs to be a normal webhook, not a premium one. The name for the webhook can be whatever you want to help you remember what the webhook's purpose is, but the "method" needs to be set to "POST". Finally, the URL needs to be exactly, "https://systems.capriai.us/gpt3", without the quotation marks! If the URL is incorrect, the webhook will fail to fire, which you can check in the workflow history!

Required Custom Data Points

There's only one custom data field that absolutely needs to be filled out in every single webhook that you use, though we'll also go over the different optional ones as well here! The name of these sections will be what you enter as the "key" of the data point, and the description will tell you what you should enter as the "value"!

agent

The agent field is the only required data point on the webhook. The key for it will be "agent". For the value, you need to go to the Capri portal, select the agent that you're wanting to use, then copy the last part of the page's URL that comes after "agents/". That's the value that needs to be entered in the data point!

Optional Custom Data Points

There are also a few optional data points that you can add to the workflow that can change the functionality of the agent when that webhook is fired!

prompt

If you'd like to override the prompt that your agent is set to use, you can add this data point! Whatever you have as the value for this will be what is used by the agent as the prompt instead of what is set in the agent page itself!

prompt_id

If you have multiple prompts in your agent, you can designate which one should be used for each specific webhook by using this data point! The value should be the prompt ID, which can be found by clicking the copy button next to the prompt you're wanting to use in the agent page!

task

"outreach" - When you're wanting to use your agent for outreach, you need to put this data point in your webhook as well, with a value of "outreach". This will allow the agent to send messages properly whenever the webhook is triggered without an incoming message. Be sure not to have this set on your normal response webhook, however! "evaluate" - If you want the agent to perform actions without sending a message, you can use the value "evaluate". This is useful for scenarios where you need the agent to process data or perform tasks silently without user interaction.

channel

If you want the AI to only respond to the contact via a specific channel, you can enter it here! Currently the only supported channels are "SMS", "GMB", "FB", and "IG", which are SMS, GoogleMyBusiness, Facebook, and Instagram DM's, respectively. If you don't put this data point, the AI will, by default, reply to the contact via the channel the incoming message was in.

history

This function allows you to limit the conversation history that the AI can see and respond to! By default, if you don't have this data point, the AI will be sent the entire conversation history every time a new response comes in, even things that were sent months ago! This can cause issues long term, but with the "history" function, you can limit this. If you have "exclude" as the value, the AI will only ever be sent the message that triggered the webhook. This is useful if you are creating something like a Q/A bot or a knowledge repository! If you want to limit the AI to only being sent the conversation from a certain time period, you can enter a number value instead, with whole numbers representing hours, and decimal numbers representing percentages of an hour. For example, a value of "2" would have the AI read the last two hours every time a message comes in, a value of "0.5" would have the AI read the last 30 minutes, or half hour to be specific, and a value of "0.16" would be the last 10 minutes. Having a limit like this, whether it be a few hours or a few days, can greatly help the AI not run into excess token issues long term!

include

Specify action IDs that should be included in the request by listing them as comma-separated values. Only the actions listed will be evaluated, while all other actions will be ignored.

exclude

Specify action IDs that should be excluded from the request by listing them as comma-separated values. The actions listed will be omitted, and all other actions will be evaluated.

Last updated