You can edit any custom use cases and tools that you create, as well as add new use cases to some of the ready made tools that Superface offers.

How to edit a use case

To edit any use cases that you have created head to the Authoring Hub in Superface.

There you will see a list of any use cases you have previously created as well as the prompt used to create them.

authoring-authored-use-cases-58445dba2ce644e696df2fb482376f89.png

Click on the name of the use case you want to edit to open it:

authoring-profile-test-d8590023e09f2f9659f28f626a8be877.png

What you can edit

There are three aspects of the tool that are editable from this section:

Intial prompt (recommended)

TL;DR Try this first before editing other aspects of the tool. It may help you achieve what you want faster.

Getting your use case prompt correct so that you're returning exactly the data that you want, the way that you want it might require a few attempts. You can edit the prompt you used to create the use case by clicking the Change initial prompt button in the Use Case Interface section.

<aside> <img src="/icons/report_gray.svg" alt="/icons/report_gray.svg" width="40px" />

NOTE If you change the initial prompt, the use case interface will be recreated which will override any changes you might have made to it.

</aside>

In some cases, you may find that adding additional specificity to your prompt achieves better results.

For example, a prompt of "Get all members" would work fine. However, if you're only interested in names and locations of those members then a prompt of "Get the first name, last name, and location of all members" would result in a more limited and controlled use case which is recommended.

Use case interface

authoring-edit-use-case-interface-12c49aaae53580b7a7a9d1d501b0d7c7.png

Use case interfaces are written in a language we created to describe API use cases called Comlink.

The use case interface defines: