> For the complete documentation index, see [llms.txt](https://docs.smt-x.com/smtx-online-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smt-x.com/smtx-online-documentation/fulfillment-platform/datastore/process-interaction.md).

# Process interaction

## Update from within a running ticket

It is possible to update a datastore from a ticket by running webservices.

Go to the admin page and then to adapters\
&#x20;

![](https://help.smt-x.com/embim29.png)

&#x20;

Select  the tab “Web Services “\
Click on ‘edit icon’ per webservice call, or add new one\
![](https://help.smt-x.com/embim30.png)

To ADD an Address Book Entry\
click the edit button of the webservice call “Datastore Add Address Book Entry”\
![](https://help.smt-x.com/embim31.png)

Now you’ll see this screen:\
![](https://help.smt-x.com/embim32.png)Webservice details\
URL: please insert here the client SSP url, so it comes to:

<http://dev.ssp7.smt-x.com/common/webservice/datastore.asmx>

&#x20;\
Cat Type: to add an Address Book Entry, please select insert\
XSLT In:\
a- get the name of the parameter from the datastore\
b-make the hash tag trough: <http://dev.ssp7.smt-x.com/forms/test.aspx> (login: query)\
&#x20; ![](https://help.smt-x.com/embim33.png)\
c-Select HashCheck and enter the parameter, click the button “getHash”\
![](https://help.smt-x.com/embim34.png)

The hashtag  appears and is ready to be copied\
d- Paste the Hash Tag in the XSLT In code\
![](https://help.smt-x.com/embim35.png)\
Webservice Call Fields\
The field names are the datastore fields

To UPDATE an Address Book Entry

This is used to adjust fields.\
&#x20;\
Go to Admin > adapters

![](https://help.smt-x.com/embim36.png)

Edit Datastore Update Address Book entry\
&#x20;\
![](https://help.smt-x.com/embim37.png)

Search a field:\
for a name with filterName\
or\
for an email with FilterEmail\
or\
for a location  with FilterLocation .\
&#x20;\
Update a field with:\
UpdateName\
or\
UpdateEmail\
or\
UpdateLocation

In a process\
Go to the admin page and select processes\
![](https://help.smt-x.com/embim38.png)\
&#x20;\
To add a process, click the button :

![](https://help.smt-x.com/embim39.png)\
&#x20;\
&#x20;\
Or to add a step in a process, edit  the process:\
![](https://help.smt-x.com/embim40.png)\
Select the Edit Steps tab\
![](https://help.smt-x.com/embim41.png)\
Add a step where needed:

&#x20;\
![](https://help.smt-x.com/embim42.png)

Select Webservice Call in General Settings:\
![](https://help.smt-x.com/embim43.png)\
&#x20;\
Select the datastore in Webservice Call and click on the apply button: ![](https://help.smt-x.com/embim44.png)

Select the necessary fields and and them with the ADD button

![](https://help.smt-x.com/embim45.png)\
&#x20;

&#x20;

Fill in the current fields:

Example for Name: #REPLACE-FORMFIELD-Building|Name# ; Select Form field and Name:\
![](https://help.smt-x.com/embim46.png)

## Get data from Parameter in process

You can now fetch data from a Datastore Parameter, in a process.\
The WebService needs a filterField, and potentially a SortField.

An example is made in our DEV : Datastore - GET - Address Book

Components:

![DSGetData1](https://help.smt-x.com/dsgetdata1.png)\
URL : [http://dev.ssp7.smt-x.com/Common/webservice/datastore.asmx](http://dev.ssp7.smt-x.com/Common/webservice/datastore.asmx%20)\
Call Type: RetrieveList\
Return Type: DataTable\
XLST In: see example - note the HASH ! - see full sample below\
XSLT Out : see example - no Hash here - see full sample below\
Web Service Call Headers: none\
WebService Call Fields:

\- Filter\<FieldName>: Will be needed to find the correct value in the Datastore Parameter.\
\- Sort\<FieldName>: (optional) : sort the results by this field, the first entry will be chosen.

Only 1 entry can be chosen !\
Multiple filters can be selected\
sample form : <http://dev.ssp7.smt-x.com/Forms/Admin/formDetail.aspx?id=291>\
sample process: <http://dev.ssp7.smt-x.com/Workflow/Admin/ProcessAddEdit.aspx?saved=true\\&genericid=233>

The process first pulls data based on the field in the form.\
Next, it asks in the process to select an email address and will then return the Name & Location. sample ticket : 2255

![DSGetData2](https://help.smt-x.com/dsgetdata2.png)

It is a bit complex how to set up the call in the process.\
The step type is 'Webservice Call', but when you select a 'GET'-webservice, the Form section appears.\
This allows you to fetch the fields from the datastore that you want (and use them as 'previously entered fields').\
Note: add the fieldname (of the datastore parameter) in the new textfield, labeled 'Field name from webservice call'.

\[edit]XSLT In Sample

\<?xml version='1.0'?> \<xsl:stylesheet xmlns:xsl='<http://www.w3.org/1999/XSL/Transform>' version='1.0'> \<xsl:template match='/SSPAdapterCall'> \<soapenv:Envelope xmlns:soapenv='<http://www.w3.org/2003/05/soap-envelope>' xmlns:dat="[http://smt-x.com/SSP/Common/DataStore">](http://smt-x.com/SSP/Common/DataStore">) \<soapenv:Header/>        \<soapenv:Body> \<dat:getEntries> \<dat:p\_strParameterName>Address Book\</dat:p\_strParameterName> \<dat:p\_strHash>1E6F5F9F37A94F572DEB3BCB87CF53635741C43C\</dat:p\_strHash> \<dat:p\_blnIsHidden>false\</dat:p\_blnIsHidden> \<dat:p\_strSortFieldName>\</dat:p\_strSortFieldName> \<dat:p\_arr\_strExistingNameValues> \<xsl:for-each select="Field"> \<xsl:variable name="FieldName" select="@Name"/> \<xsl:if test="starts-with($FieldName, 'Filter')"> \<dat:string> \<xsl:value-of select="substring($FieldName, 7)" /> \</dat:string> \<dat:string> \<xsl:value-of select="." /> \</dat:string> \</xsl:if> \</xsl:for-each> \</dat:p\_arr\_strExistingNameValues> \</dat:getEntries> \</soapenv:Body> \</soapenv:Envelope> \</xsl:template> \</xsl:stylesheet>

\[edit]XSLT Out Sample

\<?xml version='1.0' ?> \<xsl:stylesheet version='1.0' xmlns:xsl='<http://www.w3.org/1999/XSL/Transform>' xmlns:soap='<http://www.w3.org/2003/05/soap-envelope>' xmlns:xsi='<http://www.w3.org/2001/XMLSchema-instance>' xmlns:xsd='<http://www.w3.org/2001/XMLSchema>' xmlns:ds='[http://smt-x.com/SSP/Common/DataStore'>](http://smt-x.com/SSP/Common/DataStore'>) \<xsl:template match="/soap:Envelope/soap:Body/ds:getEntriesResponse"> \<SSPAdapterResult> \<Fields> \<xsl:for-each select='//xsd:element\[@name="Data"]/xsd:complexType/xsd:sequence/xsd:element'> \<Field> \<xsl:value-of select='@name' /> \</Field> \</xsl:for-each> \</Fields> \<Rows> \<xsl:for-each select='//DocumentElement/Data'> \<Row> \<xsl:for-each select='\*'> \<Field> \<xsl:attribute name="name"> \<xsl:value-of select="local-name()" /> \</xsl:attribute> \<xsl:value-of select='.'/> \</Field> \</xsl:for-each> \</Row> \</xsl:for-each> \</Rows> \</SSPAdapterResult> \</xsl:template> \<xsl:template match="/soap:Envelope/soap:Body/soap:Fault"> \<Error>code:\<xsl:value-of select='soap:faultcode' /> \<xsl:value-of select='soap:Code/soap:Value' /> - string:\<xsl:value-of select='soap:faultstring' /> \<xsl:value-of select='soap:Reason/soap:Text' /> \</Error> \</xsl:template> \</xsl:stylesheet>
