Documentation
TRY
usage
<TRY>
<QUERY>
...
</QUERY>
<FALLBACK>
...
</FALLBACK>
</TRY>
paramètres
QUERY : a serie of xSushee commands to execute. If one fails the following commands are NOT executed.
FALLBACK: one or multiple xSushee commands executed if the queries above fails.
retourne
The results of the executed commands
exemples
Trying to create a contact. If it already exists, updating it instead.
<TRY>
<QUERY>
<CREATE>
<CONTACT>
<INFO>
<EMAIL1>boris@nectil.com</EMAIL1><NOTES>Creating Boris</NOTES>
</INFO>
</CONTACT>
</CREATE>
</QUERY>
<FALLBACK>
<UPDATE>
<CONTACT>
<WHERE>
<INFO>
<EMAIL1>boris@nectil.com</EMAIL1>
</INFO>
</WHERE>
<INFO>
<NOTES>Updating Boris</NOTES>
</INFO>
</CONTACT>
</UPDATE>
</FALLBACK>
</TRY>
Checking if a contact exists. If it does not, creating it.
<TRY>
<QUERY>
<SEARCH>
<CONTACT>
<INFO>
<EMAIL1>boris@nectil.com</EMAIL1>
</INFO>
</CONTACT>
</SEARCH>
</QUERY>
<FALLBACK>
<CREATE>
<CONTACT>
<INFO>
<EMAIL1>boris@nectil.com</EMAIL1>
</INFO>
</CONTACT>
</CREATE>
</FALLBACK>
</TRY>