{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"Release Note - April 2022","type":"basic","slug":"release-note-april-2022","excerpt":"","body":"Introducing **Variant ID** to our API end-points and custom webhooks related to **campaigns**\n\nUsing Sonar’s APIs you can now track which variant ID was sent to the customer both when the message is sent and when a response is received with the following API end-points and custom webhooks.\n\n**Please note**: that **step_variant_id** in this document, is the same as **variant_id** related to campaigns.\n\n\n**API end-points:**\n•\tSend Campaign\n•\tSend Personalized Campaign\n\n**Custom Webhooks:**\n•\tOutbound Message\n•\tNew Assigned Message\n•\tNew Unassigned Message\n\n\n**Details of the changes:**\n\n1.\tBoth of the above API end-points will now include a “**step_variant_id**” as an additional parameter in their result format. \n\nChange from:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"to\\\":\\\"+13105551234\\\",\\n  \\\"text\\\":\\\"sent\\\",\\n  \\\"status\\\":\\\"queued\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nTo \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"to\\\":\\\"+13105551234\\\",\\n  \\\"text\\\":\\\"sent\\\",\\n  \\\"status\\\":\\\"queued\\\",\\n  \\\"step_variant_id\\\":\\\"2\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": []\n    }\n  ]\n}\n[/block]\n2.\tThe 3 custom webhooks mentioned above, will now include the “**step_variant_id**” of the campaign. \n\n“**Outbound Message**” will have the following added to its response:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"/* note: this section exists only if the new message is a reply to a campaign*/\\n  \\\"campaign\\\":{ \\n    \\\"slug\\\": \\\"CLKkAS\\\",\\n    \\\"name\\\": \\\"nps\\\",\\n    \\\"parsed_value\\\": \\\"8\\\",\\n    \\\"step_variant_id\\\": \\\"2\\\"\\t\\t\\n  }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n“**New Assigned Message**” and “**New Unassigned Message**” will add the step_variant_id field to the **campaign component**, of their response. \n\nChanging from:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"/* note: this section exists only if the new message is a reply to a campaign*/\\n  \\\"campaign\\\":{ \\n    \\\"slug\\\": \\\"CLKkAS\\\",\\n    \\\"name\\\": \\\"nps\\\",\\n    \\\"parsed_value\\\": \\\"8\\\"\\n  }\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nTo:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"/* note: this section exists only if the new message is a reply to a campaign*/\\n  \\\"campaign\\\":{ \\n    \\\"slug\\\": \\\"CLKkAS\\\",\\n    \\\"name\\\": \\\"nps\\\",\\n    \\\"parsed_value\\\": \\\"8\\\",\\n    \\\"step_variant_id\\\": \\\"2\\\"\\n  }\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"62712dd96f722b001c616015","createdAt":"2022-05-03T13:27:53.503Z","user":"620d5fb337eaaf002e4c7ee5","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Product Updates","slug":"release-notes","order":11,"from_sync":false,"reference":false,"_id":"579695b1f64c9f0e007cd76c","__v":0,"project":"55208137623ff50d009b2bec","createdAt":"2016-07-25T22:41:53.022Z","version":"55208137623ff50d009b2bef"},"version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["55208138623ff50d009b2bf0","55494a226a82a10d00817ae5","55494ba7ee219b0d001743c8","55494bc1ee219b0d001743cc","56ead8c1df765617008bccaf","573a2073dd007d1700cf288f","579695b1f64c9f0e007cd76c","57969e3dfa1ff60e006a1274","579a4592fd9f3c0e008e4f4a","57ab9afe54fa780e006c5430","57b784f5b7ebd60e009cb4a6","58f686818193090f008cec76","59e79fbd4cf31900341d50c6","5b2436973fd93f0003dcf99d","5d824fb2ce98a801366098a2","61096ffb8de715001695ae54"],"_id":"55208137623ff50d009b2bef","createdAt":"2015-04-05T00:26:31.564Z","releaseDate":"2015-04-05T00:26:31.563Z","__v":16,"project":"55208137623ff50d009b2bec"},"project":"55208137623ff50d009b2bec","__v":0,"parentDoc":null}

Release Note - April 2022


Introducing **Variant ID** to our API end-points and custom webhooks related to **campaigns** Using Sonar’s APIs you can now track which variant ID was sent to the customer both when the message is sent and when a response is received with the following API end-points and custom webhooks. **Please note**: that **step_variant_id** in this document, is the same as **variant_id** related to campaigns. **API end-points:** • Send Campaign • Send Personalized Campaign **Custom Webhooks:** • Outbound Message • New Assigned Message • New Unassigned Message **Details of the changes:** 1. Both of the above API end-points will now include a “**step_variant_id**” as an additional parameter in their result format. Change from: [block:code] { "codes": [ { "code": "{\n \"to\":\"+13105551234\",\n \"text\":\"sent\",\n \"status\":\"queued\"\n}", "language": "json" } ] } [/block] To [block:code] { "codes": [ { "code": "{\n \"to\":\"+13105551234\",\n \"text\":\"sent\",\n \"status\":\"queued\",\n \"step_variant_id\":\"2\"\n}", "language": "json" } ] } [/block] [block:image] { "images": [ { "image": [] } ] } [/block] 2. The 3 custom webhooks mentioned above, will now include the “**step_variant_id**” of the campaign. “**Outbound Message**” will have the following added to its response: [block:code] { "codes": [ { "code": "/* note: this section exists only if the new message is a reply to a campaign*/\n \"campaign\":{ \n \"slug\": \"CLKkAS\",\n \"name\": \"nps\",\n \"parsed_value\": \"8\",\n \"step_variant_id\": \"2\"\t\t\n }", "language": "json" } ] } [/block] “**New Assigned Message**” and “**New Unassigned Message**” will add the step_variant_id field to the **campaign component**, of their response. Changing from: [block:code] { "codes": [ { "code": "/* note: this section exists only if the new message is a reply to a campaign*/\n \"campaign\":{ \n \"slug\": \"CLKkAS\",\n \"name\": \"nps\",\n \"parsed_value\": \"8\"\n }\n", "language": "json" } ] } [/block] To: [block:code] { "codes": [ { "code": "/* note: this section exists only if the new message is a reply to a campaign*/\n \"campaign\":{ \n \"slug\": \"CLKkAS\",\n \"name\": \"nps\",\n \"parsed_value\": \"8\",\n \"step_variant_id\": \"2\"\n }\n", "language": "json" } ] } [/block]