Skip to content

Commit

Permalink
include an example transactionresult for create interaction with an id
Browse files Browse the repository at this point in the history
  • Loading branch information
milindchidrawar committed Oct 27, 2022
1 parent ff18e75 commit 849d350
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/context/ref/Interaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ 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. The application that created the interaction can use this property to return an identifier as part of a TransactionResult.

## Type

Expand All @@ -32,6 +33,7 @@ https://fdc3.finos.org/schemas/next/interaction.schema.json
| `description` | string | Yes | `Blah, blah, blah` |
| `initiator` | fdc3.contact | No | See below |
| `origin` | string | No | `Outlook` |
| `id` | object | No | `{ customId: 'a0S8d000000uO05EAE' }` |

## Example

Expand Down
49 changes: 49 additions & 0 deletions docs/intents/ref/CreateInteraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,55 @@ const interaction = {
fdc3.raiseIntent('CreateInteraction', interaction)
```

Console log will display:

```js
{
type: 'fdc3.transactionResult',
status: 'Created',
context: {
type: 'fdc3.interaction',
contacts: {
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'
id: {
customID: 'a0S8d000000uO05EAE'
}
},
message: 'record with id "a0S8d000000uO05EAE" was created'
}
```

## See Also

Context
Expand Down

0 comments on commit 849d350

Please sign in to comment.