Skip to main content

[Zendesk] - How can I define which data to extract from a document?

Alessandro Angioni avatar
Written by Alessandro Angioni
Updated this week

As a support admin, you can configure SnapCall to extract specific information from media or attachments using SnapCall Flow, a tool designed for advanced analysis. To begin, open your SnapCall Dashboard and navigate to your list of Flows.


Create or Update a Flow

From your Flow list, either create a new Flow or select an existing one to edit. This will open the Flow Editor. Here, you can choose which features to enable (for example, capturing the customer’s geolocation) and customize your AI prompts.

Next, switch to the Configuration tab.


Define Your Prompt and Select Custom Fields


In the Configuration tab, select the step in your Flow where customers are expected to upload media. This will display three additional subtabs. Open the AI Analysis tab.

Click Add a skill, and in the pop-up window, choose Data extract. You’ll return to the AI Analysis tab, now with three editable fields:

  • Data to extract
    Specify the type of information you want SnapCall to pull from the attachment. Use natural, conversational language such as “serial number” or “product ID.” This helps guide the AI engine in identifying the correct data.

  • Sync custom fields
    Choose the custom field where the extracted data should be stored. By default, the Data Extract skill saves information to custom fields, so select the appropriate field from the list.

  • Add context
    Provide any helpful details about where the information is typically located within the attachment or how it is normally formatted. This improves the accuracy of the extraction and can be written in conversational language as well.


Save Your Flow and Add It to Your Trigger

Once you’ve finished configuring the Flow, save your changes. Then copy your Flow’s unique ID, called the Flow token. You’ll find it at the end of the Flow URL in your dashboard.

Next, go to Zendesk and update your SnapCall trigger associated with your existing webhook. (If you haven’t set this up yet, you can find instructions in our documentation.) In the trigger action, you’ll see code similar to:

{    "companyId": YOUR_COMPANY_ID,   "urls": [     {% for comment in ticket.comments limit:1 offset:0 %}       {% for attachment in comment.attachments %}         "{{attachment.url}}"{% if forloop.last != true %},{% endif %}       {% endfor %}     {% endfor %}   ],   "ticket": {{ticket.id}},   "flowToken":"YOUR_FLOW_ID" }

Replace the existing flowToken value with your new Flow token and save the trigger.

Once updated, SnapCall will automatically use your configured Flow to extract data from any attachments received through the webhook.

Did this answer your question?