{"__v":9,"_id":"56af63088be2ea0d00b4886e","category":{"__v":4,"_id":"5693b82173f48f0d0075c90d","pages":["56ab8a0f678b58170031ebab","56ab93620b9e0b0d00616245","56af63088be2ea0d00b4886e","56d02fc81991690b003b2a8e"],"project":"568fce2a04440a1700e4cb47","version":"568fce2b04440a1700e4cb4a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-11T14:11:45.170Z","from_sync":false,"order":8,"slug":"inbound-message-forwarding","title":"Forwarding"},"parentDoc":null,"project":"568fce2a04440a1700e4cb47","user":"55116f88e2990b0d00fb0552","version":{"__v":20,"_id":"568fce2b04440a1700e4cb4a","project":"568fce2a04440a1700e4cb47","createdAt":"2016-01-08T14:56:43.101Z","releaseDate":"2016-01-08T14:56:43.101Z","categories":["568fce2b04440a1700e4cb4b","568fd1b8b700ce0d002f4b1c","568fd23804440a1700e4cb5b","568fd2444719c119002ce5d8","568ff21204440a1700e4cbc1","5693732c8aa8040d009f2c28","5693738393445b0d00abdad0","5693740093445b0d00abdad1","56937445974aaa0d001ca699","5693b82173f48f0d0075c90d","5694c4cd1005590d0062cb25","569f854466a5640d00efa54c","56a264cdd15dd70d008d825b","56aa56bf318e6c1700a19ddb","56b0e6347ae4550d000627bd","56b200c0f48f270d00e0de6f","56b200c6f48f270d00e0de70","56b22a9665ddf50d0076ba40","56e92ef71996862200fd7f42","574d6577fb835c0e00ca316a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-01T13:52:08.836Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"The SMS system doesn't natively cater for round tripping conversation ids, so the Messaging API implements its own support.\n\nYou can use the clientRef property of an SMS message to track conversations. When an SMS message is sent via the Messaging API, we store the clientRef, if supplied, for later lookup using the *from* and *to* properties as the key.\n\nWhen a message arrives on the Dynmark platform, we check for any clientRefs stored against the Dynmark long number it arrived on and the number of the handset.\n\nIf a match is found, we forward the message with the found clientRef. If no match is found, we forward without a clientRef.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Maximum clientRef length\",\n  \"body\": \"The maximum length for a clientRef value is 64 characters.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"If you need to track multiple conversations with the same phone number simultaneously, you will need to send each conversation from a different Dynmark long number.\",\n  \"title\": \"Limitation due to the underlying SMS protocol\"\n}\n[/block]\n##Example##\nIf you send the following messages:\n1. To 44770090000 from 447777777777 with a clientRef of *conv-1*\n2. To 44770099999 from 447777777777 with a clientRef of *conv-2*\n3. To 44770099999 from 447777777777 with a clientRef of *conv-3*\n4. To 44770099999 from 447777888888 with a clientRef of *conv-4*\n\nThe handsets reply and the inbound handler receives notifications as follows:\n1. 44770090000 replies to 447777777777. The Inbound handler will forward the message with *clientRef=conv-1*\n2. 44770099999 replies to 447777777777. The Inbound handler will forward the message with *clientRef=conv-3* as it's the most recent clientRef seen between those two numbers\n3. 44770099999 replies to 447777888888. The Inbound handler will forward the message with *clientRef=conv-4*","excerpt":"","slug":"tracking-converstations","type":"basic","title":"Tracking Conversations"}

Tracking Conversations


The SMS system doesn't natively cater for round tripping conversation ids, so the Messaging API implements its own support. You can use the clientRef property of an SMS message to track conversations. When an SMS message is sent via the Messaging API, we store the clientRef, if supplied, for later lookup using the *from* and *to* properties as the key. When a message arrives on the Dynmark platform, we check for any clientRefs stored against the Dynmark long number it arrived on and the number of the handset. If a match is found, we forward the message with the found clientRef. If no match is found, we forward without a clientRef. [block:callout] { "type": "info", "title": "Maximum clientRef length", "body": "The maximum length for a clientRef value is 64 characters." } [/block] [block:callout] { "type": "warning", "body": "If you need to track multiple conversations with the same phone number simultaneously, you will need to send each conversation from a different Dynmark long number.", "title": "Limitation due to the underlying SMS protocol" } [/block] ##Example## If you send the following messages: 1. To 44770090000 from 447777777777 with a clientRef of *conv-1* 2. To 44770099999 from 447777777777 with a clientRef of *conv-2* 3. To 44770099999 from 447777777777 with a clientRef of *conv-3* 4. To 44770099999 from 447777888888 with a clientRef of *conv-4* The handsets reply and the inbound handler receives notifications as follows: 1. 44770090000 replies to 447777777777. The Inbound handler will forward the message with *clientRef=conv-1* 2. 44770099999 replies to 447777777777. The Inbound handler will forward the message with *clientRef=conv-3* as it's the most recent clientRef seen between those two numbers 3. 44770099999 replies to 447777888888. The Inbound handler will forward the message with *clientRef=conv-4*