Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Context data and intents consolidated update branch 2.1 #936

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
9f6294f
add-create-interaction-intent
milindchidrawar Jun 7, 2022
6accbc1
add-create-interaction-intent
milindchidrawar Jun 7, 2022
10f1e44
add-create-interaction-intent
milindchidrawar Jun 7, 2022
d74f407
Interaction context added
pauldyson Jun 8, 2022
6abb14d
update CreateInteraction to use origin instead of source
milindchidrawar Jun 9, 2022
1c37ad0
partial implementation of transaction results
milindchidrawar Jun 22, 2022
2213c26
Example code for TransactionResult
pauldyson Jun 22, 2022
c05af21
complete implementation of transaction result
milindchidrawar Jun 22, 2022
a117878
Updated 592-intent-proposal-create-interaction branch with latest FDC…
mistryvinay Jul 4, 2022
d3b02df
Updates to sidebar.json and comments in CHANGELOG.md
mistryvinay Jul 4, 2022
c1a30b8
update transaction result based on feedback
milindchidrawar Jul 6, 2022
56479cc
feat: Add message type
ZimmySymphony Jul 21, 2022
003fb7d
resolve alphabetical sorting for create interaction
milindchidrawar Aug 3, 2022
0db3dfa
updated transactionresult schema and context description
milindchidrawar Aug 3, 2022
453f61d
Merge branch 'master' into 592-intent-proposal-create-transaction-result
milindchidrawar Aug 4, 2022
54d58aa
Merge pull request #7 from mistryvinay/592-intent-proposal-create-int…
milindchidrawar Aug 4, 2022
aca7d8b
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Aug 4, 2022
76d57a5
resolve alphabetical sort
milindchidrawar Aug 4, 2022
48f0de0
transaction result context field should be of type Context
milindchidrawar Aug 4, 2022
af6ccfb
update transaction result description
milindchidrawar Aug 4, 2022
bf6c9e9
Merge branch 'master' into 592-intent-proposal-create-interaction
milindchidrawar Aug 4, 2022
3a871c7
resolve alphabetical sorting
milindchidrawar Aug 4, 2022
df75169
Add ChatRoom
symphony-jean-michael Aug 5, 2022
75141ff
review: make intent type free, rename intent+context to action
Yannick-Malins Aug 5, 2022
4501ef2
Add SendChatMessage Intent
symphony-jean-michael Aug 5, 2022
d30e3e9
Add ChatMessage context
symphony-jean-michael Aug 5, 2022
44c2d61
Add ChatRoom and ChatMessage to the documentation
symphony-jean-michael Aug 5, 2022
81699a9
added Action, set Types on Message and Action, did doc
Yannick-Malins Aug 5, 2022
37712ce
merge master
Yannick-Malins Aug 5, 2022
864ad77
typo
Yannick-Malins Aug 5, 2022
bc31906
Add ChatRoom and SendChatMessage in Typescript
symphony-jean-michael Aug 8, 2022
100f416
Add SearchCriteria Context
symphony-jean-michael Aug 8, 2022
3afbfec
Link ChatRoom and ChatMessage schemas in main schema
symphony-jean-michael Aug 8, 2022
f98866c
typos
Yannick-Malins Aug 16, 2022
f2c89da
Update ChatMessage.md
mistryvinay Aug 24, 2022
59fbd9f
rename chat.message to message to make space for PR765
Yannick-Malins Aug 29, 2022
2eb75d8
Lint file
symphony-jean-michael Aug 29, 2022
a57e625
Remove the html entitites
symphony-jean-michael Aug 29, 2022
6e1c104
Add SeachCriteria link
symphony-jean-michael Aug 29, 2022
f236082
Merge remote-tracking branch 'upstream/master' into feature/ViewMessages
symphony-jean-michael Sep 1, 2022
d31fb7b
Hugh review
Yannick-Malins Sep 1, 2022
864f756
Update the description to be more generic
symphony-jean-michael Sep 1, 2022
56ddcd7
kris review
Yannick-Malins Sep 1, 2022
5f9b52c
Reorder links
symphony-jean-michael Sep 1, 2022
1a344df
more kris review
Yannick-Malins Sep 1, 2022
b517682
Update descriptions
symphony-jean-michael Sep 1, 2022
6ab7ece
Restore the HTML entities
symphony-jean-michael Sep 1, 2022
b601840
Adjusting definition of TransactionResult
kriswest Sep 1, 2022
1d7f05b
Flip the order of the example
symphony-jean-michael Sep 1, 2022
81dfc54
Update links
symphony-jean-michael Sep 1, 2022
24ecdfe
Replace URI with URL
symphony-jean-michael Sep 1, 2022
91f9a67
Update description
symphony-jean-michael Sep 1, 2022
ca41bfe
Merge remote-tracking branch 'upstream/master' into feature/SendChatM…
symphony-jean-michael Sep 1, 2022
5b0ccbf
Adding note about intents that return data and TransactionResult to I…
kriswest Sep 1, 2022
82229d9
Update description
symphony-jean-michael Sep 2, 2022
a54ae60
Rename contexts in criteria
symphony-jean-michael Sep 2, 2022
2b9931a
Rename fdc3.searchCriteria into fdc3.chat.searchCriteria
symphony-jean-michael Sep 6, 2022
c5fc7cf
Merge pull request #8 from kriswest/592-create-transaction-result-KW-…
milindchidrawar Sep 22, 2022
bc8b160
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Sep 22, 2022
1d8ffc0
Merge branch 'finos:master' into 592-intent-proposal-create-interaction
milindchidrawar Sep 22, 2022
342173f
#644 | Add Order and OrderLeg Context Types
nemery-flextrade Sep 29, 2022
e1bb738
Empty criteria
symphony-jean-michael Oct 4, 2022
8b040d9
updated CHANGELOG.MD to remove reference to View Interaction
milindchidrawar Oct 5, 2022
0b67e69
Merge branch 'finos:master' into 592-intent-proposal-create-interaction
milindchidrawar Oct 18, 2022
25f1efa
updates to context and intent descriptions and cleanup ContextTypes.ts
milindchidrawar Oct 18, 2022
6178a3e
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Oct 18, 2022
3d27bbc
updates to context and intent descriptions and cleanup ContextTypes.ts
milindchidrawar Oct 18, 2022
ff18e75
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Oct 27, 2022
849d350
include an example transactionresult for create interaction with an id
milindchidrawar Oct 27, 2022
58ab363
Update StartChat description
symphony-jean-michael Oct 28, 2022
d77fc27
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Nov 1, 2022
2799e39
support new id types for interaction
milindchidrawar Nov 1, 2022
f1aec8a
full upper case for sourced id types
milindchidrawar Nov 1, 2022
b62d702
Merge branch 'finos:master' into 592-intent-proposal-create-interaction
milindchidrawar Nov 2, 2022
86aa01b
Add ViewChat Intent
symphony-jean-michael Aug 8, 2022
cbc349b
Add ViewChat entry in the unreleased section of the changelog.md
symphony-jean-michael Nov 9, 2022
0172785
Rename SearchCriteria in ChatSearchCriteria
symphony-jean-michael Nov 10, 2022
89d2fec
Rename searchCriteria in chatSearchCriteria
symphony-jean-michael Nov 10, 2022
41b3384
Add ViewMessages entry in the unreleased section of the changelog.md
symphony-jean-michael Nov 10, 2022
bfc8c03
Remove unnecessary 'type' because it's already required by context sc…
symphony-jean-michael Nov 10, 2022
6a62c40
Add SendChatMessage, ChatRoom and ChatMessage in the Changelog
symphony-jean-michael Nov 10, 2022
ef838e1
Update src/context/schemas/interaction.schema.json
milindchidrawar Nov 15, 2022
bb01a1c
Update website/static/schemas/next/interaction.schema.json
milindchidrawar Nov 15, 2022
b404098
Merge branch 'finos:master' into 592-intent-proposal-create-interaction
milindchidrawar Nov 22, 2022
5491a09
add ViewInteractions to the list of related intents
milindchidrawar Nov 22, 2022
70e83a8
Update docs/intents/ref/CreateInteraction.md
milindchidrawar Nov 22, 2022
0b898eb
Update docs/context/ref/Interaction.md
milindchidrawar Nov 22, 2022
2054efb
Update docs/context/ref/Interaction.md
milindchidrawar Nov 22, 2022
2b27c99
Update docs/intents/ref/CreateInteraction.md
milindchidrawar Nov 22, 2022
5a2246c
Update docs/context/ref/Interaction.md
milindchidrawar Nov 22, 2022
a7a0631
Update docs/intents/ref/CreateInteraction.md
milindchidrawar Nov 22, 2022
c43c6a0
Update src/context/schemas/interaction.schema.json
milindchidrawar Nov 22, 2022
f34e5fa
Merge branch 'finos:master' into 592-intent-proposal-create-transacti…
milindchidrawar Nov 22, 2022
9d8d14a
added change log item and updated incorrect contacts label. removed l…
milindchidrawar Nov 22, 2022
a3c3f2f
remove lock file from PR
milindchidrawar Nov 22, 2022
9d6df85
kris review
Yannick-Malins Nov 23, 2022
7586c45
Merge branch 'master' into message_container
Yannick-Malins Nov 23, 2022
a69cef2
make chatInitSettings inherit from Context
Yannick-Malins Nov 30, 2022
863436f
set type
Yannick-Malins Nov 30, 2022
ed9fd59
fix/855 Fix incorrect format and rename 'public' property
symphony-jean-michael Dec 6, 2022
c7ad6ab
Merge feature/SendChatMessage
symphony-jean-michael Dec 8, 2022
a729cf7
Merge feature/ViewChat
symphony-jean-michael Dec 8, 2022
6564051
Merge feature/ViewMessages
symphony-jean-michael Dec 8, 2022
f887601
Merge Yannick-Symphony:message_container
symphony-jean-michael Dec 8, 2022
6f92481
Update ChatRoom examples
symphony-jean-michael Dec 8, 2022
6799b31
Add missing Github PR links
symphony-jean-michael Dec 14, 2022
ddef7d9
Fix syntax by closing the example section
symphony-jean-michael Dec 14, 2022
86310a3
Update ChatRoom examples
symphony-jean-michael Mar 22, 2023
b9efdac
Merge pull request #869 from Yannick-Symphony/issue-852
mistryvinay Mar 22, 2023
907dd79
Merge pull request #875 from symphony-jean-michael/fix/855
mistryvinay Mar 22, 2023
35d90e2
Resolved conflicts on yarn.lock
mistryvinay Mar 22, 2023
adc7887
Merge branch 'singletracksystems-592-intent-proposal-create-interacti…
mistryvinay Mar 22, 2023
2f62645
Merge branch 'context-data-and-intents-consolidated-update-branch-2.1…
mistryvinay Mar 22, 2023
5355abd
Resolved conflicts.
mistryvinay Mar 22, 2023
805d4b2
Merge branch '592-intent-proposal-create-transaction-result' of https…
mistryvinay Mar 22, 2023
ab3660d
Merge branch 'singletracksystems-592-intent-proposal-create-transacti…
mistryvinay Mar 22, 2023
aab2b9e
Merge branch '644-context-type-order' of https://github.com/nemery-fl…
mistryvinay Mar 22, 2023
06ff641
Merge branch 'nemery-flextrade-644-context-type-order' into context-d…
mistryvinay Mar 22, 2023
d9661d1
Merge branch 'context-data-and-intents-consolidated-update-branch-2.1…
symphony-jean-michael Mar 23, 2023
7df7aab
Fix invalid syntax
symphony-jean-michael Mar 23, 2023
b4c2dc2
Use the same syntax for bullets
symphony-jean-michael Mar 23, 2023
0803274
Merge pull request #882 from symphony-jean-michael/Symphony_2.1-candi…
mistryvinay Mar 27, 2023
ad95a1b
Merge branch 'master' into context-data-and-intents-consolidated-upda…
kriswest May 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

