Skip to content

Commit b9cd243

Browse files
authored
Merge pull request #212 from digipost/req-reg-doc
Minor changes to send message doc
2 parents 7903797 + 6d32178 commit b9cd243

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

docs/_v14_0/2_send_messages.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ var result = client.SendMessage(messageWithFallbackToPrint);
121121

122122
It is possible to send a message to a person, who does not have a Digipost account, where the message triggers
123123
an SMS notification with a request for registration. The SMS notification says that if they register for a
124-
Digipost account the document will be delivered digitally. If the user does not register for a Digipost
125-
account within the defined deadline, the document will either be delivered as physical mail or not at all.
126-
Be aware that we need a PersonalIdentificationNumber as Recipient to be able to deliver the correct person!
124+
Digipost account the document will be delivered digitally. The actual content of the SMS is not part of the request, it is stored as part of the Digipost sender account and must be agreed upon with Digipost. If the user does not register for a Digipost
125+
account within the defined deadline, the document will be either delivered as physical mail or not at all.
126+
Be aware that PersonalIdentificationNumber as Recipient is required to be able to deliver the document to the correct person.
127127

128-
In this case the document will be delivered as physical mail by Digipost if the recipient has not registered for a Digipost account by the defined deadline:
128+
In the following the document will be delivered as physical mail by Digipost if the recipient has not registered for a Digipost account by the defined deadline:
129129

130130
```csharp
131131
var recipient = new RecipientById(identificationType: IdentificationType.PersonalIdentificationNumber, id: "311084xxxx");
132+
var documentGuid = Guid.NewGuid();
132133

133134
var requestForRegistration = new RequestForRegistration(
134135
DateTime.Now.AddDays(3),
@@ -144,19 +145,27 @@ var requestForRegistration = new RequestForRegistration(
144145
)
145146
);
146147

147-
var primaryDocument = new Document(subject: "document subject", fileType: "pdf", path: @"c:\...\document.pdf");
148+
var primaryDocument = new Document(subject: "document subject", fileType: "pdf", path: @"c:\...\document.pdf")
149+
{
150+
Guid = documentGuid.ToString()
151+
};
148152

149-
var messageWithPrintIfUnread = new Message(sender, recipient, primaryDocument)
153+
var messageWithRequestForRegistration = new Message(sender, recipient, primaryDocument)
150154
{
151155
RequestForRegistration = requestForRegistration
152156
};
153157

154-
var result = client.SendMessage(messageWithPrintIfUnread);
158+
var result = client.SendMessage(messageWithRequestForRegistration);
155159
```
156160

157161
If the sender wishes to send the document as physical mail through it's own
158-
service (if the recipient does not register a Digipost account), print details _must not be included_.
162+
service, print details _must not be included_. In that case the status of the delivery can be checked with the following:
163+
164+
```csharp
165+
var documentStatus = _digipostClient.GetDocumentStatus(sender).GetDocumentStatus(documentGuid).Result;
166+
```
159167

168+
The documentGuid is tha same as the one used when the originating message was sent.
160169

161170
### Send letter with fallback to print if the user does not read the message within a certain deadline
162171

0 commit comments

Comments
 (0)