* Added `CreateInteraction` intent. To be used when a user wants to record an interaction into a system. New context `Interaction` also introduced. An interaction might be a call, IM, email, a meeting (physical or virtual) or the preparation of some specialist data. ([#747](https://github.com/finos/FDC3/pull/747))
* Added `TransactionResult` context. A context type representing the result of a transaction initiated via FDC3. Its purpose is to provide a status and message (where needed) for the transaction and MAY wrap a returned context object. ([#761](https://github.com/finos/FDC3/pull/761))
* Added `Order` (`fdc3.order`) context type representing the details of an order, which may be used to transmit a new order to a third party or share details of an existing order. ([#824](https://github.com/finos/FDC3/pull/824))

* Added a `SendChatMessage` intent to be used when a user wants to send a message to an existing chat room. ([#794](https://github.com/finos/FDC3/pull/794))
* Added a context type representing a chat message (`fdc3.chat.message`). ([#794](https://github.com/finos/FDC3/pull/794))
* Added a context type representing a chat room (`fdc3.chat.room`). ([#794](https://github.com/finos/FDC3/pull/794))
* Added a chat `Message` type in order to describe messages with rich content and attachments. ([#779](https://github.com/finos/FDC3/pull/779))
* Added an `Action` type, encapsulating either a `Context` or the association of a `Context` with an `Intent` inside another object. ([#779](https://github.com/finos/FDC3/pull/779))
* Added a `ViewChat` Intent to be used when a user wants to open an existing chat room. ([#796](https://github.com/finos/FDC3/pull/796))
* Added a `ViewMessages` intent to be used when a user wants to search and see a list of messages. ([#797](https://github.com/finos/FDC3/pull/797))
* Added a context type representing a ChatSearchCriteria (`fdc3.chat.searchCriteria`). ([#797](https://github.com/finos/FDC3/pull/797))

* Added error examples to the /v2 App Directory API routes ([#973](https://github.com/finos/FDC3/pull/973))

### Changed

* Updated definition of the `ChatInitSettings` context type to use the new `Message` type. ([#779](https://github.com/finos/FDC3/pull/779))
* Updated definition of the `Instrument` context type to include optional market identifiers ([#819](https://github.com/finos/FDC3/pull/819))
* Updated the `StartChat` intent to return a reference to the room. ([#794](https://github.com/finos/FDC3/pull/794))
* Corrected API functions and object types to always use `string` instead of `String` ([#924](https://github.com/finos/FDC3/pull/924))

### Deprecated
Expand Down
74 changes: 74 additions & 0 deletions docs/context/ref/Action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
id: Action
sidebar_label: Action
title: Action
hide_title: true
---
# `Action`

A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object,
for example a chat message.

The action may be completed by calling `fdc3.raiseIntent()` with the specified Intent and Context, or, if only a context is specified, by calling `fdc3.raiseIntentForContext()` (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).

Accepts an optional `app` parameter in order to specify a certain app.

## Type

`fdc3.action`

## Schema

https://fdc3.finos.org/schemas/next/action.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------------|-------------------------------------------|----------|-------------------------|
| `type` | string | Yes | `'fdc3.action'` |
| `title` | string | Yes | `'Click to view Chart'` |
| `intent` | string | No | `'ViewChart'` |
| `context` | string | Yes | See Below |
| `app` | object | No | `'myApp'` |
| `app.appId` | string | Yes | `'app1'` |
| `app.instanceId` | string | No | `'instance1'` |



## Example

```js
const action = {
type: 'fdc3.action',
title: 'Click to view Chart',
intent: 'ViewChart',
context {
type: 'fdc3.chart',
instruments: [
{
type: 'fdc3.instrument',
id: {
ticker: 'EURUSD'
}
}
],
range: {
type: 'fdc3.dateRange',
starttime: '2020-09-01T08:00:00.000Z',
endtime: '2020-10-31T08:00:00.000Z'
},
style: 'candle'
},
app {
appId: 'MyChartViewingApp',
instanceId: 'instance1'
}
}

## See Also

Other Types
* [Message](Message)

Intents
* [StartChat](../../intents/ref/StartChat)
34 changes: 26 additions & 8 deletions docs/context/ref/ChatInitSettings.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ https://fdc3.finos.org/schemas/next/chatInitSettings.schema.json
| Property | Type | Required | Example Value |
| ------------------------------ | ----------- | -------- | -------------------------------------------------------------------- |
| `type` | string | Yes | `'fdc3.chat.initSettings'` |
| `chatName` | string | No | `'Instrument XYZ'` |
| `chatName` | string | No | `'Instrument XYZ'` |
| `members` | ContactList | No | ContactList - cf. below |
| `initMessage` | string | No | `'Hello!'` |
| `message` | Message | No | Message - cf. below |
| `options.groupRecipients` | boolean | No | `true`: if false a separate chat will be created for each member |
| `options.public` | boolean | No | `true`: the room will be visible to everyone in the chat application |
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
| `options.isPublic` | boolean | No | `true`: the room will be visible to everyone in the chat application |
| `options.allowHistoryBrowsing` | boolean | No | `true`: members will be allowed to browse past messages |
| `options.allowMessageCopy` | boolean | No | `true`: members will be allowed to copy/paste messages |
| `options.allowAddUser` | boolean | No | `true`: members will be allowed to add other members to the chat |

Expand Down Expand Up @@ -58,27 +58,45 @@ const initSettings = {
},
options: {
groupRecipients: true, // one chat with both contacts
public: false, // private chat room
isPublic: false, // private chat room
allowHistoryBrowsing: true,
allowMessageCopy: true
}
initMessage: 'Hello both!'
message: {
type: 'fdc3.message',
text: {
'text/plain': 'Hey all, can we discuss the issue together? I attached a screenshot'
},
entities: {
'0': {
type: 'fdc3.fileAttachment',
data: {
name: 'myImage.png',
dataUri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII'
}
}
}
}
}

const res = fdc3.raiseIntent('StartChat', initSettings);
const roomRefs = await res.getResult();

// Return a reference to the room
const chatRoom = await res.getResult();
```

## See Also

Other Types

- [ChatRoom](ChatRoom)
- [ContactList](ContactList)
- [Message](Message)

Intents

- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [SendChatMessage](../../intents/ref/StartChat)
- [ViewContact](../../intents/ref/ViewContact)

FINOS Financial Objects
Expand Down
51 changes: 51 additions & 0 deletions docs/context/ref/ChatMessage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
id: ChatMessage
sidebar_label: ChatMessage
title: ChatMessage
hide_title: true
---
# `ChatMessage`

A context representing a chat message. Typically used to send the message or to pre-populate a message for sending.

## Type

`fdc3.chat.message`

## Schema

- https://fdc3.finos.org/schemas/next/chatMessage.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.chat.message'` |
| `chatRoom` | ChatRoom | Yes | `{ type: 'fdc3.chat.room', providerName: 'Symphony', id:{ streamId: 'j75xqXy25NBOdacUI3FNBH'} }` |
| `message` | [Message](https://fdc3.finos.org/schemas/next/message.schema.json) | Yes | `'A message to send'` |

## Example

```js
const chatMessage = {
type: "fdc3.chat.message",
chatRoom: {
type: 'fdc3.chat.room',
providerName: "Symphony",
id: {
streamId: "j75xqXy25NBOdacUI3FNBH"
}
},
message: "A message to send"
}
```

## See Also

Intents
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [SendChatMessage](../../intents/ref/SendChatMessage)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
64 changes: 64 additions & 0 deletions docs/context/ref/ChatRoom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
id: ChatRoom
sidebar_label: ChatRoom
title: Contact
hide_title: true
---
# `ChatRoom`

Reference to the chat room(s) (which could be used later to send a message to the room(s)).

## Type

`fdc3.chat.room`

## Schema

https://fdc3.finos.org/schemas/next/chatRoom.schema.json

## Details

| Property | Type | Required | Example Value |
|-------------|---------|----------|-------------------|
| `type` | string | Yes | `'fdc3.chat.room'` |
| `providerName` | string | Yes | `'Symphony'` |
| `id` | object | Yes | `{ streamId: 'j75xqXy25NBOdacUI3FNBH', anyOtherKey: 'abcdef'}` |
| `url` | string | No | `'http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA'` |
| `name` | string | No | `'My new room'` |

The `url` is an universal url to access to the room. It could be opened from a browser, a mobile app, etc...

## Example

```js
const chatRoom = {
type: "fdc3.chat.room",
providerName: "Symphony",
id: {
streamId: "j75xqXy25NBOdacUI3FNBH"
}
url: "http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA",
name: 'My new room'
};

//Chat rooms are returned by the StartChat intent as a result
const intentResolution = await fdc3.raiseIntent("StartChat", context);

try {
const chatRooms = await intentResolution.getResult():
} catch (error) {
//chat room were not created...
}
```

## See Also

Other Types
* [ChatInitSettings](ChatInitSettings)

Intents
- [StartChat](../../intents/ref/StartChat)
- [SendChatMessage](../../intents/ref/SendChatMessage)

FINOS Financial Objects
- [Contact](https://fo.finos.org/docs/objects/contact)
1 change: 1 addition & 0 deletions docs/context/ref/Contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Other Types
- [ContactList](ContactList)

Intents
- [CreateInteraction](../../intents/ref/CreateInteraction)
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)
- [ViewProfile](../../intents/ref/ViewProfile)
Expand Down
1 change: 1 addition & 0 deletions docs/context/ref/ContactList.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Other Types
- [Contact](Contact)

Intents
- [CreateInteraction](../../intents/ref/CreateInteraction)
- [StartChat](../../intents/ref/StartChat)
- [StartCall](../../intents/ref/StartCall)

Expand Down
96 changes: 96 additions & 0 deletions docs/context/ref/Interaction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
id: Interaction
sidebar_label: Interaction
title: Interaction
hide_title: true
---
# `Interaction`

An `Interaction` is a significant direct exchange of ideas or information between a number of participants, e.g. a Sell Side party and one or more Buy Side parties. An `Interaction` might be a call, a meeting (physical or virtual), an IM or the preparation of some specialist data, such as financial data for a given company or sector.

Notes:

- `interactionType` SHOULD be one of `'Instant Message'`, `'Email'`, `'Call'`, or `'Meeting'` although other string values are permitted.
- `origin` is used to represent the application or service that the interaction was created from to aid in tracing the source of an interaction.
- `id` does not need to be populated by the originating application, however the target application could store it for future reference and SHOULD return it in a `TransactionResult`.
- `id` can be used by a target application to pass an identifier back to the originating application after an interaction record has been created, updated or deleted.
- `id.URI` can be used by a target application to pass a record's link back to the originating application. This offers the originating application a way to open the record for a user to view.

## Type

`fdc3.interaction`

## Schema

https://fdc3.finos.org/schemas/next/interaction.schema.json

## Details

| Property | Type | Required | Example Value |
|--------------------|------------------|-----------|-------------------------------------------------|
| `type` | string | Yes | `fdc3.interaction` |
| `participants` | fdc3.contactList | Yes | See below |
| `timeRange` | fdc3.timeRange | Yes | See below |
| `interactionType` | string | Yes | `Instant Message` |
| `description` | string | Yes | `Blah, blah, blah` |
| `initiator` | fdc3.contact | No | See below |
| `origin` | string | No | `Outlook` |
| `id.SINGLETRACK` | string | No | `a0S8d000000uO05EAE` |
| `id.SALESFORCE` | string | No | `a0S8d000000uO05EAE` |
| `id.URI` | string | No | `https://example.com/record/a0S8d000000uO05EAE` |


## Example

```js
const interaction = {
type: 'fdc3.interaction',
participants: {
type: 'fdc3.contactList',
contacts: [
{
type: 'fdc3.contact',
name: 'Jane Doe',
id: {
email: 'jane.doe@mail.com'
}
},
{
type: 'fdc3.contact',
name: 'John Doe',
id: {
email: 'john.doe@mail.com'
}
},
]
},
interactionType: 'Instant Message',
timeRange: {
type: 'fdc3.timeRange',
startTime: '2022-02-10T15:12:00Z'
},
description: 'Laboris libero dapibus fames elit adipisicing eu, fermentum, dignissimos laboriosam, erat, risus qui deserunt. Praesentium! Reiciendis. Hic harum nostrud, harum potenti amet? Mauris. Pretium aliquid animi, eget eiusmod integer proident. Architecto ipsum blandit ducimus, possimus illum sunt illum necessitatibus ab litora sed, nonummy integer minus corrupti ducimus iste senectus accumsan, fugiat nostrud? Pede vero dictumst excepturi, iure earum consequuntur voluptatum',
initiator: {
type: 'fdc3.contact',
name: 'Jane Doe',
id: {
email: 'jane.doe@mail.com'
}
},
origin: 'Outlook'
}

fdc3.raiseIntent('CreateInteraction', interaction)
```

## See Also

Other Types
- [Contact](Contact)
- [ContactList](ContactList)
- [TimeRange](TimeRange)
- [TransactionResult](TransactionResult]

Intents
- [CreateInteraction](../../intents/ref/CreateInteraction)
- [ViewInteractions](../../intents/ref/ViewInteractions)
Loading